File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -308,17 +308,21 @@ separated by a space. For example:
308308class MyException extends \RuntimeException {}
309309```
310310
311- When calling a method immeditely after instantiating a new class, the instantiation SHOULD NOT be wrapped in
311+ When accessing a class member immeditely after instantiating a new class, the instantiation SHOULD NOT be wrapped in
312312parenthesis. For example:
313313
314314``` php
315- $methodResult = new Foo()->someMethod();
315+ new Foo()->someMethod();
316+ new Foo()->someStaticMethod();
317+ new Foo()->someProperty;
318+ new Foo()::someStaticProperty;
319+ new Foo()::SOME_CONSTANT;
316320```
317321
318322And the following SHOULD be avoided:
319323
320324``` php
321- $methodResult = (new Foo())->someMethod();
325+ (new Foo())->someMethod();
322326```
323327
324328### 4.1 Extends and Implements
You can’t perform that action at this time.
0 commit comments