Skip to content

Commit 490334c

Browse files
committed
More tasteful identifiers in SortWithoutEffectRule
1 parent c65fd9b commit 490334c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Rules/Functions/SortWithoutEffectRule.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function processNode(Node $node, Scope $scope): array
118118
self::REASON_MESSAGES[$reason],
119119
$arrayType->describe(VerbosityLevel::value()),
120120
$functionName,
121-
))->identifier(sprintf('%s.%s', $functionName, $reason));
121+
))->identifier(sprintf('sortArray.%s', $reason));
122122

123123
if ($this->treatPhpDocTypesAsCertain && $this->treatPhpDocTypesAsCertainTip) {
124124
$nativeArrayType = $scope->getNativeType($args[0]->value);
@@ -156,7 +156,7 @@ private function findNoEffectReason(Type $arrayType, bool $keyPreserving, bool $
156156
}
157157

158158
if (IntegerRangeType::fromInterval(0, 1)->isSuperTypeOf($arrayType->getArraySize())->yes()) {
159-
return 'singleElement';
159+
return 'noop';
160160
}
161161

162162
return null;

0 commit comments

Comments
 (0)