Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

11 changes: 0 additions & 11 deletions rules/Php84/NodeFinder/SetterAndGetterFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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;
Expand Down