File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
rules/Symfony73/Rector/Class_ Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1515use PhpParser \Node \Name \FullyQualified ;
1616use Rector \PhpParser \Node \Value \ValueResolver ;
1717use Rector \Rector \AbstractRector ;
18+ use Rector \Symfony \Enum \SymfonyClass ;
1819use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
1920use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
2021
@@ -89,7 +90,7 @@ public function refactor(Node $node): ?Node
8990 }
9091
9192 $ args = $ node ->getArgs ();
92- if ($ className === ' Symfony\Component\Validator\Constraints\Collection '
93+ if ($ className === SymfonyClass:: SYMFONY_VALIDATOR_CONSTRAINTS_COLLECTION
9394 && count ($ args ) === 1
9495 && $ args [0 ]->value instanceof Array_) {
9596
Original file line number Diff line number Diff line change @@ -150,4 +150,9 @@ final class SymfonyClass
150150 * @var string
151151 */
152152 public const LOGOUT_SUCCESS_HANDLER = 'Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface ' ;
153+
154+ /**
155+ * @var string
156+ */
157+ public const SYMFONY_VALIDATOR_CONSTRAINTS_COLLECTION = 'Symfony\Component\Validator\Constraints\Collection ' ;
153158}
You can’t perform that action at this time.
0 commit comments