From ea64fce504ca7be5c50bfc2e1a91823567830095 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Fri, 24 Jan 2020 12:21:52 +0100 Subject: [PATCH 1/4] Propose errata for anonymous classes --- accepted/PSR-12-extended-coding-style-guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accepted/PSR-12-extended-coding-style-guide.md b/accepted/PSR-12-extended-coding-style-guide.md index 8f3209c41..a4e4c84c0 100644 --- a/accepted/PSR-12-extended-coding-style-guide.md +++ b/accepted/PSR-12-extended-coding-style-guide.md @@ -232,7 +232,7 @@ declare(ticks=1) { ## 4. Classes, Properties, and Methods -The term "class" refers to all classes, interfaces, and traits. +The term "class" refers to all classes, anonymous classes, interfaces, and traits. Any closing brace MUST NOT be followed by any comment or statement on the same line. @@ -1050,7 +1050,7 @@ in the above section. ~~~php Date: Sun, 26 Jan 2020 17:57:05 +0100 Subject: [PATCH 2/4] Revert change to chapter 4 --- accepted/PSR-12-extended-coding-style-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accepted/PSR-12-extended-coding-style-guide.md b/accepted/PSR-12-extended-coding-style-guide.md index a4e4c84c0..34e80e62c 100644 --- a/accepted/PSR-12-extended-coding-style-guide.md +++ b/accepted/PSR-12-extended-coding-style-guide.md @@ -232,7 +232,7 @@ declare(ticks=1) { ## 4. Classes, Properties, and Methods -The term "class" refers to all classes, anonymous classes, interfaces, and traits. +The term "class" refers to all classes, interfaces, and traits. Any closing brace MUST NOT be followed by any comment or statement on the same line. From bc4824d4e45c83e379e1de59be8e35ddfd6d6958 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Sun, 26 Jan 2020 17:59:59 +0100 Subject: [PATCH 3/4] Add errata in the meta docs --- accepted/PSR-12-extended-coding-style-guide-meta.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/accepted/PSR-12-extended-coding-style-guide-meta.md b/accepted/PSR-12-extended-coding-style-guide-meta.md index 725a6289b..8dd003117 100644 --- a/accepted/PSR-12-extended-coding-style-guide-meta.md +++ b/accepted/PSR-12-extended-coding-style-guide-meta.md @@ -209,3 +209,8 @@ _**Note:** Order descending chronologically._ * [Inspiration Mailing List Thread](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/php-fig/wh9avopSR9k) * [Initial Mailing List PSR Proposal Thread](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/php-fig/MkFacLdfGso) + +# 9. Errata and clarifications + + * The code example for anonymous classes has ben fixed (see [#1206](https://github.com/php-fig/fig-standards/pull/1206)) because it was wrong; omitting parentheses after the `class` keyword should not be allowed, since it would be in contrast with what is prescribed for normal classes. + From 94f757b3b330ba1c8d4ca9cc8a02a856ac3130b5 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 27 Jan 2020 10:02:26 +0100 Subject: [PATCH 4/4] Improve errata wording --- accepted/PSR-12-extended-coding-style-guide-meta.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/accepted/PSR-12-extended-coding-style-guide-meta.md b/accepted/PSR-12-extended-coding-style-guide-meta.md index 8dd003117..cf7ab339d 100644 --- a/accepted/PSR-12-extended-coding-style-guide-meta.md +++ b/accepted/PSR-12-extended-coding-style-guide-meta.md @@ -212,5 +212,4 @@ _**Note:** Order descending chronologically._ # 9. Errata and clarifications - * The code example for anonymous classes has ben fixed (see [#1206](https://github.com/php-fig/fig-standards/pull/1206)) because it was wrong; omitting parentheses after the `class` keyword should not be allowed, since it would be in contrast with what is prescribed for normal classes. - + * The code example for anonymous classes was fixed (see [#1206](https://github.com/php-fig/fig-standards/pull/1206)) because it contradicted the actual rule: omitting parentheses after the `class` keyword when creating a new instance is not allowed, as prescribed for normal classes.