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.
1 parent 396af44 commit bdbf3eeCopy full SHA for bdbf3ee
spec.md
@@ -308,6 +308,19 @@ separated by a space. For example:
308
class MyException extends \RuntimeException {}
309
```
310
311
+When calling a method immeditely after instantiating a new class, the instantiation SHOULD NOT be wrapped in
312
+parenthesis. For example:
313
+
314
+```php
315
+$methodResult = new Foo()->someMethod();
316
+```
317
318
+And the following SHOULD be avoided:
319
320
321
+$methodResult = (new Foo())->someMethod();
322
323
324
### 4.1 Extends and Implements
325
326
The `extends` and `implements` keywords MUST be declared on the same line as
0 commit comments