Open KorvinSzanto opened 1 month ago
new Foo()->baz() will be allowed in PHP 8.4, we should cover it in the next version of PER-CS.
new Foo()->baz()
To me this is similar to the question of new Foo vs new Foo() where we decided the latter was better for readability: https://github.com/php-fig/per-coding-style/blob/master/spec.md#4-classes-properties-and-methods
new Foo
new Foo()
What should we say here? "Favor using the non-parens version if you can", or is there more to say on the matter?
new Foo()->baz()
will be allowed in PHP 8.4, we should cover it in the next version of PER-CS.To me this is similar to the question of
new Foo
vsnew Foo()
where we decided the latter was better for readability: https://github.com/php-fig/per-coding-style/blob/master/spec.md#4-classes-properties-and-methods