Skip to content

[PHP 8.4] new MyClass()->method() without parentheses #8701

@ruudk

Description

@ruudk

Feature Request

We should create a rule for this RFC:

https://wiki.php.net/rfc/new_without_parentheses

Diff

-$request = (new Request())->withMethod('GET')->withUri('/hello-world');
+$request = new Request()->withMethod('GET')->withUri('/hello-world');

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions