File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 "require" : {
2727 "php" : " ^7.2|^8.0" ,
2828 "symfony/validator" : " ^3.4|^4.3|^5.0" ,
29- "aeviiq/enum" : " ^2.0 || ^3.0" ,
30- "thecodingmachine/safe" : " ^1.3"
29+ "aeviiq/enum" : " ^2.0 || ^3.0"
3130 },
3231 "require-dev" : {
3332 "phpstan/phpstan" : " ^0.12.59" ,
3635 "phpunit/phpunit" : " ^8.5" ,
3736 "psalm/plugin-phpunit" : " ^0.16.1" ,
3837 "roave/security-advisories" : " dev-master" ,
39- "thecodingmachine/phpstan-safe-rule" : " ^1.0" ,
4038 "thecodingmachine/phpstan-strict-rules" : " ^0.12.1" ,
4139 "vimeo/psalm" : " ^4.11"
4240 },
Original file line number Diff line number Diff line change @@ -6,5 +6,4 @@ parameters:
66includes :
77 - vendor/phpstan/phpstan-strict-rules/rules.neon
88 - vendor/phpstan/phpstan-phpunit/extension.neon
9- - vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
109 - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
Original file line number Diff line number Diff line change @@ -10,4 +10,9 @@ final class Bsn extends Constraint
1010 * @var string
1111 */
1212 public $ message = 'This is not a valid BSN. ' ;
13+
14+ /**
15+ * @var string[]
16+ */
17+ public $ groups = [self ::DEFAULT_GROUP ];
1318}
Original file line number Diff line number Diff line change 22
33namespace Aeviiq \ValueObject ;
44
5- use function Safe \ preg_replace ;
5+ use UnexpectedValueException ;
66
77final class Normalizer
88{
99 public static function removeWhitespace (string $ value ): string
1010 {
11- /** @var string $replaced */
1211 $ replaced = preg_replace ('/\s+/ ' , '' , $ value );
1312
13+ if (!is_string ($ replaced )) {
14+ throw new UnexpectedValueException (sprintf ('Could not remove whitespaces from string "%s". ' , $ value ));
15+ }
16+
1417 return $ replaced ;
1518 }
1619}
Original file line number Diff line number Diff line change 99use Symfony \Component \Validator \Validation ;
1010use Symfony \Component \Validator \Validator \ValidatorInterface ;
1111
12- use function Safe \sprintf ;
13-
1412final class Validator
1513{
1614 /**
You can’t perform that action at this time.
0 commit comments