Skip to content

Commit 3fcf153

Browse files
committed
[ci-review] Rector Rectify
1 parent d69af58 commit 3fcf153

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

rules/Php80/NodeResolver/StrFalseComparisonResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function resolve(Identical | NotIdentical | Equal | NotEqual $expr, array
3333
if (! $this->nodeNameResolver->isNames($expr->right, $oldStrFuncNames)) {
3434
return null;
3535
}
36+
3637
return $expr->right;
3738
}
3839

@@ -44,6 +45,7 @@ public function resolve(Identical | NotIdentical | Equal | NotEqual $expr, array
4445
if (! $this->nodeNameResolver->isNames($expr->left, $oldStrFuncNames)) {
4546
return null;
4647
}
48+
4749
return $expr->left;
4850
}
4951

rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function shouldSkipClassMethod(ClassMethod $classMethod): bool
135135
{
136136
// edge case in nette framework
137137
$methodName = $this->getName($classMethod->name);
138-
if (str_starts_with($methodName, 'createComponent')) {
138+
if (str_starts_with((string) $methodName, 'createComponent')) {
139139
return true;
140140
}
141141

rules/TypeDeclaration/Rector/ClassMethod/AddReturnDocblockForScalarArrayFromAssignsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private function resolveScalarArrayTypeForVariable(ClassMethod|Function_ $node,
212212
continue;
213213
}
214214

215-
if ($arrayDimFetch->dim !== null) {
215+
if ($arrayDimFetch->dim instanceof Expr) {
216216
continue;
217217
}
218218

src/VendorLocker/NodeVendorLocker/ClassMethodReturnTypeOverrideGuard.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ private function isReturnTypeChangeAllowed(ClassMethod $classMethod, Scope $scop
9191
* - both not in /vendor/ -> allowed
9292
*/
9393
$currentClassReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
94-
/** @var string $currentFileName */
9594
$currentFileName = $currentClassReflection->getFileName();
9695

9796
// child (current)

0 commit comments

Comments
 (0)