Skip to content

Commit 0239c90

Browse files
committed
Update GetNonVirtualPropertyHookReadRule.php
1 parent 861a6c0 commit 0239c90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Rules/Properties/GetNonVirtualPropertyHookReadRule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public function processNode(Node $node, Scope $scope): array
7676
continue;
7777
}
7878

79+
if ($hook->body === null) {
80+
continue;
81+
}
82+
7983
$hasGetHook = true;
8084
break;
8185
}
@@ -93,10 +97,6 @@ public function processNode(Node $node, Scope $scope): array
9397
continue;
9498
}
9599

96-
if ($propertyReflection->isAbstract()->yes()) {
97-
continue;
98-
}
99-
100100
$errors[] = RuleErrorBuilder::message(sprintf(
101101
'Get hook for non-virtual property %s::$%s does not read its value.',
102102
$classReflection->getDisplayName(),

0 commit comments

Comments
 (0)