diff --git a/rules-tests/Php84/Rector/Class_/PropertyHookRector/Fixture/skip_mix_with_existing_readonly_promoted_property.php.inc b/rules-tests/Php84/Rector/Class_/PropertyHookRector/Fixture/skip_mix_with_existing_readonly_promoted_property.php.inc deleted file mode 100644 index 9e35260873d..00000000000 --- a/rules-tests/Php84/Rector/Class_/PropertyHookRector/Fixture/skip_mix_with_existing_readonly_promoted_property.php.inc +++ /dev/null @@ -1,29 +0,0 @@ -name; - } - - public function setName(string $name): void - { - $this->name = ucfirst($name); - } - - public function __construct( - private readonly int $value, - ) - { - } - - public function getValue() - { - return $this->value; - } -} diff --git a/rules/Php84/NodeFinder/SetterAndGetterFinder.php b/rules/Php84/NodeFinder/SetterAndGetterFinder.php index 1ffd6a95bf0..2adcc7f15be 100644 --- a/rules/Php84/NodeFinder/SetterAndGetterFinder.php +++ b/rules/Php84/NodeFinder/SetterAndGetterFinder.php @@ -7,7 +7,6 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use Rector\TypeDeclaration\NodeAnalyzer\ClassMethodAndPropertyAnalyzer; -use Rector\ValueObject\MethodName; final readonly class SetterAndGetterFinder { @@ -23,16 +22,6 @@ public function findGetterAndSetterClassMethods(Class_ $class, string $propertyN { $classMethods = []; - $constructClassMethod = $class->getMethod(MethodName::CONSTRUCT); - - if ($constructClassMethod instanceof ClassMethod) { - foreach ($constructClassMethod->params as $param) { - if ($param->isReadonly()) { - return []; - } - } - } - $getterClassMethod = $this->findGetterClassMethod($class, $propertyName); if ($getterClassMethod instanceof ClassMethod) { $classMethods[] = $getterClassMethod;