Skip to content

Commit dd2e003

Browse files
committed
[ci-review] Rector Rectify
1 parent b5d9fec commit dd2e003

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

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/FileSystem/FilePathHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private function normalizePathParts(array $pathParts, string $scheme): array
100100
continue;
101101
}
102102

103-
if (! \str_ends_with($removedPart, '.phar')) {
103+
if (! \str_ends_with((string) $removedPart, '.phar')) {
104104
continue;
105105
}
106106

src/Parallel/Application/ParallelFileProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function process(
108108

109109
$serverAddress = $tcpServer->getAddress();
110110

111-
$serverPort = parse_url($serverAddress, PHP_URL_PORT);
111+
$serverPort = parse_url((string) $serverAddress, PHP_URL_PORT);
112112

113113
$systemErrorsCount = 0;
114114
$reachedSystemErrorsCountLimit = false;

0 commit comments

Comments
 (0)