-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
architectureArchitecture related topicsArchitecture related topicscode qualityCode quality related issue (must not affect architecture)Code quality related issue (must not affect architecture)enhancementNew feature or requestNew feature or requestleafLeaf ticket is a final non-aggregation typeLeaf ticket is a final non-aggregation typetinyunfinished concept
Description
Due to architecture of PHP for calling method on the newly create object, you need to wrap it into brackets.
$obj = (new MyObjectClass)->something()->orChained();
This construction is extremely uncomfortable to use, for this purpose new
static method should be introduced:
$obj = MyObjectClass::new()->something()->orChained();
Metadata
Metadata
Assignees
Labels
architectureArchitecture related topicsArchitecture related topicscode qualityCode quality related issue (must not affect architecture)Code quality related issue (must not affect architecture)enhancementNew feature or requestNew feature or requestleafLeaf ticket is a final non-aggregation typeLeaf ticket is a final non-aggregation typetinyunfinished concept