Skip to content

Commit 6dd02cc

Browse files
committed
Fix detection of AbstractModel class in rules
1 parent f17ebc9 commit 6dd02cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bitExpert/PHPStan/Magento/Rules/AbstractModelRetrieveCollectionViaFactoryRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function processNode(Node $node, Scope $scope): array
5757

5858
$type = $scope->getType($node->var);
5959
$isAbstractModelType = (new ObjectType('Magento\Framework\Model\AbstractModel'))->isSuperTypeOf($type);
60-
if ($isAbstractModelType->no()) {
60+
if (!$isAbstractModelType->yes()) {
6161
return [];
6262
}
6363

src/bitExpert/PHPStan/Magento/Rules/AbstractModelUseServiceContractRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function processNode(Node $node, Scope $scope): array
5757

5858
$type = $scope->getType($node->var);
5959
$isAbstractModelType = (new ObjectType('Magento\Framework\Model\AbstractModel'))->isSuperTypeOf($type);
60-
if ($isAbstractModelType->no()) {
60+
if (!$isAbstractModelType->yes()) {
6161
return [];
6262
}
6363

0 commit comments

Comments
 (0)