Run Rector on your code to see what it can do for you:
<?php namespace Rector\Tests\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector\Fixture;
class WithInterfaceAndItsImplementation { - private SomeInterface $x; - - public function __construct( - FirstImplementation $x, - ) { - $this->x = $x; + public function __construct(private SomeInterface $x) + { } } ?>
Applied Rules:
Not a change you expect?
rector.php