From 7ec6124adbbaa364f7f9a514b3d73d371bc3046d Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 8 Jul 2025 16:42:36 +0200 Subject: [PATCH] Fix code style issues --- ...onstraintOptionsToNamedArgumentsRector.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rules/Symfony73/Rector/Class_/ConstraintOptionsToNamedArgumentsRector.php b/rules/Symfony73/Rector/Class_/ConstraintOptionsToNamedArgumentsRector.php index d497ab6e..0e9d2c34 100644 --- a/rules/Symfony73/Rector/Class_/ConstraintOptionsToNamedArgumentsRector.php +++ b/rules/Symfony73/Rector/Class_/ConstraintOptionsToNamedArgumentsRector.php @@ -51,34 +51,34 @@ public function getNodeTypes(): array public function refactor(Node $node): ?Node { - if (!$node instanceof New_) { + if (! $node instanceof New_) { return null; } // Match classes starting with Symfony\Component\Validator\Constraints\ - if (!$node->class instanceof FullyQualified && !$node->class instanceof Name) { + if (! $node->class instanceof FullyQualified && ! $node->class instanceof Name) { return null; } $className = $this->getName($node->class); - if (!is_string($className)) { + if (! is_string($className)) { return null; } - if (!str_starts_with($className, 'Symfony\Component\Validator\Constraints\\')) { + if (! str_starts_with($className, 'Symfony\Component\Validator\Constraints\\')) { return null; } if ( - 0 === count($node->args) || - !$node->args[0] instanceof Arg || - !$node->args[0]->value instanceof Array_ + count($node->args) === 0 || + ! $node->args[0] instanceof Arg || + ! $node->args[0]->value instanceof Array_ ) { return null; } $argName = $node->args[0]->name; - if (null !== $argName && 'options' !== $argName->name) { + if ($argName !== null && $argName->name !== 'options') { return null; } @@ -86,12 +86,12 @@ public function refactor(Node $node): ?Node $namedArgs = []; foreach ($array->items as $item) { - if (!$item instanceof ArrayItem || null === $item->key) { + if (! $item instanceof ArrayItem || $item->key === null) { continue; } $keyValue = $this->valueResolver->getValue($item->key); - if (!is_string($keyValue)) { + if (! is_string($keyValue)) { continue; }