Find the best Rector rule to solve your problem. Searching through 728 rules.

Found 1 rule. That's the one:

ConstraintOptionsToNamedArgumentsRector

Refactor Symfony constraints using array options to named arguments syntax for better readability and type safety.

 use Symfony\Component\Validator\Constraints\NotBlank;

-$constraint = new NotBlank(['message' => 'This field should not be blank.']);
+$constraint = new NotBlank(message: 'This field should not be blank.');