Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose errata for anonymous classes #1206

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions accepted/PSR-12-extended-coding-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

This comment was marked as resolved.


Any closing brace MUST NOT be followed by any comment or statement on the
same line.
Expand Down Expand Up @@ -1050,7 +1050,7 @@ in the above section.
~~~php
<?php

$instance = new class {};
$instance = new class() {};
~~~

The opening brace MAY be on the same line as the `class` keyword so long as
Expand All @@ -1062,12 +1062,12 @@ interface.
<?php

// Brace on the same line
$instance = new class extends \Foo implements \HandleableInterface {
$instance = new class() extends \Foo implements \HandleableInterface {
// Class content
};

// Brace on the next line
$instance = new class extends \Foo implements
$instance = new class() extends \Foo implements
\ArrayAccess,
\Countable,
\Serializable
Expand Down