diff --git a/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php index bd9efa56e58..ccdb5d520bd 100644 --- a/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php @@ -34,7 +34,7 @@ public function getNode(): string */ public function resolve(Node $node): ?string { - if (property_exists($node, 'namespacedName') && $node->namespacedName instanceof Name) { + if (/*property_exists($node, 'namespacedName') && */ $node->namespacedName instanceof Name) { return $node->namespacedName->toString(); } diff --git a/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php b/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php index a202d67a25e..58c90d2f464 100644 --- a/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php +++ b/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php @@ -103,7 +103,9 @@ public function refactor(Node $node): MethodCall | StaticCall | ClassMethod public function configure(array $configuration): void { $replacedArguments = $configuration[self::REPLACED_ARGUMENTS] ?? $configuration; + Assert::isArray($replacedArguments); Assert::allIsAOf($replacedArguments, ReplaceArgumentDefaultValue::class); + $this->replacedArguments = $replacedArguments; } } diff --git a/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php b/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php index bafd087d0a2..7bbeea8cf0a 100644 --- a/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php +++ b/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php @@ -16,6 +16,7 @@ final class ReplaceArgumentDefaultValue implements ReplaceArgumentDefaultValueIn final public const ANY_VALUE_BEFORE = '*ANY_VALUE_BEFORE*'; /** + * @param int<0, max> $position * @param mixed $valueBefore * @param mixed $valueAfter */