Skip to content

Commit fabcc85

Browse files
committed
[ci-review] Rector Rectify
1 parent 0f32100 commit fabcc85

File tree

49 files changed

+2
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2
-73
lines changed

bin/rector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public function loadIfExistsAndNotLoadedYet(string $filePath): void
105105
return;
106106
}
107107

108-
/** @var non-empty-string $realPath always string after file_exists() check */
109108
$realPath = realpath($filePath);
110109
$this->alreadyLoadedAutoloadFiles[] = $realPath;
111110

rules/CodeQuality/NodeManipulator/NamedArgsSorter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public function sortArgsToMatchReflectionParameters(
4545
usort(
4646
$toSortArgs,
4747
static function (Arg $arg1, Arg $arg2) use ($order): int {
48-
/** @var Identifier $argName1 */
4948
$argName1 = $arg1->name;
50-
/** @var Identifier $argName2 */
5149
$argName2 = $arg2->name;
5250

5351
$order1 = $order[$argName1->name] ?? PHP_INT_MAX;

rules/CodeQuality/Rector/Assign/CombinedAssignRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function refactor(Node $node): ?Node
4949
return null;
5050
}
5151

52-
/** @var BinaryOp $binaryNode */
5352
$binaryNode = $node->expr;
5453

5554
if (! $this->nodeComparator->areNodesEqual($node->var, $binaryNode->left)) {

rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public function refactor(Node $node): ?Node
5050
return null;
5151
}
5252

53-
/** @var FuncCall $innerFuncCall */
5453
$innerFuncCall = $firstArg->value;
5554

5655
if (! $this->isName($innerFuncCall, 'func_get_args')) {

rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function refactor(Node $node): ?Node
5757
return null;
5858
}
5959

60-
/** @var FuncCall $innerFunCall */
6160
$innerFunCall = $node->args[1]->value;
6261
if (! $this->isName($innerFunCall, 'array_values')) {
6362
return null;

rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function refactor(Node $node): ?Node
6262
return null;
6363
}
6464

65-
/** @var FuncCall $innerFuncCall */
6665
$innerFuncCall = $firstArg->value;
6766
if (! $this->isName($innerFuncCall, 'strtolower')) {
6867
return null;

rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ private function resolveArrayItem(FuncCall $funcCall): ?ArrayItem
113113
return null;
114114
}
115115

116-
/** @var Array_ $arrayNode */
117116
$arrayNode = $funcCall->args[1]->value;
118117
if (count($arrayNode->items) !== 1) {
119118
return null;

rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ private function resolveIdentical(Expr $expr, bool $isNegated, String_ $string):
235235
{
236236
/**
237237
* // compare === ''
238-
*
239-
* @var Identical|NotIdentical
240238
*/
241239
$identical = $isNegated
242240
? new Identical($expr, $string)

rules/CodeQuality/Rector/If_/SimplifyIfReturnBoolRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ private function resolveReturn(Expr $innerExpr, If_ $if, Return_ $return): ?Retu
220220
}
221221

222222
if ($this->valueResolver->isFalse($innerExpr)) {
223-
/** @var Expr $expr */
224223
$expr = $return->expr;
225224
if ($if->cond instanceof NotIdentical && $this->valueResolver->isTrue($expr)) {
226225
$if->cond = new Identical($if->cond->left, $if->cond->right);

rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public function refactor(Node $node): ?Node
108108
/** @var Variable $catchVar */
109109
$catchVar = $catch->var;
110110

111-
/** @var string $oldVariableName */
112111
$oldVariableName = (string) $this->getName($catchVar);
113112

114113
$typeShortName = $this->resolveVariableName($catch->types[0]);

0 commit comments

Comments
 (0)