File tree 1 file changed +7
-3
lines changed
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:
308
308
class MyException extends \RuntimeException {}
309
309
```
310
310
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
312
312
parenthesis. For example:
313
313
314
314
``` 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;
316
320
```
317
321
318
322
And the following SHOULD be avoided:
319
323
320
324
``` php
321
- $methodResult = (new Foo())->someMethod();
325
+ (new Foo())->someMethod();
322
326
```
323
327
324
328
### 4.1 Extends and Implements
You can’t perform that action at this time.
0 commit comments