mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
We were not running PHPStan on those files because of the strict types declaration. However, I decided it would be better not to have strict types on those files than not to run PHPStan issues. Not surprisingly, there were several issues. Some issues were impacting how user-friendly the library is.
15 lines
566 B
PHP
15 lines
566 B
PHP
--FILE--
|
|
<?php
|
|
|
|
require 'vendor/autoload.php';
|
|
|
|
exceptionMessage(static fn() => v::postalCode('BR')->assert('1057BV'));
|
|
exceptionMessage(static fn() => v::not(v::postalCode('NL'))->assert('1057BV'));
|
|
exceptionFullMessage(static fn() => v::postalCode('BR')->assert('1057BV'));
|
|
exceptionFullMessage(static fn() => v::not(v::postalCode('NL'))->assert('1057BV'));
|
|
?>
|
|
--EXPECT--
|
|
"1057BV" must be a valid postal code on "BR"
|
|
"1057BV" must not be a valid postal code on "NL"
|
|
- "1057BV" must be a valid postal code on "BR"
|
|
- "1057BV" must not be a valid postal code on "NL"
|