diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c15ad79..c95b562 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -525,6 +525,11 @@ parameters: count: 1 path: src/Validator/Constraints/FloatScale.php + - + message: "#^Method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\FrenchRna\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Validator/Constraints/FrenchRna.php + - message: "#^Public property `message` not marked as readonly\\.$#" count: 1 diff --git a/src/Validator/Constraints/FrenchRna.php b/src/Validator/Constraints/FrenchRna.php index 348d0f6..8f83073 100755 --- a/src/Validator/Constraints/FrenchRna.php +++ b/src/Validator/Constraints/FrenchRna.php @@ -15,4 +15,15 @@ class FrenchRna extends Constraint public const INVALID_FORMAT_ERROR = 'd125c480-3efd-42dd-9a59-6058fddd4fe4'; public string $message = 'The value {{ value }} is not a valid RNA identifier.'; + + public function __construct( + ?array $options = null, + ?string $message = null, + ?array $groups = null, + mixed $payload = null, + ) { + parent::__construct($options, $groups, $payload); + + $this->message = $message ?? $this->message; + } }