We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d34e77a + e851630 commit 5e2d262Copy full SHA for 5e2d262
spec.md
@@ -369,6 +369,23 @@ separated by a space. For example:
369
class MyException extends \RuntimeException {}
370
```
371
372
+When accessing a class member immeditely after instantiating a new class, the instantiation SHOULD NOT be wrapped in
373
+parenthesis. For example:
374
+
375
+```php
376
+new Foo()->someMethod();
377
+new Foo()->someStaticMethod();
378
+new Foo()->someProperty;
379
+new Foo()::someStaticProperty;
380
+new Foo()::SOME_CONSTANT;
381
+```
382
383
+And the following SHOULD be avoided:
384
385
386
+(new Foo())->someMethod();
387
388
389
### 4.1 Extends and Implements
390
391
The `extends` and `implements` keywords MUST be declared on the same line as
0 commit comments