Skip to content

Commit a776eaf

Browse files
committed
rectify
1 parent 76b516b commit a776eaf

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

rules/AnnotationsToAttributes/Rector/ClassMethod/DataProviderAnnotationToAttributeRector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public function refactor(Node $node): ?Node
147147
if ($originalAttributeValueToken === false) {
148148
continue;
149149
}
150+
150151
$node->attrGroups[] = $this->createAttributeGroup($originalAttributeValueToken);
151152

152153
// cleanup

rules/CodeQuality/Rector/ClassMethod/AddInstanceofAssertForNullableInstanceRector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,7 @@ private function matchedNullableVariableNameToType(
202202
return null;
203203
}
204204

205-
$matchedNullableVariableNameToType = $variableNameToTypeCollection->matchByVariableName(
206-
$variableName
207-
);
205+
$matchedNullableVariableNameToType = $variableNameToTypeCollection->matchByVariableName($variableName);
208206

209207
// is the variable we're interested in?
210208
return null;

rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ private function createAnonymousClass(Arg $firstArg): Class_
201201
}
202202

203203
// must respect PHPStan anonymous internal naming \Rector\NodeTypeResolver\PHPStan\Scope\PHPStanNodeScopeResolver::ANONYMOUS_CLASS_START_REGEX
204-
return new Class_('AnonymousClass1234', [ // @phpstan-ignore argument.type
204+
return new Class_('AnonymousClass1234', [
205+
// @phpstan-ignore argument.type
205206
'extends' => $className,
206207
], [
207208
'startLine' => $firstArg->getStartLine(),

rules/CodeQuality/Rector/Class_/TypeWillReturnCallableArrowFunctionRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function refactor(Node $node): ?Class_
236236

237237
if (! $innerClosure->returnType instanceof Node) {
238238
$returnType = $parameterTypesAndReturnType->getReturnType();
239-
if ($returnType === null) {
239+
if (! $returnType instanceof Type) {
240240
return null;
241241
}
242242

rules/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ public function refactor(Node $node): ?Node
102102
$expr = $stmt->expr;
103103
$arrayChanged = false;
104104
if ($expr instanceof Yield_) {
105-
if (!$expr->value instanceof Array_) {
105+
if (! $expr->value instanceof Array_) {
106106
return null;
107107
}
108+
108109
$arrayChanged = $this->handleArray($expr->value);
109110
} elseif ($expr instanceof Array_) {
110111
$arrayChanged = $this->handleArray($expr);

0 commit comments

Comments
 (0)