Skip to content

Commit 9959aaf

Browse files
authored
Clean up via rector / linting (#223)
1 parent ae7794f commit 9959aaf

10 files changed

+13
-13
lines changed

src/Rector/Class_/ReplaceExpectsMethodsInTestsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getNodeTypes(): array
7474
}
7575

7676
/**
77-
* @param Node\Stmt\Class_ $node
77+
* @param Class_ $node
7878
*/
7979
public function refactor(Node $node): ?Class_
8080
{

src/Rector/Expr/AppEnvironmentComparisonToParameterRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function refactor(Node $node): MethodCall|StaticCall|null
5151
return null;
5252
}
5353

54-
/** @var Node\Expr\MethodCall|Node\Expr\StaticCall|null $methodCall */
54+
/** @var MethodCall|StaticCall|null $methodCall */
5555
$methodCall = array_values(
5656
array_filter(
5757
[$node->left, $node->right],

src/Rector/FuncCall/FactoryFuncCallToStaticCallRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getNodeTypes(): array
5151
}
5252

5353
/**
54-
* @param Node\Expr\FuncCall $node
54+
* @param FuncCall $node
5555
*/
5656
public function refactor(Node $node): ?Node
5757
{

src/Rector/FuncCall/SleepFuncToSleepStaticCallRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getNodeTypes(): array
4141
}
4242

4343
/**
44-
* @param Node\Stmt\Expression $node
44+
* @param Expression $node
4545
*/
4646
public function refactor(Node $node): ?Node
4747
{

src/Rector/MethodCall/EloquentWhereRelationTypeHintingParameterRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private function changeClosureParamType(MethodCall|StaticCall $node): void
9595
['whereHasMorph', 'orWhereHasMorph', 'whereDoesntHaveMorph', 'orWhereDoesntHaveMorph']
9696
) ? 2 : 1;
9797

98-
/** @var Node\Expr\ArrowFunction|Node\Expr\Closure $closure */
98+
/** @var ArrowFunction|Closure $closure */
9999
$closure = $node->getArgs()[$position]
100100
->value;
101101

src/Rector/MethodCall/EloquentWhereTypeHintClosureParameterRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private function isWhereMethodWithClosureOrArrowFunction(MethodCall|StaticCall $
7676

7777
private function changeClosureParamType(MethodCall|StaticCall $node): void
7878
{
79-
/** @var Node\Expr\ArrowFunction|Node\Expr\Closure $closure */
79+
/** @var ArrowFunction|Closure $closure */
8080
$closure = $node->getArgs()[0]
8181
->value;
8282

src/Rector/MethodCall/RefactorBlueprintGeometryColumnsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function getNodeTypes(): array
3737
}
3838

3939
/**
40-
* @param Node\Expr\MethodCall $node
40+
* @param MethodCall $node
4141
*/
4242
public function refactor(Node $node): ?MethodCall
4343
{

src/Rector/MethodCall/ReplaceWithoutJobsEventsAndNotificationsWithFacadeFakeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getNodeTypes(): array
4343
}
4444

4545
/**
46-
* @param Node\Expr\MethodCall $node
46+
* @param MethodCall $node
4747
*/
4848
public function refactor(Node $node): ?StaticCall
4949
{

src/Rector/StaticCall/EloquentMagicMethodToQueryBuilderRector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ public function refactor(Node $node): ?Node
109109
return null;
110110
}
111111

112-
$queryMethodCall = $this->nodeFactory->createStaticCall($originalClassName, 'query');
112+
$staticCall = $this->nodeFactory->createStaticCall($originalClassName, 'query');
113113

114-
$newNode = $this->nodeFactory->createMethodCall($queryMethodCall, $methodName);
114+
$methodCall = $this->nodeFactory->createMethodCall($staticCall, $methodName);
115115
foreach ($node->args as $arg) {
116-
$newNode->args[] = $arg;
116+
$methodCall->args[] = $arg;
117117
}
118118

119-
return $newNode;
119+
return $methodCall;
120120
}
121121

122122
/**

src/Rector/StaticCall/ReplaceAssertTimesSendWithAssertSentTimesRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getNodeTypes(): array
3535
}
3636

3737
/**
38-
* @param Node\Expr\StaticCall $node
38+
* @param StaticCall $node
3939
*/
4040
public function refactor(Node $node): ?StaticCall
4141
{

0 commit comments

Comments
 (0)