Skip to content

Commit 5dfd982

Browse files
committed
[rector] Rector fixes
1 parent bc46d82 commit 5dfd982

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rules/CodeQuality/NodeAnalyser/AssertMethodAnalyzer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function detectTestCaseCall(MethodCall|StaticCall $call): bool
5656
$declaringClassName = $extendedMethodReflection->getDeclaringClass()
5757
->getName();
5858

59-
return in_array($declaringClassName, [PHPUnitClassName::TEST_CASE, PHPUnitClassName::ASSERT]);
59+
return in_array($declaringClassName, [PHPUnitClassName::TEST_CASE, PHPUnitClassName::ASSERT], true);
6060
}
6161

6262
public function detectTestCaseCallForStatic(MethodCall $methodCall): bool

rules/PHPUnit120/Rector/Class_/PropertyCreateMockToCreateStubRector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ private function shouldSkipClass(Class_ $class): bool
152152
return ! $setUpClassMethod instanceof ClassMethod;
153153
}
154154

155-
private function updatePropertyType(?Node $type): IntersectionType|FullyQualified
155+
private function updatePropertyType(?Node $node): IntersectionType|FullyQualified
156156
{
157-
if ($type instanceof IntersectionType) {
157+
if ($node instanceof IntersectionType) {
158158
$newTypes = [];
159-
foreach ($type->types as $innerType) {
159+
foreach ($node->types as $innerType) {
160160
if ($innerType instanceof FullyQualified && $innerType->toString() === PHPUnitClassName::MOCK_OBJECT) {
161161
$newTypes[] = new FullyQualified(PHPUnitClassName::STUB);
162162
} else {

0 commit comments

Comments
 (0)