diff --git a/composer.json b/composer.json index e0b1f1d9..89cd597e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,6 @@ "symfony/polyfill-mbstring": "^1.2" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", "egulias/email-validator": "^2.1", "malukenho/docheader": "^0.1", "mikey179/vfsstream": "^1.6", @@ -28,7 +27,7 @@ "phpstan/phpstan-deprecation-rules": "^0.11.0", "phpstan/phpstan-phpunit": "^0.11.0", "phpunit/phpunit": "^7.5", - "respect/coding-standard": "^1.0", + "respect/coding-standard": "^2.1", "squizlabs/php_codesniffer": "^3.5", "symfony/validator": "^3.0||^4.0", "zendframework/zend-validator": "^2.1" diff --git a/library/Exceptions/NestedValidationException.php b/library/Exceptions/NestedValidationException.php index 78066259..25ab54fd 100644 --- a/library/Exceptions/NestedValidationException.php +++ b/library/Exceptions/NestedValidationException.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Exceptions; use IteratorAggregate; use RecursiveIteratorIterator; use SplObjectStorage; + use function array_shift; use function count; use function current; @@ -24,6 +25,7 @@ use function is_array; use function spl_object_hash; use function sprintf; use function str_repeat; + use const PHP_EOL; /** diff --git a/library/Exceptions/ValidationException.php b/library/Exceptions/ValidationException.php index 079c7cca..31a6a959 100644 --- a/library/Exceptions/ValidationException.php +++ b/library/Exceptions/ValidationException.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Exceptions; use InvalidArgumentException; use Respect\Validation\Message\Formatter; + use function key; /** diff --git a/library/Factory.php b/library/Factory.php index 6f562e9f..feaccc61 100644 --- a/library/Factory.php +++ b/library/Factory.php @@ -22,6 +22,7 @@ use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Message\Formatter; use Respect\Validation\Message\ParameterStringifier; use Respect\Validation\Message\Stringifier\KeepOriginalStringName; + use function lcfirst; use function sprintf; use function trim; @@ -132,7 +133,7 @@ final class Factory try { /** @var Validatable $rule */ $rule = $this - ->createReflectionClass($namespace.'\\'.ucfirst($ruleName), Validatable::class) + ->createReflectionClass($namespace . '\\' . ucfirst($ruleName), Validatable::class) ->newInstanceArgs($arguments); return $rule; @@ -165,7 +166,7 @@ final class Factory foreach ($this->exceptionsNamespaces as $namespace) { try { return $this->createValidationException( - $namespace.'\\'.$ruleName.'Exception', + $namespace . '\\' . $ruleName . 'Exception', $id, $input, $params, diff --git a/library/Helpers/CanCompareValues.php b/library/Helpers/CanCompareValues.php index 99bcfbca..ba24efc3 100644 --- a/library/Helpers/CanCompareValues.php +++ b/library/Helpers/CanCompareValues.php @@ -17,6 +17,7 @@ use Countable; use DateTimeImmutable; use DateTimeInterface; use Throwable; + use function is_numeric; use function is_scalar; use function is_string; diff --git a/library/Helpers/CanValidateIterable.php b/library/Helpers/CanValidateIterable.php index e406a5ed..3730b652 100644 --- a/library/Helpers/CanValidateIterable.php +++ b/library/Helpers/CanValidateIterable.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Helpers; use stdClass; use Traversable; + use function is_array; /** diff --git a/library/Helpers/Subdivisions.php b/library/Helpers/Subdivisions.php index ae6f575f..390d7963 100644 --- a/library/Helpers/Subdivisions.php +++ b/library/Helpers/Subdivisions.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Helpers; use Respect\Validation\Exceptions\ComponentException; + use function file_exists; use function file_get_contents; use function json_decode; @@ -28,7 +29,7 @@ final class Subdivisions public function __construct(string $countryCode) { - $filename = __DIR__.'/../../data/iso_3166-2/'.$countryCode.'.json'; + $filename = __DIR__ . '/../../data/iso_3166-2/' . $countryCode . '.json'; if (!file_exists($filename)) { throw new ComponentException(sprintf('"%s" is not a supported country code', $countryCode)); } diff --git a/library/Message/Stringifier/KeepOriginalStringName.php b/library/Message/Stringifier/KeepOriginalStringName.php index de61135e..44c835c9 100644 --- a/library/Message/Stringifier/KeepOriginalStringName.php +++ b/library/Message/Stringifier/KeepOriginalStringName.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Message\Stringifier; use Respect\Validation\Message\ParameterStringifier; + use function is_string; use function Respect\Stringifier\stringify; diff --git a/library/Rules/AbstractAge.php b/library/Rules/AbstractAge.php index 69908649..a53d7f24 100644 --- a/library/Rules/AbstractAge.php +++ b/library/Rules/AbstractAge.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Helpers\CanValidateDateTime; + use function date; use function date_parse_from_format; use function is_scalar; diff --git a/library/Rules/AbstractComposite.php b/library/Rules/AbstractComposite.php index f6e9ec33..b46dbba8 100644 --- a/library/Rules/AbstractComposite.php +++ b/library/Rules/AbstractComposite.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\NestedValidationException; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Validatable; + use function array_filter; use function array_map; diff --git a/library/Rules/AbstractRelated.php b/library/Rules/AbstractRelated.php index 7653b438..c5fe59c1 100644 --- a/library/Rules/AbstractRelated.php +++ b/library/Rules/AbstractRelated.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\NestedValidationException; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Validatable; + use function is_scalar; /** diff --git a/library/Rules/AbstractSearcher.php b/library/Rules/AbstractSearcher.php index c333dea2..e97902c6 100644 --- a/library/Rules/AbstractSearcher.php +++ b/library/Rules/AbstractSearcher.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Helpers\CanValidateUndefined; + use function in_array; /** diff --git a/library/Rules/AllOf.php b/library/Rules/AllOf.php index ede12547..dd9038da 100644 --- a/library/Rules/AllOf.php +++ b/library/Rules/AllOf.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\AllOfException; + use function count; /** diff --git a/library/Rules/AnyOf.php b/library/Rules/AnyOf.php index 082fff1c..47941a4d 100644 --- a/library/Rules/AnyOf.php +++ b/library/Rules/AnyOf.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\AnyOfException; use Respect\Validation\Exceptions\ValidationException; + use function count; /** diff --git a/library/Rules/ArrayVal.php b/library/Rules/ArrayVal.php index 9121c42b..c06c200e 100644 --- a/library/Rules/ArrayVal.php +++ b/library/Rules/ArrayVal.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use ArrayAccess; use SimpleXMLElement; + use function is_array; /** diff --git a/library/Rules/Attribute.php b/library/Rules/Attribute.php index 34f061ce..2d74df13 100644 --- a/library/Rules/Attribute.php +++ b/library/Rules/Attribute.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use ReflectionException; use ReflectionProperty; use Respect\Validation\Validatable; + use function is_object; use function property_exists; diff --git a/library/Rules/Base.php b/library/Rules/Base.php index c735ab3c..cc8c606c 100644 --- a/library/Rules/Base.php +++ b/library/Rules/Base.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function is_null; use function mb_strlen; use function mb_substr; @@ -62,6 +63,6 @@ final class Base extends AbstractRule { $valid = mb_substr($this->chars, 0, $this->base); - return (bool) preg_match('@^['.$valid.']+$@', (string) $input); + return (bool) preg_match('@^[' . $valid . ']+$@', (string) $input); } } diff --git a/library/Rules/BoolVal.php b/library/Rules/BoolVal.php index ee14d6c8..cda1fcfb 100644 --- a/library/Rules/BoolVal.php +++ b/library/Rules/BoolVal.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use function filter_var; use function is_bool; + use const FILTER_NULL_ON_FAILURE; use const FILTER_VALIDATE_BOOLEAN; diff --git a/library/Rules/Call.php b/library/Rules/Call.php index 55586472..4396744f 100644 --- a/library/Rules/Call.php +++ b/library/Rules/Call.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Validatable; use Throwable; + use function call_user_func; use function restore_error_handler; use function set_error_handler; diff --git a/library/Rules/Charset.php b/library/Rules/Charset.php index cbf86e05..d8529b93 100644 --- a/library/Rules/Charset.php +++ b/library/Rules/Charset.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_diff; use function in_array; use function mb_detect_encoding; diff --git a/library/Rules/Countable.php b/library/Rules/Countable.php index cf380aeb..94f4cb17 100644 --- a/library/Rules/Countable.php +++ b/library/Rules/Countable.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Countable as CountableInterface; + use function is_array; /** diff --git a/library/Rules/CountryCode.php b/library/Rules/CountryCode.php index 2ca4b71b..7b3bfa6d 100644 --- a/library/Rules/CountryCode.php +++ b/library/Rules/CountryCode.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_column; use function array_keys; use function implode; diff --git a/library/Rules/Cpf.php b/library/Rules/Cpf.php index c540d727..22f0d079 100644 --- a/library/Rules/Cpf.php +++ b/library/Rules/Cpf.php @@ -37,7 +37,7 @@ final class Cpf extends AbstractRule // Code ported from jsfromhell.com $c = preg_replace('/\D/', '', $input); - if (mb_strlen($c) != 11 || preg_match('/^'.$c[0].'{11}$/', $c) || $c === '01234567890') { + if (mb_strlen($c) != 11 || preg_match('/^' . $c[0] . '{11}$/', $c) || $c === '01234567890') { return false; } diff --git a/library/Rules/CreditCard.php b/library/Rules/CreditCard.php index 0e53c6e4..10209e11 100644 --- a/library/Rules/CreditCard.php +++ b/library/Rules/CreditCard.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_keys; use function implode; use function is_scalar; diff --git a/library/Rules/Date.php b/library/Rules/Date.php index 25fd93f2..7bad2b4c 100644 --- a/library/Rules/Date.php +++ b/library/Rules/Date.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Helpers\CanValidateDateTime; + use function date; use function is_scalar; use function preg_match; diff --git a/library/Rules/DateTime.php b/library/Rules/DateTime.php index e213a638..b0a8ee6c 100644 --- a/library/Rules/DateTime.php +++ b/library/Rules/DateTime.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use DateTimeInterface; use Respect\Validation\Helpers\CanValidateDateTime; + use function date; use function is_scalar; use function strtotime; diff --git a/library/Rules/Directory.php b/library/Rules/Directory.php index 4e28acbb..52a6098f 100644 --- a/library/Rules/Directory.php +++ b/library/Rules/Directory.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Directory as NativeDirectory; use SplFileInfo; + use function is_dir; use function is_scalar; diff --git a/library/Rules/Domain.php b/library/Rules/Domain.php index e5c82325..6100ac0f 100644 --- a/library/Rules/Domain.php +++ b/library/Rules/Domain.php @@ -17,6 +17,7 @@ use Respect\Validation\Exceptions\DomainException; use Respect\Validation\Exceptions\NestedValidationException; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Validatable; + use function array_merge; use function array_pop; use function count; diff --git a/library/Rules/Email.php b/library/Rules/Email.php index f9007ada..8ef7d702 100644 --- a/library/Rules/Email.php +++ b/library/Rules/Email.php @@ -15,9 +15,11 @@ namespace Respect\Validation\Rules; use Egulias\EmailValidator\EmailValidator; use Egulias\EmailValidator\Validation\RFCValidation; + use function class_exists; use function filter_var; use function is_string; + use const FILTER_VALIDATE_EMAIL; /** diff --git a/library/Rules/Even.php b/library/Rules/Even.php index 2a9f1acf..b1deaf33 100644 --- a/library/Rules/Even.php +++ b/library/Rules/Even.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use function filter_var; + use const FILTER_VALIDATE_INT; /** diff --git a/library/Rules/Executable.php b/library/Rules/Executable.php index 981a61fd..c52476b9 100644 --- a/library/Rules/Executable.php +++ b/library/Rules/Executable.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_executable; use function is_scalar; diff --git a/library/Rules/Exists.php b/library/Rules/Exists.php index f88d27ce..dcb5879a 100644 --- a/library/Rules/Exists.php +++ b/library/Rules/Exists.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function file_exists; use function is_string; diff --git a/library/Rules/Extension.php b/library/Rules/Extension.php index 4b59aa24..31631e8c 100644 --- a/library/Rules/Extension.php +++ b/library/Rules/Extension.php @@ -14,8 +14,10 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_string; use function pathinfo; + use const PATHINFO_EXTENSION; /** diff --git a/library/Rules/FalseVal.php b/library/Rules/FalseVal.php index b1404b20..c935c572 100644 --- a/library/Rules/FalseVal.php +++ b/library/Rules/FalseVal.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use function filter_var; + use const FILTER_NULL_ON_FAILURE; use const FILTER_VALIDATE_BOOLEAN; diff --git a/library/Rules/File.php b/library/Rules/File.php index 8dc0c5e7..cd11df07 100644 --- a/library/Rules/File.php +++ b/library/Rules/File.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_file; use function is_string; diff --git a/library/Rules/FilterVar.php b/library/Rules/FilterVar.php index 286f7245..b46c9d89 100644 --- a/library/Rules/FilterVar.php +++ b/library/Rules/FilterVar.php @@ -14,7 +14,9 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function in_array; + use const FILTER_VALIDATE_BOOLEAN; use const FILTER_VALIDATE_EMAIL; use const FILTER_VALIDATE_FLOAT; diff --git a/library/Rules/FloatVal.php b/library/Rules/FloatVal.php index 17949932..8551499f 100644 --- a/library/Rules/FloatVal.php +++ b/library/Rules/FloatVal.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use function filter_var; use function is_float; + use const FILTER_VALIDATE_FLOAT; /** diff --git a/library/Rules/Iban.php b/library/Rules/Iban.php index 51c962c6..c4e8042c 100644 --- a/library/Rules/Iban.php +++ b/library/Rules/Iban.php @@ -125,7 +125,7 @@ final class Iban extends AbstractRule $checkDigits = substr($iban, 2, 2); $bban = substr($iban, 4); - $rearranged = $bban.$countryCode.$checkDigits; + $rearranged = $bban . $countryCode . $checkDigits; return bcmod($this->convertToInteger($rearranged), '97') === '1'; } diff --git a/library/Rules/Image.php b/library/Rules/Image.php index 0bce3601..fb737927 100644 --- a/library/Rules/Image.php +++ b/library/Rules/Image.php @@ -15,9 +15,11 @@ namespace Respect\Validation\Rules; use finfo; use SplFileInfo; + use function is_file; use function is_string; use function mb_strpos; + use const FILEINFO_MIME_TYPE; /** diff --git a/library/Rules/Ip.php b/library/Rules/Ip.php index 9a4253d5..f990e750 100644 --- a/library/Rules/Ip.php +++ b/library/Rules/Ip.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function bccomp; use function explode; use function filter_var; @@ -26,6 +27,7 @@ use function sprintf; use function str_repeat; use function str_replace; use function strtr; + use const FILTER_VALIDATE_IP; /** @@ -104,11 +106,11 @@ final class Ip extends AbstractRule private function createRange(): ?string { if ($this->endAddress && $this->endAddress) { - return $this->startAddress.'-'.$this->endAddress; + return $this->startAddress . '-' . $this->endAddress; } if ($this->startAddress && $this->mask) { - return $this->startAddress.'/'.long2ip((int) $this->mask); + return $this->startAddress . '/' . long2ip((int) $this->mask); } return null; @@ -151,7 +153,7 @@ final class Ip extends AbstractRule private function fillAddress(string $address, string $fill = '*'): string { - return $address.str_repeat('.'.$fill, 3 - mb_substr_count($address, '.')); + return $address . str_repeat('.' . $fill, 3 - mb_substr_count($address, '.')); } private function parseRangeUsingWildcards(string $input): void diff --git a/library/Rules/Json.php b/library/Rules/Json.php index 6320cf11..1dc5a9e1 100644 --- a/library/Rules/Json.php +++ b/library/Rules/Json.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use function is_string; use function json_decode; use function json_last_error; + use const JSON_ERROR_NONE; /** diff --git a/library/Rules/Key.php b/library/Rules/Key.php index 9fd17c22..59d6714f 100644 --- a/library/Rules/Key.php +++ b/library/Rules/Key.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Validatable; + use function array_key_exists; use function is_array; use function is_scalar; diff --git a/library/Rules/KeyNested.php b/library/Rules/KeyNested.php index 6b90bd84..c670b0d4 100644 --- a/library/Rules/KeyNested.php +++ b/library/Rules/KeyNested.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use ArrayAccess; use Respect\Validation\Exceptions\ComponentException; + use function array_key_exists; use function array_shift; use function explode; diff --git a/library/Rules/KeySet.php b/library/Rules/KeySet.php index 845ed876..e50fd4d4 100644 --- a/library/Rules/KeySet.php +++ b/library/Rules/KeySet.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Validatable; + use function array_key_exists; use function array_map; use function count; @@ -97,8 +98,7 @@ final class KeySet extends AbstractWrapper return $validatable; } - if (!$validatable instanceof AllOf - || count($validatable->getRules()) !== 1) { + if (!$validatable instanceof AllOf || count($validatable->getRules()) !== 1) { throw new ComponentException('KeySet rule accepts only Key rules'); } diff --git a/library/Rules/KeyValue.php b/library/Rules/KeyValue.php index 7bbdbf3e..7bdf7071 100644 --- a/library/Rules/KeyValue.php +++ b/library/Rules/KeyValue.php @@ -17,6 +17,7 @@ use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Factory; use Respect\Validation\Validatable; + use function array_keys; use function in_array; diff --git a/library/Rules/LanguageCode.php b/library/Rules/LanguageCode.php index a6e202c4..31f8880d 100644 --- a/library/Rules/LanguageCode.php +++ b/library/Rules/LanguageCode.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_column; use function array_filter; use function array_search; diff --git a/library/Rules/LeapDate.php b/library/Rules/LeapDate.php index 54b0dd14..cf47097e 100644 --- a/library/Rules/LeapDate.php +++ b/library/Rules/LeapDate.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use DateTimeImmutable; use DateTimeInterface; + use function is_scalar; /** diff --git a/library/Rules/LeapYear.php b/library/Rules/LeapYear.php index db0ae441..b40fa550 100644 --- a/library/Rules/LeapYear.php +++ b/library/Rules/LeapYear.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use DateTimeInterface; + use function date; use function is_numeric; use function is_scalar; diff --git a/library/Rules/Length.php b/library/Rules/Length.php index 0d065898..79b70f92 100644 --- a/library/Rules/Length.php +++ b/library/Rules/Length.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Countable as CountableInterface; use Respect\Validation\Exceptions\ComponentException; + use function count; use function get_object_vars; use function is_array; diff --git a/library/Rules/Mimetype.php b/library/Rules/Mimetype.php index 4cbb1d8c..62d40a4d 100644 --- a/library/Rules/Mimetype.php +++ b/library/Rules/Mimetype.php @@ -15,8 +15,10 @@ namespace Respect\Validation\Rules; use finfo; use SplFileInfo; + use function is_file; use function is_string; + use const FILEINFO_MIME_TYPE; /** diff --git a/library/Rules/Nif.php b/library/Rules/Nif.php index 02879910..62b1f683 100644 --- a/library/Rules/Nif.php +++ b/library/Rules/Nif.php @@ -65,11 +65,11 @@ final class Nif extends AbstractRule private function validateNie(string $prefix, string $number, string $control): bool { if ($prefix === 'Y') { - return $this->validateDni((int) ('1'.$number), $control); + return $this->validateDni((int) ('1' . $number), $control); } if ($prefix === 'Z') { - return $this->validateDni((int) ('2'.$number), $control); + return $this->validateDni((int) ('2' . $number), $control); } return $this->validateDni((int) $number, $control); diff --git a/library/Rules/No.php b/library/Rules/No.php index bb4e7692..d7fca934 100644 --- a/library/Rules/No.php +++ b/library/Rules/No.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use function nl_langinfo; + use const NOEXPR; /** @@ -30,6 +31,6 @@ final class No extends AbstractEnvelope $pattern = nl_langinfo(NOEXPR); } - parent::__construct(new Regex('/'.$pattern.'/i')); + parent::__construct(new Regex('/' . $pattern . '/i')); } } diff --git a/library/Rules/NoneOf.php b/library/Rules/NoneOf.php index 3a5223bb..e18b33d0 100644 --- a/library/Rules/NoneOf.php +++ b/library/Rules/NoneOf.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\NoneOfException; + use function count; /** diff --git a/library/Rules/Not.php b/library/Rules/Not.php index 8dfbd979..08ecd183 100644 --- a/library/Rules/Not.php +++ b/library/Rules/Not.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Validatable; + use function array_shift; use function count; use function current; diff --git a/library/Rules/NotBlank.php b/library/Rules/NotBlank.php index 889dcbcc..6f48d589 100644 --- a/library/Rules/NotBlank.php +++ b/library/Rules/NotBlank.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use stdClass; + use function array_filter; use function is_array; use function is_numeric; diff --git a/library/Rules/NotEmoji.php b/library/Rules/NotEmoji.php index 83b4d6f2..036720fc 100644 --- a/library/Rules/NotEmoji.php +++ b/library/Rules/NotEmoji.php @@ -205,6 +205,6 @@ final class NotEmoji extends AbstractRule return false; } - return preg_match('/'.implode('|', self::RANGES).'/mu', $input) === 0; + return preg_match('/' . implode('|', self::RANGES) . '/mu', $input) === 0; } } diff --git a/library/Rules/Odd.php b/library/Rules/Odd.php index 0285aa9a..8983727c 100644 --- a/library/Rules/Odd.php +++ b/library/Rules/Odd.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use function filter_var; use function is_numeric; + use const FILTER_VALIDATE_INT; /** diff --git a/library/Rules/OneOf.php b/library/Rules/OneOf.php index 45a57155..e31c66a2 100644 --- a/library/Rules/OneOf.php +++ b/library/Rules/OneOf.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\OneOfException; use Respect\Validation\Exceptions\ValidationException; + use function array_shift; use function count; diff --git a/library/Rules/Pis.php b/library/Rules/Pis.php index d3c4b13c..a7a6c575 100644 --- a/library/Rules/Pis.php +++ b/library/Rules/Pis.php @@ -37,7 +37,7 @@ final class Pis extends AbstractRule } $digits = preg_replace('/\D/', '', $input); - if (mb_strlen($digits) != 11 || preg_match('/^'.$digits[0].'{11}$/', $digits)) { + if (mb_strlen($digits) != 11 || preg_match('/^' . $digits[0] . '{11}$/', $digits)) { return false; } diff --git a/library/Rules/PostalCode.php b/library/Rules/PostalCode.php index a9a31179..9db9d8ef 100644 --- a/library/Rules/PostalCode.php +++ b/library/Rules/PostalCode.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function sprintf; /** diff --git a/library/Rules/Readable.php b/library/Rules/Readable.php index c5cc7b3b..f9d48687 100644 --- a/library/Rules/Readable.php +++ b/library/Rules/Readable.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_readable; use function is_string; diff --git a/library/Rules/Sf.php b/library/Rules/Sf.php index 1cdf2d60..15b406d4 100644 --- a/library/Rules/Sf.php +++ b/library/Rules/Sf.php @@ -19,6 +19,7 @@ use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Validator\ValidatorInterface; + use function trim; /** diff --git a/library/Rules/Size.php b/library/Rules/Size.php index b019d791..79fb51a5 100644 --- a/library/Rules/Size.php +++ b/library/Rules/Size.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use SplFileInfo; + use function filesize; use function is_numeric; use function is_string; @@ -87,7 +88,7 @@ final class Size extends AbstractRule $value = $size; $units = ['b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb']; foreach ($units as $exponent => $unit) { - if (!preg_match('/^(\d+(.\d+)?)'.$unit.'$/i', (string) $size, $matches)) { + if (!preg_match('/^(\d+(.\d+)?)' . $unit . '$/i', (string) $size, $matches)) { continue; } $value = $matches[1] * 1024 ** $exponent; diff --git a/library/Rules/Sorted.php b/library/Rules/Sorted.php index 7d37fe83..354629a1 100644 --- a/library/Rules/Sorted.php +++ b/library/Rules/Sorted.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_values; use function count; use function is_array; diff --git a/library/Rules/SubdivisionCode.php b/library/Rules/SubdivisionCode.php index c1408f65..ad6e36cf 100644 --- a/library/Rules/SubdivisionCode.php +++ b/library/Rules/SubdivisionCode.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Helpers\Subdivisions; + use function array_keys; /** diff --git a/library/Rules/SymbolicLink.php b/library/Rules/SymbolicLink.php index 10defdae..d5656154 100644 --- a/library/Rules/SymbolicLink.php +++ b/library/Rules/SymbolicLink.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_link; use function is_string; diff --git a/library/Rules/Time.php b/library/Rules/Time.php index 7a5b7783..854c38de 100644 --- a/library/Rules/Time.php +++ b/library/Rules/Time.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Helpers\CanValidateDateTime; + use function date; use function is_scalar; use function preg_match; diff --git a/library/Rules/TrueVal.php b/library/Rules/TrueVal.php index 1e4d6e8d..669dc0b5 100644 --- a/library/Rules/TrueVal.php +++ b/library/Rules/TrueVal.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use function filter_var; + use const FILTER_NULL_ON_FAILURE; use const FILTER_VALIDATE_BOOLEAN; diff --git a/library/Rules/Type.php b/library/Rules/Type.php index ea1443c6..e426d576 100644 --- a/library/Rules/Type.php +++ b/library/Rules/Type.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_keys; use function gettype; use function implode; diff --git a/library/Rules/Unique.php b/library/Rules/Unique.php index 3057ae3d..98f6ad37 100644 --- a/library/Rules/Unique.php +++ b/library/Rules/Unique.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use function array_unique; use function is_array; + use const SORT_REGULAR; /** diff --git a/library/Rules/Uploaded.php b/library/Rules/Uploaded.php index 679ff96f..a9b0fd0b 100644 --- a/library/Rules/Uploaded.php +++ b/library/Rules/Uploaded.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_scalar; use function is_uploaded_file; diff --git a/library/Rules/Url.php b/library/Rules/Url.php index d7eccf62..9601000c 100644 --- a/library/Rules/Url.php +++ b/library/Rules/Url.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use const FILTER_VALIDATE_URL; /** diff --git a/library/Rules/Uuid.php b/library/Rules/Uuid.php index ed5d0a6c..5b905876 100644 --- a/library/Rules/Uuid.php +++ b/library/Rules/Uuid.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function is_string; use function preg_match; use function sprintf; diff --git a/library/Rules/VideoUrl.php b/library/Rules/VideoUrl.php index bf0e9eff..69d7227f 100644 --- a/library/Rules/VideoUrl.php +++ b/library/Rules/VideoUrl.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; + use function array_keys; use function is_string; use function mb_strtolower; diff --git a/library/Rules/Writable.php b/library/Rules/Writable.php index 6a37f157..ae84deaf 100644 --- a/library/Rules/Writable.php +++ b/library/Rules/Writable.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use SplFileInfo; + use function is_string; use function is_writable; diff --git a/library/Rules/Yes.php b/library/Rules/Yes.php index 37c00993..3e207d74 100644 --- a/library/Rules/Yes.php +++ b/library/Rules/Yes.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use function is_string; use function nl_langinfo; use function preg_match; + use const YESEXPR; /** @@ -54,7 +55,7 @@ final class Yes extends AbstractRule private function getPattern(): string { if ($this->useLocale) { - return '/'.nl_langinfo(YESEXPR).'/'; + return '/' . nl_langinfo(YESEXPR) . '/'; } return '/^y(eah?|ep|es)?$/i'; diff --git a/library/Rules/Zend.php b/library/Rules/Zend.php index 8cbb969d..de67005d 100644 --- a/library/Rules/Zend.php +++ b/library/Rules/Zend.php @@ -19,6 +19,7 @@ use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Exceptions\ZendException; use Throwable; use Zend\Validator\ValidatorInterface; + use function array_map; use function current; use function is_string; @@ -121,7 +122,7 @@ final class Zend extends AbstractRule throw new ComponentException('The given argument is not a valid Zend Validator'); } - $className = stripos($validator, 'Zend') === false ? 'Zend\\Validator\\'.$validator : '\\'.$validator; + $className = stripos($validator, 'Zend') === false ? 'Zend\\Validator\\' . $validator : '\\' . $validator; try { $reflection = new ReflectionClass($className); diff --git a/library/Validator.php b/library/Validator.php index 9c1a8427..285958a0 100644 --- a/library/Validator.php +++ b/library/Validator.php @@ -20,6 +20,7 @@ use Respect\Validation\Rules\AllOf; use Respect\Validation\Rules\Key; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Validator\ValidatorInterface; + use function count; /** diff --git a/tests/integration/assert-with-attributes.phpt b/tests/integration/assert-with-attributes.phpt index 2f3c11b7..99c0a1a0 100644 --- a/tests/integration/assert-with-attributes.phpt +++ b/tests/integration/assert-with-attributes.phpt @@ -49,7 +49,7 @@ try { ->setName('the given data') ->assert($object); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/assert-with-keys.phpt b/tests/integration/assert-with-keys.phpt index 4e4f8dbf..6639c083 100644 --- a/tests/integration/assert-with-keys.phpt +++ b/tests/integration/assert-with-keys.phpt @@ -42,7 +42,7 @@ try { ], ]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/issue-1033.phpt b/tests/integration/issue-1033.phpt index 57fa3637..430cb1bd 100644 --- a/tests/integration/issue-1033.phpt +++ b/tests/integration/issue-1033.phpt @@ -21,7 +21,7 @@ use Respect\Validation\Validator as v; try { v::each(v::equals(1))->assert(['A', 'B', 'B']); } catch (AllOfException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/issue-1289.phpt b/tests/integration/issue-1289.phpt index 9b51f6bd..55716ab0 100644 --- a/tests/integration/issue-1289.phpt +++ b/tests/integration/issue-1289.phpt @@ -58,7 +58,7 @@ $input = [ try { $validator->check($input); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { diff --git a/tests/integration/issue-179.phpt b/tests/integration/issue-179.phpt index a9088227..08d5f3c4 100644 --- a/tests/integration/issue-179.phpt +++ b/tests/integration/issue-179.phpt @@ -26,7 +26,7 @@ $validator->key('schema', v::stringType()); try { $validator->assert($config); } catch (AllOfException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/issue-796.phpt b/tests/integration/issue-796.phpt index 32c6416e..e4e89474 100644 --- a/tests/integration/issue-796.phpt +++ b/tests/integration/issue-796.phpt @@ -47,7 +47,7 @@ try { ], ]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/issue-799.phpt b/tests/integration/issue-799.phpt index 1666ba08..4e0752ef 100644 --- a/tests/integration/issue-799.phpt +++ b/tests/integration/issue-799.phpt @@ -21,7 +21,7 @@ try { ) ->assert($input); } catch (AllOfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { @@ -34,7 +34,7 @@ try { ) ->assert($input); } catch (AllOfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/not_with_recursion.phpt b/tests/integration/not_with_recursion.phpt index 38d4d753..7b6cf0fc 100644 --- a/tests/integration/not_with_recursion.phpt +++ b/tests/integration/not_with_recursion.phpt @@ -26,13 +26,13 @@ $validator = v::not( try { $validator->check(2); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { $validator->assert(2); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/not_without_recursion.phpt b/tests/integration/not_without_recursion.phpt index b0d2a660..f9b077b3 100644 --- a/tests/integration/not_without_recursion.phpt +++ b/tests/integration/not_without_recursion.phpt @@ -18,7 +18,7 @@ try { ); $validator->check(2); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/alnum.phpt b/tests/integration/rules/alnum.phpt index 92b873f8..d7219605 100644 --- a/tests/integration/rules/alnum.phpt +++ b/tests/integration/rules/alnum.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::alnum()->check('abc%1'); } catch (AlnumException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::alnum(' ')->check('abc%2'); } catch (AlnumException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::alnum())->check('abcd3'); } catch (AlnumException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::alnum('% '))->check('abc%4'); } catch (AlnumException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::alnum()->assert('abc^1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::alnum())->assert('abcd2'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::alnum('* &%')->assert('abc^3'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::alnum('^'))->assert('abc^4'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/alpha.phpt b/tests/integration/rules/alpha.phpt index b31d97b1..1497a99f 100644 --- a/tests/integration/rules/alpha.phpt +++ b/tests/integration/rules/alpha.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::alpha()->check('aaa%a'); } catch (AlphaException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::alpha(' ')->check('bbb%b'); } catch (AlphaException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::alpha())->check('ccccc'); } catch (AlphaException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::alpha('% '))->check('ddd%d'); } catch (AlphaException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::alpha()->assert('eee^e'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::alpha())->assert('fffff'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::alpha('* &%')->assert('ggg^g'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::alpha('^'))->assert('hhh^h'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/alwaysInvalid.phpt b/tests/integration/rules/alwaysInvalid.phpt index e196f6dc..393b7239 100644 --- a/tests/integration/rules/alwaysInvalid.phpt +++ b/tests/integration/rules/alwaysInvalid.phpt @@ -14,13 +14,13 @@ use Respect\Validation\Validator as v; try { v::alwaysInvalid()->check('whatever'); } catch (AlwaysInvalidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::alwaysInvalid()->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/alwaysValid.phpt b/tests/integration/rules/alwaysValid.phpt index 781e1b3b..f9f2bde1 100644 --- a/tests/integration/rules/alwaysValid.phpt +++ b/tests/integration/rules/alwaysValid.phpt @@ -14,13 +14,13 @@ use Respect\Validation\Validator as v; try { v::not(v::alwaysValid())->check(true); } catch (AlwaysValidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::alwaysValid())->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/arrayType.phpt b/tests/integration/rules/arrayType.phpt index 03c85801..305a3976 100644 --- a/tests/integration/rules/arrayType.phpt +++ b/tests/integration/rules/arrayType.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::arrayType()->check('teste'); } catch (ArrayTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::arrayType())->check([]); } catch (ArrayTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::arrayType()->assert(new ArrayObject()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::arrayType())->assert([1, 2, 3]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/arrayVal.phpt b/tests/integration/rules/arrayVal.phpt index a44796fa..1926aede 100644 --- a/tests/integration/rules/arrayVal.phpt +++ b/tests/integration/rules/arrayVal.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::arrayVal()->check('Bla %123'); } catch (ArrayValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::arrayVal())->check([42]); } catch (ArrayValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::arrayVal()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::arrayVal())->assert(new ArrayObject([2, 3])); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/base.phpt b/tests/integration/rules/base.phpt index 7a16950a..a9eb2d33 100644 --- a/tests/integration/rules/base.phpt +++ b/tests/integration/rules/base.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::base(61)->check('Z01xSsg5675hic20dj'); } catch (BaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::base(2)->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::base(2))->check('011010001'); } catch (BaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::base(2))->assert('011010001'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/base64.phpt b/tests/integration/rules/base64.phpt index 4ee1f8e8..0f461e78 100644 --- a/tests/integration/rules/base64.phpt +++ b/tests/integration/rules/base64.phpt @@ -16,25 +16,25 @@ use Respect\Validation\Validator as v; try { v::base64()->check('=c3VyZS4'); } catch (Base64Exception $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::base64())->check('c3VyZS4='); } catch (Base64Exception $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::base64()->assert('=c3VyZS4'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::base64())->assert('c3VyZS4='); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/beetwen.phpt b/tests/integration/rules/beetwen.phpt index 21a6fa61..1f18fde9 100644 --- a/tests/integration/rules/beetwen.phpt +++ b/tests/integration/rules/beetwen.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::between(1, 2)->check(0); } catch (BetweenException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::not(v::between('yesterday', 'tomorrow'))->check('today'); } catch (BetweenException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::between('a', 'c')->assert('d'); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } try { v::not(v::between(-INF, INF))->assert(0); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/boolType.phpt b/tests/integration/rules/boolType.phpt index 0112b0a7..5bbc2a88 100644 --- a/tests/integration/rules/boolType.phpt +++ b/tests/integration/rules/boolType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::boolType()->check('teste'); } catch (BoolTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::boolType())->check(true); } catch (BoolTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::boolType()->assert([]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::boolType())->assert(false); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/boolVal.phpt b/tests/integration/rules/boolVal.phpt index 2e4d2d35..2e6d1f73 100644 --- a/tests/integration/rules/boolVal.phpt +++ b/tests/integration/rules/boolVal.phpt @@ -16,25 +16,25 @@ use Respect\Validation\Validator as v; try { v::boolVal()->check('ok'); } catch (BoolValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::boolVal())->check('yes'); } catch (BoolValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::boolVal()->assert('yep'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::boolVal())->assert('on'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/bsn.phpt b/tests/integration/rules/bsn.phpt index 4ab842f2..b3b140ea 100644 --- a/tests/integration/rules/bsn.phpt +++ b/tests/integration/rules/bsn.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::bsn()->check('acb'); } catch (BsnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::bsn())->check('612890053'); } catch (BsnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::bsn()->assert('abc'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::bsn())->assert('612890053'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/call.phpt b/tests/integration/rules/call.phpt index f2d925aa..fe7eeb22 100644 --- a/tests/integration/rules/call.phpt +++ b/tests/integration/rules/call.phpt @@ -15,37 +15,37 @@ use Respect\Validation\Validator as v; try { v::call('trim', v::noWhitespace())->check(' two words '); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::call('trim', v::stringType()))->check(' something '); } catch (CallException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::call('trim', v::alwaysValid())->check([]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::call('strval', v::intType())->assert(1234); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::call('is_float', v::boolType()))->assert(1.2); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::call('array_walk', v::alwaysValid())->assert(INF); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/callableType.phpt b/tests/integration/rules/callableType.phpt index b9027eeb..316f0a58 100644 --- a/tests/integration/rules/callableType.phpt +++ b/tests/integration/rules/callableType.phpt @@ -14,26 +14,26 @@ use Respect\Validation\Validator as v; try { v::callableType()->check([]); } catch (CallableTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::callableType())->check('trim'); } catch (CallableTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::callableType()->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::callableType())->assert(static function (): void { }); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/callback.phpt b/tests/integration/rules/callback.phpt index e7d2c746..27553530 100644 --- a/tests/integration/rules/callback.phpt +++ b/tests/integration/rules/callback.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::callback('is_string')->check([]); } catch (CallbackException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::callback('is_string'))->check('foo'); } catch (CallbackException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::callback('is_string')->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::callback('is_string'))->assert('foo'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/charset.phpt b/tests/integration/rules/charset.phpt index 88f1f201..b244929a 100644 --- a/tests/integration/rules/charset.phpt +++ b/tests/integration/rules/charset.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::charset('ASCII')->check('açaí'); } catch (CharsetException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::charset('UTF-8'))->check('açaí'); } catch (CharsetException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::charset('ASCII')->assert('açaí'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::charset('UTF-8'))->assert('açaí'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/cnh.phpt b/tests/integration/rules/cnh.phpt index b070e068..c60a8f8c 100644 --- a/tests/integration/rules/cnh.phpt +++ b/tests/integration/rules/cnh.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::cnh()->check('batman'); } catch (CnhException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::not(v::cnh())->check('02650306461'); } catch (CnhException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::cnh()->assert('bruce wayne'); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } try { v::not(v::cnh())->assert('02650306461'); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/cnpj.phpt b/tests/integration/rules/cnpj.phpt index e578087c..7005be14 100644 --- a/tests/integration/rules/cnpj.phpt +++ b/tests/integration/rules/cnpj.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::cnpj()->check('não cnpj'); } catch (CnpjException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::cnpj())->check('65.150.175/0001-20'); } catch (CnpjException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::cnpj()->assert('test'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::cnpj())->assert('65.150.175/0001-20'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/cntrl.phpt b/tests/integration/rules/cntrl.phpt index 55dbc3aa..fc2c4446 100644 --- a/tests/integration/rules/cntrl.phpt +++ b/tests/integration/rules/cntrl.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::control()->check('16-50'); } catch (ControlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::control('16')->check('16-50'); } catch (ControlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::control())->check("\n"); } catch (ControlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::control('16'))->check("16\n"); } catch (ControlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::control()->assert('Foo'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::control('Bar')->assert('Foo'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::control())->assert("\n"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::control('Bar'))->assert("Bar\n"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/consonant.phpt b/tests/integration/rules/consonant.phpt index 23ae4bf8..725fbefe 100644 --- a/tests/integration/rules/consonant.phpt +++ b/tests/integration/rules/consonant.phpt @@ -16,49 +16,49 @@ use Respect\Validation\Validator as v; try { v::consonant()->check('aeiou'); } catch (ConsonantException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::consonant('d')->check('daeiou'); } catch (ConsonantException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::consonant())->check('bcd'); } catch (ConsonantException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::consonant('a'))->check('abcd'); } catch (ConsonantException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::consonant()->assert('aeiou'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::consonant('d')->assert('daeiou'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::consonant())->assert('bcd'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::consonant('a'))->assert('abcd'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/contains.phpt b/tests/integration/rules/contains.phpt index 344060af..67ae720b 100644 --- a/tests/integration/rules/contains.phpt +++ b/tests/integration/rules/contains.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::contains('foo')->check('bar'); } catch (ContainsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::contains('foo'))->check('fool'); } catch (ContainsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::contains('foo')->assert(['bar']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::contains('foo', true))->assert(['bar', 'foo']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/containsAny.phpt b/tests/integration/rules/containsAny.phpt index 9fc5928d..a81eb82b 100644 --- a/tests/integration/rules/containsAny.phpt +++ b/tests/integration/rules/containsAny.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::containsAny(['foo', 'bar'])->check('baz'); } catch (ContainsAnyException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::containsAny(['foo', 'bar']))->check('fool'); } catch (ContainsAnyException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::containsAny(['foo', 'bar'])->assert(['baz']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::containsAny(['foo', 'bar'], true))->assert(['bar', 'foo']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/countable.phpt b/tests/integration/rules/countable.phpt index c75decc9..0478c3c5 100644 --- a/tests/integration/rules/countable.phpt +++ b/tests/integration/rules/countable.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::countable()->check(1.0); } catch (CountableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::countable())->check([]); } catch (CountableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::countable()->assert('Not countable!'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::countable())->assert(new ArrayObject()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/countryCode.phpt b/tests/integration/rules/countryCode.phpt index 94d7e55b..2d941e21 100644 --- a/tests/integration/rules/countryCode.phpt +++ b/tests/integration/rules/countryCode.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::countryCode()->check('1'); } catch (CountryCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::countryCode())->check('BR'); } catch (CountryCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::countryCode()->assert('1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::countryCode())->assert('BR'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/cpf.phpt b/tests/integration/rules/cpf.phpt index 8c874d1c..ea741d4b 100644 --- a/tests/integration/rules/cpf.phpt +++ b/tests/integration/rules/cpf.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::cpf()->check('this thing'); } catch (CpfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::cpf())->check('276.865.775-11'); } catch (CpfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::cpf()->assert('your mother'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::cpf())->assert('61836182848'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/creditCard.phpt b/tests/integration/rules/creditCard.phpt index e8267816..2327b6c0 100644 --- a/tests/integration/rules/creditCard.phpt +++ b/tests/integration/rules/creditCard.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::creditCard('Discover')->check(3566002020360505); } catch (CreditCardException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::not(v::creditCard('Visa'))->check(4024007153361885); } catch (CreditCardException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::creditCard('MasterCard')->assert(3566002020360505); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::creditCard())->assert(5555444433331111); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/currencyCode.phpt b/tests/integration/rules/currencyCode.phpt index 0840ad82..de824127 100644 --- a/tests/integration/rules/currencyCode.phpt +++ b/tests/integration/rules/currencyCode.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::currencyCode()->check('batman'); } catch (CurrencyCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::currencyCode())->check('BRL'); } catch (CurrencyCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::currencyCode()->assert('ppz'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::currencyCode())->assert('GBP'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/date.phpt b/tests/integration/rules/date.phpt index 566d238a..69b6b622 100644 --- a/tests/integration/rules/date.phpt +++ b/tests/integration/rules/date.phpt @@ -16,25 +16,25 @@ date_default_timezone_set('UTC'); try { v::date()->check('2018-01-29T08:32:54+00:00'); } catch (DateException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::date())->check('2018-01-29'); } catch (DateException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::date()->assert('2018-01-29T08:32:54+00:00'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::date('d/m/Y'))->assert('29/01/2018'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/dateTime.phpt b/tests/integration/rules/dateTime.phpt index 112fe82a..201207cf 100644 --- a/tests/integration/rules/dateTime.phpt +++ b/tests/integration/rules/dateTime.phpt @@ -16,49 +16,49 @@ date_default_timezone_set('UTC'); try { v::dateTime()->check('FooBarBazz'); } catch (DateTimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::dateTime('c')->check('06-12-1995'); } catch (DateTimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::dateTime()->assert('QuxQuuxx'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::dateTime('r')->assert(2018013030); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::dateTime())->check('4 days ago'); } catch (DateTimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::dateTime('Y-m-d'))->check('1988-09-09'); } catch (DateTimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::dateTime())->assert('+3 weeks'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::dateTime('d/m/y'))->assert('23/07/99'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/digit.phpt b/tests/integration/rules/digit.phpt index d58cb0ec..ac99f33b 100644 --- a/tests/integration/rules/digit.phpt +++ b/tests/integration/rules/digit.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::digit()->check('abc'); } catch (DigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::digit('-')->check('a-b'); } catch (DigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::digit())->check('123'); } catch (DigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::digit('-'))->check('1-3'); } catch (DigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::digit()->assert('abc'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::digit('-')->assert('a-b'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::digit())->assert('123'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::digit('-'))->assert('1-3'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/directory.phpt b/tests/integration/rules/directory.phpt index f0647ff3..b10d99bb 100644 --- a/tests/integration/rules/directory.phpt +++ b/tests/integration/rules/directory.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::directory()->check('batman'); } catch (DirectoryException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::directory())->check(dirname('/etc/')); } catch (DirectoryException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::directory()->assert('ppz'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::directory())->assert(dirname('/etc/')); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/domain.phpt b/tests/integration/rules/domain.phpt index d126ac09..a5ea53e2 100644 --- a/tests/integration/rules/domain.phpt +++ b/tests/integration/rules/domain.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::domain()->check('batman'); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::domain())->check('r--w.com'); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::domain()->assert('p-éz-.kk'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::domain())->assert('github.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/each.phpt b/tests/integration/rules/each.phpt index ed2cd49e..6cf4f1cc 100644 --- a/tests/integration/rules/each.phpt +++ b/tests/integration/rules/each.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::each(v::dateTime())->check(null); } catch (EachException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::each(v::dateTime()))->check(['2018-10-10']); } catch (EachException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::each(v::dateTime())->assert(null); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::each(v::dateTime()))->assert(['2018-10-10']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/email.phpt b/tests/integration/rules/email.phpt index 3092bb95..cd422c1a 100644 --- a/tests/integration/rules/email.phpt +++ b/tests/integration/rules/email.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::email()->check('batman'); } catch (EmailException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::not(v::email())->check('bruce.wayne@gothancity.com'); } catch (EmailException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::email()->assert('bruce wayne'); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } try { v::not(v::email())->assert('iambatman@gothancity.com'); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/endsWith.phpt b/tests/integration/rules/endsWith.phpt index 57ccaee1..11142951 100644 --- a/tests/integration/rules/endsWith.phpt +++ b/tests/integration/rules/endsWith.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::endsWith('foo')->check('bar'); } catch (EndsWithException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::endsWith('foo'))->check(['bar', 'foo']); } catch (EndsWithException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::endsWith('foo')->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::endsWith('foo'))->assert(['bar', 'foo']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/equals.phpt b/tests/integration/rules/equals.phpt index 4ed273e1..97d7617d 100644 --- a/tests/integration/rules/equals.phpt +++ b/tests/integration/rules/equals.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::equals(123)->check(321); } catch (EqualsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::equals(321))->check(321); } catch (EqualsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::equals(123)->assert(321); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::equals(321))->assert(321); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/equivalent.phpt b/tests/integration/rules/equivalent.phpt index 349be057..fc045949 100644 --- a/tests/integration/rules/equivalent.phpt +++ b/tests/integration/rules/equivalent.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::equivalent(true)->check(false); } catch (EquivalentException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::equivalent('Something'))->check('someThing'); } catch (EquivalentException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::equivalent(123)->assert('true'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::equivalent(true))->assert(1); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/even.phpt b/tests/integration/rules/even.phpt index f2e03f23..0957a979 100644 --- a/tests/integration/rules/even.phpt +++ b/tests/integration/rules/even.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::even()->check(-1); } catch (EvenException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::even()->assert(5); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::even())->check(6); } catch (EvenException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::even())->assert(8); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/executable.phpt b/tests/integration/rules/executable.phpt index 682bb2f0..3528ba7f 100644 --- a/tests/integration/rules/executable.phpt +++ b/tests/integration/rules/executable.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::executable()->check('bar'); } catch (ExecutableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::executable())->check('tests/fixtures/executable'); } catch (ExecutableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::executable()->assert('bar'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::executable())->assert('tests/fixtures/executable'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/exists.phpt b/tests/integration/rules/exists.phpt index 1f606488..3bfed8c2 100644 --- a/tests/integration/rules/exists.phpt +++ b/tests/integration/rules/exists.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::exists()->check('/path/of/a/non-existent/file'); } catch (ExistsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::exists())->check('tests/fixtures/valid-image.gif'); } catch (ExistsException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::exists()->assert('/path/of/a/non-existent/file'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::exists())->assert('tests/fixtures/valid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/extension.phpt b/tests/integration/rules/extension.phpt index 8d86b18d..80f657f7 100644 --- a/tests/integration/rules/extension.phpt +++ b/tests/integration/rules/extension.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::extension('png')->check('filename.txt'); } catch (ExtensionException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::extension('gif'))->check('filename.gif'); } catch (ExtensionException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::extension('mp3')->assert('filename.wav'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::extension('png'))->assert('tests/fixtures/invalid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/factor.phpt b/tests/integration/rules/factor.phpt index 7fa55d81..c86f23b3 100644 --- a/tests/integration/rules/factor.phpt +++ b/tests/integration/rules/factor.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::factor(3)->check(2); } catch (FactorException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::factor(0))->check(300); } catch (FactorException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::factor(5)->assert(3); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::factor(6))->assert(1); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/falseVal.phpt b/tests/integration/rules/falseVal.phpt index 8b55545e..71391044 100644 --- a/tests/integration/rules/falseVal.phpt +++ b/tests/integration/rules/falseVal.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::falseVal()->check(true); } catch (FalseValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::falseVal())->check('false'); } catch (FalseValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::falseVal()->assert(1); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::falseVal())->assert(0); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/fibonacci.phpt b/tests/integration/rules/fibonacci.phpt index f5b8f92a..7e4ce20c 100644 --- a/tests/integration/rules/fibonacci.phpt +++ b/tests/integration/rules/fibonacci.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::fibonacci()->check(4); } catch (FibonacciException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::fibonacci())->check(5); } catch (FibonacciException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::fibonacci()->assert(16); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::fibonacci())->assert(21); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/file.phpt b/tests/integration/rules/file.phpt index d01e5c3c..2224e9b6 100644 --- a/tests/integration/rules/file.phpt +++ b/tests/integration/rules/file.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::file()->check('tests/fixtures/non-existent.sh'); } catch (FileException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::file())->check('tests/fixtures/valid-image.png'); } catch (FileException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::file()->assert('tests/fixtures/non-existent.sh'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::file())->assert('tests/fixtures/valid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/filterVar.phpt b/tests/integration/rules/filterVar.phpt index 287bba07..86130342 100644 --- a/tests/integration/rules/filterVar.phpt +++ b/tests/integration/rules/filterVar.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::filterVar(FILTER_VALIDATE_IP)->check(42); } catch (FilterVarException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::filterVar(FILTER_VALIDATE_BOOLEAN))->check('On'); } catch (FilterVarException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::filterVar(FILTER_VALIDATE_EMAIL)->assert(1.5); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::filterVar(FILTER_VALIDATE_FLOAT))->assert(1.0); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/finite.phpt b/tests/integration/rules/finite.phpt index b24176ae..5b4883e5 100644 --- a/tests/integration/rules/finite.phpt +++ b/tests/integration/rules/finite.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::finite()->check(''); } catch (FiniteException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::finite())->check(10); } catch (FiniteException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::finite()->assert([12]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::finite())->assert('123456'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/floatType.phpt b/tests/integration/rules/floatType.phpt index fa13cc25..4cc33387 100644 --- a/tests/integration/rules/floatType.phpt +++ b/tests/integration/rules/floatType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::floatType()->check('42.33'); } catch (FloatTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::floatType())->check(INF); } catch (FloatTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::floatType()->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::floatType())->assert(2.0); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/floatval.phpt b/tests/integration/rules/floatval.phpt index 2bcdc64f..b1a56665 100644 --- a/tests/integration/rules/floatval.phpt +++ b/tests/integration/rules/floatval.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::floatVal()->check('a'); } catch (FloatValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::floatVal())->check(165.0); } catch (FloatValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::floatVal()->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::floatVal())->assert('165.7'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/graph.phpt b/tests/integration/rules/graph.phpt index 4f4484a8..c412403f 100644 --- a/tests/integration/rules/graph.phpt +++ b/tests/integration/rules/graph.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::graph()->check("foo\nbar"); } catch (GraphException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::graph('foo')->check("foo\nbar"); } catch (GraphException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::graph())->check('foobar'); } catch (GraphException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::graph("\n"))->check("foo\nbar"); } catch (GraphException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::graph()->assert("foo\nbar"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::graph('foo')->assert("foo\nbar"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::graph())->assert('foobar'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::graph("\n"))->assert("foo\nbar"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/greaterThan.phpt b/tests/integration/rules/greaterThan.phpt index d8522f8d..2227d19d 100644 --- a/tests/integration/rules/greaterThan.phpt +++ b/tests/integration/rules/greaterThan.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::greaterThan(12)->check(21); } catch (GreaterThanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::greaterThan('today'))->check('yesterday'); } catch (GreaterThanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::greaterThan('1988-09-09')->assert('2018-09-09'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::greaterThan('b'))->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/hexRgbColor.phpt b/tests/integration/rules/hexRgbColor.phpt index e87604d4..7231198f 100644 --- a/tests/integration/rules/hexRgbColor.phpt +++ b/tests/integration/rules/hexRgbColor.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::hexRgbColor()->check('invalid'); } catch (HexRgbColorException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::hexRgbColor())->check('#808080'); } catch (HexRgbColorException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::hexRgbColor()->assert('invalid'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::hexRgbColor())->assert('#808080'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/iban.phpt b/tests/integration/rules/iban.phpt index d9eb5f61..d2254d61 100644 --- a/tests/integration/rules/iban.phpt +++ b/tests/integration/rules/iban.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::iban()->check('SE35 5000 5880 7742'); } catch (IbanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::iban())->check('GB82 WEST 1234 5698 7654 32'); } catch (IbanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::iban()->assert('NOT AN IBAN'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::iban())->assert('HU93 1160 0006 0000 0000 1234 5676'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/identical.phpt b/tests/integration/rules/identical.phpt index a3f636fc..164f9ec8 100644 --- a/tests/integration/rules/identical.phpt +++ b/tests/integration/rules/identical.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::identical(123)->check(321); } catch (IdenticalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::identical(321))->check(321); } catch (IdenticalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::identical(123)->assert(321); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::identical(321))->assert(321); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/image.phpt b/tests/integration/rules/image.phpt index 48090b0b..8d32398a 100644 --- a/tests/integration/rules/image.phpt +++ b/tests/integration/rules/image.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::image()->check('tests/fixtures/invalid-image.png'); } catch (ImageException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::image())->check('tests/fixtures/valid-image.png'); } catch (ImageException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::image()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::image())->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/imei.phpt b/tests/integration/rules/imei.phpt index 267a69fa..c1be82b0 100644 --- a/tests/integration/rules/imei.phpt +++ b/tests/integration/rules/imei.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::imei()->check('490154203237512'); } catch (ImeiException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::imei())->check('350077523237513'); } catch (ImeiException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::imei()->assert(null); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::imei())->assert('356938035643809'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/in.phpt b/tests/integration/rules/in.phpt index ba19cbc5..ce25bc8e 100644 --- a/tests/integration/rules/in.phpt +++ b/tests/integration/rules/in.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::in([3, 2])->check(1); } catch (InException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::in('foobar'))->check('foo'); } catch (InException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::in([2, '1', 3], true)->assert('2'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::in([2, '1', 3], true))->assert('1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/infinite.phpt b/tests/integration/rules/infinite.phpt index ae98e59c..0cf5ceb2 100644 --- a/tests/integration/rules/infinite.phpt +++ b/tests/integration/rules/infinite.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::infinite()->check(-9); } catch (InfiniteException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::infinite())->check(INF); } catch (InfiniteException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::infinite()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::infinite())->assert(INF * -1); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/instance.phpt b/tests/integration/rules/instance.phpt index 37e0f912..3fd81c36 100644 --- a/tests/integration/rules/instance.phpt +++ b/tests/integration/rules/instance.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::instance(DateTime::class)->check(''); } catch (InstanceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::instance(Traversable::class))->check(new ArrayObject()); } catch (InstanceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::instance(ArrayIterator::class)->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::instance(stdClass::class))->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/intType.phpt b/tests/integration/rules/intType.phpt index 686933a1..130c9f45 100644 --- a/tests/integration/rules/intType.phpt +++ b/tests/integration/rules/intType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::intType()->check(new stdClass()); } catch (IntTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::intType())->check(42); } catch (IntTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::intType()->assert(INF); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::intType())->assert(1234567890); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/intVal.phpt b/tests/integration/rules/intVal.phpt index 0f9d899b..00aa178a 100644 --- a/tests/integration/rules/intVal.phpt +++ b/tests/integration/rules/intVal.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::intVal()->check('42.33'); } catch (IntValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::intVal())->check(2); } catch (IntValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::intVal()->assert('Foo'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::intVal())->assert(3); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/ip.phpt b/tests/integration/rules/ip.phpt index 5c30f34a..ba7144e3 100644 --- a/tests/integration/rules/ip.phpt +++ b/tests/integration/rules/ip.phpt @@ -15,49 +15,49 @@ use Respect\Validation\Validator as v; try { v::ip()->check('257.0.0.1'); } catch (IpException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::ip())->check('127.0.0.1'); } catch (IpException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::ip('127.0.1.*')->check('127.0.0.1'); } catch (IpException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::ip('127.0.1.*'))->check('127.0.1.1'); } catch (IpException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::ip()->assert('257.0.0.1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::ip())->assert('127.0.0.1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::ip('127.0.1.*')->assert('127.0.0.1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::ip('127.0.1.*'))->assert('127.0.1.1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/isbn.phpt b/tests/integration/rules/isbn.phpt index 5cd00c08..f0b6ca47 100644 --- a/tests/integration/rules/isbn.phpt +++ b/tests/integration/rules/isbn.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::isbn()->check('ISBN-12: 978-0-596-52068-7'); } catch (IsbnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::isbn())->check('ISBN-13: 978-0-596-52068-7'); } catch (IsbnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::isbn()->assert('978 10 596 52068 7'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::isbn())->assert('978 0 596 52068 7'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/iterableType.phpt b/tests/integration/rules/iterableType.phpt index 60478d96..58a7e5a5 100644 --- a/tests/integration/rules/iterableType.phpt +++ b/tests/integration/rules/iterableType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::iterableType()->check(3); } catch (IterableTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::iterableType())->check([2, 3]); } catch (IterableTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::iterableType()->assert('String'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::iterableType())->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/json.phpt b/tests/integration/rules/json.phpt index cf908e5b..ab08d08a 100644 --- a/tests/integration/rules/json.phpt +++ b/tests/integration/rules/json.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::json()->check(false); } catch (JsonException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::json())->check('{"foo": "bar", "number":1}'); } catch (JsonException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::json()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::json())->assert('{}'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/keyValue.phpt b/tests/integration/rules/keyValue.phpt index 0455a48e..84b760d6 100644 --- a/tests/integration/rules/keyValue.phpt +++ b/tests/integration/rules/keyValue.phpt @@ -17,61 +17,61 @@ use Respect\Validation\Validator as v; try { v::keyValue('foo', 'equals', 'bar')->check(['bar' => 42]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::keyValue('foo', 'equals', 'bar')->check(['foo' => 42]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::keyValue('foo', 'json', 'bar')->check(['foo' => 42, 'bar' => 43]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::keyValue('foo', 'equals', 'bar')->check(['foo' => 1, 'bar' => 2]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::keyValue('foo', 'equals', 'bar'))->check(['foo' => 1, 'bar' => 1]); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::keyValue('foo', 'equals', 'bar')->assert(['bar' => 42]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::keyValue('foo', 'equals', 'bar')->assert(['foo' => 42]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::keyValue('foo', 'json', 'bar')->assert(['foo' => 42, 'bar' => 43]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::keyValue('foo', 'equals', 'bar')->assert(['foo' => 1, 'bar' => 2]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::keyValue('foo', 'equals', 'bar'))->assert(['foo' => 1, 'bar' => 1]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/languageCode.phpt b/tests/integration/rules/languageCode.phpt index 327186fd..1e0b9caa 100644 --- a/tests/integration/rules/languageCode.phpt +++ b/tests/integration/rules/languageCode.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::languageCode()->check(null); } catch (LanguageCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::languageCode())->check('pt'); } catch (LanguageCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::languageCode()->assert('por'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::languageCode())->assert('en'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/leapDate.phpt b/tests/integration/rules/leapDate.phpt index c46fc204..7f93f0ca 100644 --- a/tests/integration/rules/leapDate.phpt +++ b/tests/integration/rules/leapDate.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::leapDate('Y-m-d')->check('1989-02-29'); } catch (LeapDateException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::leapDate('Y-m-d'))->check('1988-02-29'); } catch (LeapDateException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::leapDate('Y-m-d')->assert('1990-02-29'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::leapDate('Y-m-d'))->assert('1992-02-29'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/leapYear.phpt b/tests/integration/rules/leapYear.phpt index 8a869872..3a3025f6 100644 --- a/tests/integration/rules/leapYear.phpt +++ b/tests/integration/rules/leapYear.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::leapYear()->check('2009'); } catch (LeapYearException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::leapYear())->check('2008'); } catch (LeapYearException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::leapYear()->assert('2009-02-29'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::leapYear())->assert('2008'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/length.phpt b/tests/integration/rules/length.phpt index 7bcf1e4f..f3c2bae2 100644 --- a/tests/integration/rules/length.phpt +++ b/tests/integration/rules/length.phpt @@ -15,121 +15,121 @@ use Respect\Validation\Validator as v; try { v::length(0, 5, false)->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::length(0, 10)->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::length(15, null, false)->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::length(20)->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::length(5, 10)->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::length(0, 15))->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::length(0, 20, false))->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::length(10, null))->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::length(5, null, false))->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::length(5, 20))->check('phpsp.org.br'); } catch (LengthException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::length(0, 5, false)->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::length(0, 10)->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::length(15, null, false)->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::length(20)->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::length(5, 10)->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::length(0, 15))->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::length(0, 20, false))->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::length(10, null))->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::length(5, null, false))->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::length(5, 20))->assert('phpsp.org.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/lessThan.phpt b/tests/integration/rules/lessThan.phpt index 41351051..11526145 100644 --- a/tests/integration/rules/lessThan.phpt +++ b/tests/integration/rules/lessThan.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::lessThan(12)->check(21); } catch (LessThanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::lessThan('today'))->check('yesterday'); } catch (LessThanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::lessThan('1988-09-09')->assert('2018-09-09'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::lessThan('b'))->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/lowercase.phpt b/tests/integration/rules/lowercase.phpt index a48c5e39..4897d295 100644 --- a/tests/integration/rules/lowercase.phpt +++ b/tests/integration/rules/lowercase.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::lowercase()->check('UPPERCASE'); } catch (LowercaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::lowercase())->check('lowercase'); } catch (LowercaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::lowercase()->assert('UPPERCASE'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::lowercase())->assert('lowercase'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/luhn.phpt b/tests/integration/rules/luhn.phpt index 6d29cccd..8d5ef2bd 100644 --- a/tests/integration/rules/luhn.phpt +++ b/tests/integration/rules/luhn.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::luhn()->check('2222400041240021'); } catch (LuhnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::luhn())->check('2223000048400011'); } catch (LuhnException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::luhn()->assert('340316193809334'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::luhn())->assert('6011000990139424'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/macAddress.phpt b/tests/integration/rules/macAddress.phpt index 9374d3d4..f1f051c2 100644 --- a/tests/integration/rules/macAddress.phpt +++ b/tests/integration/rules/macAddress.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::macAddress()->check('00-11222:33:44:55'); } catch (MacAddressException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::macAddress())->check('00:11:22:33:44:55'); } catch (MacAddressException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::macAddress()->assert('90-bc-nk:1a-dd-cc'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::macAddress())->assert('AF:0F:bd:12:44:ba'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/max.phpt b/tests/integration/rules/max.phpt index abf1514e..970836c7 100644 --- a/tests/integration/rules/max.phpt +++ b/tests/integration/rules/max.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::max(10)->check(11); } catch (MaxException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::max(10))->check(5); } catch (MaxException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::max('today')->assert('tomorrow'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::max('b'))->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/maxAge.phpt b/tests/integration/rules/maxAge.phpt index 995af0c2..6a8a18a7 100644 --- a/tests/integration/rules/maxAge.phpt +++ b/tests/integration/rules/maxAge.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::maxAge(12)->check('50 years ago'); } catch (MaxAgeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::maxAge(12))->check('11 years ago'); } catch (MaxAgeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::maxAge(12, 'Y-m-d')->assert('1988-09-09'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::maxAge(12, 'Y-m-d'))->assert('2018-01-01'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/mimetype.phpt b/tests/integration/rules/mimetype.phpt index 45c18e83..93030cb0 100644 --- a/tests/integration/rules/mimetype.phpt +++ b/tests/integration/rules/mimetype.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::mimetype('image/png')->check('image.png'); } catch (MimetypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::mimetype('image/png'))->check('tests/fixtures/valid-image.png'); } catch (MimetypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::mimetype('image/png')->assert('tests/fixtures/invalid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::mimetype('image/png'))->assert('tests/fixtures/valid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/min.phpt b/tests/integration/rules/min.phpt index 3b8abb07..2b9098a2 100644 --- a/tests/integration/rules/min.phpt +++ b/tests/integration/rules/min.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::min(INF)->check(10); } catch (MinException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::min(5))->check(INF); } catch (MinException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::min('today')->assert('yesterday'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::min('a'))->assert('z'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/minAge.phpt b/tests/integration/rules/minAge.phpt index cc723e8c..f4b1b19f 100644 --- a/tests/integration/rules/minAge.phpt +++ b/tests/integration/rules/minAge.phpt @@ -17,25 +17,25 @@ use Respect\Validation\Validator as v; try { v::minAge(18)->check('17 years ago'); } catch (MinAgeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::minAge(18))->check('-30 years'); } catch (MinAgeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::minAge(18)->assert('yesterday'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::minAge(18, 'd/m/Y')->assert('12/10/2010'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/multiple.phpt b/tests/integration/rules/multiple.phpt index bc6841f3..6ca75e05 100644 --- a/tests/integration/rules/multiple.phpt +++ b/tests/integration/rules/multiple.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::multiple(3)->check(22); } catch (MultipleException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::multiple(3))->check(9); } catch (MultipleException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::multiple(2)->assert(5); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::multiple(5))->assert(25); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/negative.phpt b/tests/integration/rules/negative.phpt index c35984d3..c400af21 100644 --- a/tests/integration/rules/negative.phpt +++ b/tests/integration/rules/negative.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::negative()->check(16); } catch (NegativeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::negative())->check(-10); } catch (NegativeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::negative()->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::negative())->assert('-144'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/nfeAccessKey.phpt b/tests/integration/rules/nfeAccessKey.phpt index de40f771..29977cc3 100644 --- a/tests/integration/rules/nfeAccessKey.phpt +++ b/tests/integration/rules/nfeAccessKey.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::nfeAccessKey()->check('31841136830118868211870485416765268625116906'); } catch (NfeAccessKeyException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::nfeAccessKey())->check('52060433009911002506550120000007800267301615'); } catch (NfeAccessKeyException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::nfeAccessKey()->assert('31841136830118868211870485416765268625116906'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::nfeAccessKey())->assert('52060433009911002506550120000007800267301615'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/nif.phpt b/tests/integration/rules/nif.phpt index c378fd13..e27b4546 100644 --- a/tests/integration/rules/nif.phpt +++ b/tests/integration/rules/nif.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::nif()->check('06357771Q'); } catch (NifException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::nif())->check('71110316C'); } catch (NifException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::nif()->assert('06357771Q'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::nif())->assert('R1332622H'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/nip.phpt b/tests/integration/rules/nip.phpt index b94ac327..f2a352f0 100644 --- a/tests/integration/rules/nip.phpt +++ b/tests/integration/rules/nip.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::nip()->check('1645865778'); } catch (NipException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::nip())->check('1645865777'); } catch (NipException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::nip()->assert('1645865778'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::nip())->assert('1645865777'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/no.phpt b/tests/integration/rules/no.phpt index 5c56cea0..439b7356 100644 --- a/tests/integration/rules/no.phpt +++ b/tests/integration/rules/no.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::not(v::no())->check('No'); } catch (NoException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::no()->check('Yes'); } catch (NoException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::no())->assert('No'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::no()->assert('Yes'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/noWhitespace.phpt b/tests/integration/rules/noWhitespace.phpt index 131b122e..f53aaf1c 100644 --- a/tests/integration/rules/noWhitespace.phpt +++ b/tests/integration/rules/noWhitespace.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::noWhitespace()->check('w poiur'); } catch (NoWhitespaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::noWhitespace())->check('wpoiur'); } catch (NoWhitespaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::noWhitespace()->assert('w poiur'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::noWhitespace())->assert('wpoiur'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/notBlank.phpt b/tests/integration/rules/notBlank.phpt index 608d648c..df26f19a 100644 --- a/tests/integration/rules/notBlank.phpt +++ b/tests/integration/rules/notBlank.phpt @@ -14,37 +14,37 @@ use Respect\Validation\Validator as v; try { v::notBlank()->check(null); } catch (NotBlankException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::notBlank()->setName('Field')->check(null); } catch (NotBlankException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::notBlank())->check(1); } catch (NotBlankException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::notBlank()->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::notBlank()->setName('Field')->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::notBlank())->assert([1]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/notEmoji.phpt b/tests/integration/rules/notEmoji.phpt index 662c91dc..1072256d 100644 --- a/tests/integration/rules/notEmoji.phpt +++ b/tests/integration/rules/notEmoji.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::notEmoji()->check('🍕'); } catch (NotEmojiException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::notEmoji())->check('AB'); } catch (NotEmojiException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::notEmoji()->assert('🏄'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::notEmoji())->assert('YZ'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/notEmpty.phpt b/tests/integration/rules/notEmpty.phpt index 5f320438..7c220bf2 100644 --- a/tests/integration/rules/notEmpty.phpt +++ b/tests/integration/rules/notEmpty.phpt @@ -15,37 +15,37 @@ use Respect\Validation\Validator as v; try { v::notEmpty()->check(null); } catch (NotEmptyException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::notEmpty()->setName('Field')->check(null); } catch (NotEmptyException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::not(v::notEmpty())->check(1); } catch (NotEmptyException $e) { - echo $e->getMessage().PHP_EOL; + echo $e->getMessage() . PHP_EOL; } try { v::notEmpty()->assert(''); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } try { v::notEmpty()->setName('Field')->assert(''); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } try { v::not(v::notEmpty())->assert([1]); } catch (NestedValidationException $e) { - echo $e->getFullMessage().PHP_EOL; + echo $e->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/notOptional.phpt b/tests/integration/rules/notOptional.phpt index ea09645d..9339d772 100644 --- a/tests/integration/rules/notOptional.phpt +++ b/tests/integration/rules/notOptional.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::notOptional()->check(null); } catch (NotOptionalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::notOptional())->check(0); } catch (NotOptionalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::notOptional()->setName('Field')->check(null); } catch (NotOptionalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::notOptional()->setName('Field'))->check([]); } catch (NotOptionalException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::notOptional()->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::notOptional())->assert([]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::notOptional()->setName('Field')->assert(''); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::notOptional()->setName('Field'))->assert([]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/nullType.phpt b/tests/integration/rules/nullType.phpt index 2466f28a..89114643 100644 --- a/tests/integration/rules/nullType.phpt +++ b/tests/integration/rules/nullType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::nullType()->check(''); } catch (NullTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::nullType())->check(null); } catch (NullTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::nullType()->assert(false); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::nullType())->assert(null); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/number.phpt b/tests/integration/rules/number.phpt index ca0bef9c..fb7f1208 100644 --- a/tests/integration/rules/number.phpt +++ b/tests/integration/rules/number.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::number()->check(acos(1.01)); } catch (NumberException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::number())->check(42); } catch (NumberException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::number()->assert(NAN); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::number())->assert(42); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/numericVal.phpt b/tests/integration/rules/numericVal.phpt index ba60bd9c..5d493e56 100644 --- a/tests/integration/rules/numericVal.phpt +++ b/tests/integration/rules/numericVal.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::numericVal()->check('a'); } catch (NumericValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::numericVal())->check('1'); } catch (NumericValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::numericVal()->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::numericVal())->assert('1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/objectType.phpt b/tests/integration/rules/objectType.phpt index 47ca3d05..53a16dea 100644 --- a/tests/integration/rules/objectType.phpt +++ b/tests/integration/rules/objectType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::objectType()->check([]); } catch (ObjectTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::objectType())->check(new stdClass()); } catch (ObjectTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::objectType()->assert('test'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::objectType())->assert(new ArrayObject()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/odd.phpt b/tests/integration/rules/odd.phpt index 7dfa274c..224a5116 100644 --- a/tests/integration/rules/odd.phpt +++ b/tests/integration/rules/odd.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::odd()->check(2); } catch (OddException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::odd())->check(7); } catch (OddException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::odd()->assert(2); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::odd())->assert(9); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/optional.phpt b/tests/integration/rules/optional.phpt index 4c9923cc..08259f9b 100644 --- a/tests/integration/rules/optional.phpt +++ b/tests/integration/rules/optional.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::optional(v::alpha())->check(1234); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::optional(v::alpha())->setName('Name')->check(1234); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::optional(v::alpha()))->check('abcd'); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::optional(v::alpha()))->setName('Name')->check('abcd'); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::optional(v::alpha())->assert(1234); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::optional(v::alpha())->setName('Name')->assert(1234); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::optional(v::alpha()))->assert('abcd'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::optional(v::alpha()))->setName('Name')->assert('abcd'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/perfectSquare.phpt b/tests/integration/rules/perfectSquare.phpt index 796f3b1e..53392c07 100644 --- a/tests/integration/rules/perfectSquare.phpt +++ b/tests/integration/rules/perfectSquare.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::perfectSquare()->check(250); } catch (PerfectSquareException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::perfectSquare())->check(9); } catch (PerfectSquareException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::perfectSquare()->assert(7); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::perfectSquare())->assert(400); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/pesel.phpt b/tests/integration/rules/pesel.phpt index 70f1cf95..236e59fc 100644 --- a/tests/integration/rules/pesel.phpt +++ b/tests/integration/rules/pesel.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::pesel()->check('21120209251'); } catch (PeselException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::pesel())->check('21120209256'); } catch (PeselException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::pesel()->assert('21120209251'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::pesel())->assert('21120209256'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT--; diff --git a/tests/integration/rules/phone.phpt b/tests/integration/rules/phone.phpt index cfe1bb23..2c230c45 100644 --- a/tests/integration/rules/phone.phpt +++ b/tests/integration/rules/phone.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::phone()->check('123'); } catch (PhoneException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::phone())->check('11977777777'); } catch (PhoneException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::phone()->assert('(555)5555 555'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::phone())->assert('+5 555 555 5555'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/phplabel.phpt b/tests/integration/rules/phplabel.phpt index c51ec814..b07446fb 100644 --- a/tests/integration/rules/phplabel.phpt +++ b/tests/integration/rules/phplabel.phpt @@ -17,25 +17,25 @@ use Respect\Validation\Validator as v; try { v::phpLabel()->check('f o o'); } catch (PhpLabelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::phpLabel())->check('correctOne'); } catch (PhpLabelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::phpLabel()->assert('0wner'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::phpLabel())->assert('Respect'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/pis.phpt b/tests/integration/rules/pis.phpt index 9e61c93d..43deab40 100644 --- a/tests/integration/rules/pis.phpt +++ b/tests/integration/rules/pis.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::pis()->check('this thing'); } catch (PisException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::pis())->check('120.6671.406-4'); } catch (PisException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::pis()->assert('your mother'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::pis())->assert('120.9378.174-5'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/polishIdCard.phpt b/tests/integration/rules/polishIdCard.phpt index c69887ab..1cdbcc89 100644 --- a/tests/integration/rules/polishIdCard.phpt +++ b/tests/integration/rules/polishIdCard.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::polishIdCard()->check('AYE205411'); } catch (PolishIdCardException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::polishIdCard())->check('AYE205410'); } catch (PolishIdCardException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::polishIdCard()->assert('AYE205411'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::polishIdCard())->assert('AYE205410'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/positive.phpt b/tests/integration/rules/positive.phpt index 58e52589..987797ef 100644 --- a/tests/integration/rules/positive.phpt +++ b/tests/integration/rules/positive.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::positive()->check(-10); } catch (PositiveException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::positive())->check(16); } catch (PositiveException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::positive()->assert('a'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::positive())->assert('165'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/postalCode.phpt b/tests/integration/rules/postalCode.phpt index c4dd2ef4..30090866 100644 --- a/tests/integration/rules/postalCode.phpt +++ b/tests/integration/rules/postalCode.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::postalCode('BR')->check('1057BV'); } catch (PostalCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::postalCode('NL'))->check('1057BV'); } catch (PostalCodeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::postalCode('BR')->assert('1057BV'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::postalCode('NL'))->assert('1057BV'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/primeNumber.phpt b/tests/integration/rules/primeNumber.phpt index ac1da249..4791899e 100644 --- a/tests/integration/rules/primeNumber.phpt +++ b/tests/integration/rules/primeNumber.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::primeNumber()->check(10); } catch (PrimeNumberException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::primeNumber())->check(3); } catch (PrimeNumberException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::primeNumber()->assert('Foo'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::primeNumber())->assert('+7'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/printable.phpt b/tests/integration/rules/printable.phpt index 7c471c06..ecd5c28a 100644 --- a/tests/integration/rules/printable.phpt +++ b/tests/integration/rules/printable.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::printable()->check(''); } catch (PrintableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::printable())->check('abc'); } catch (PrintableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { - v::printable()->assert('foo'.chr(10).'bar'); + v::printable()->assert('foo' . chr(10) . 'bar'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::printable())->assert('$%asd'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/punct.phpt b/tests/integration/rules/punct.phpt index d46742a7..74cc10dc 100644 --- a/tests/integration/rules/punct.phpt +++ b/tests/integration/rules/punct.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::punct()->check('a'); } catch (PunctException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::punct('c')->check('b'); } catch (PunctException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::punct())->check('.'); } catch (PunctException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::punct('d'))->check('?'); } catch (PunctException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::punct()->assert('e'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::punct('f')->assert('g'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::punct())->assert('!'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::punct('h'))->assert(';'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/readable.phpt b/tests/integration/rules/readable.phpt index 4df40e00..207128e0 100644 --- a/tests/integration/rules/readable.phpt +++ b/tests/integration/rules/readable.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::readable()->check('tests/fixtures/invalid-image.jpg'); } catch (ReadableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::readable())->check('tests/fixtures/valid-image.png'); } catch (ReadableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::readable()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::readable())->assert('tests/fixtures/valid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/regex.phpt b/tests/integration/rules/regex.phpt index b9d45c78..4be9ff43 100644 --- a/tests/integration/rules/regex.phpt +++ b/tests/integration/rules/regex.phpt @@ -12,25 +12,25 @@ use Respect\Validation\Validator as v; try { v::regex('/^w+$/')->check('w poiur'); } catch (RegexException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::regex('/^[a-z]+$/'))->check('wpoiur'); } catch (RegexException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::regex('/^w+$/')->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::regex('/^[a-z]+$/i'))->assert('wPoiur'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/resourceType.phpt b/tests/integration/rules/resourceType.phpt index 30ce80bd..a35cbc44 100644 --- a/tests/integration/rules/resourceType.phpt +++ b/tests/integration/rules/resourceType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::resourceType()->check('test'); } catch (ResourceTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::resourceType())->check(tmpfile()); } catch (ResourceTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::resourceType()->assert([]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::resourceType())->assert(xml_parser_create()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/roman.phpt b/tests/integration/rules/roman.phpt index d0dce549..7cc54b01 100644 --- a/tests/integration/rules/roman.phpt +++ b/tests/integration/rules/roman.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::roman()->check(1234); } catch (RomanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::roman())->check('XL'); } catch (RomanException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::roman()->assert('e2'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::roman())->assert('IV'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/scalarVal.phpt b/tests/integration/rules/scalarVal.phpt index 6f205be7..3d19ed45 100644 --- a/tests/integration/rules/scalarVal.phpt +++ b/tests/integration/rules/scalarVal.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::scalarVal()->check([]); } catch (ScalarValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::scalarVal())->check(true); } catch (ScalarValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::scalarVal()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::scalarVal())->assert(42); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/sf.phpt b/tests/integration/rules/sf.phpt index f022921b..c6a3038f 100644 --- a/tests/integration/rules/sf.phpt +++ b/tests/integration/rules/sf.phpt @@ -17,25 +17,25 @@ use Symfony\Component\Validator\Constraints\IsNull; try { v::sf(new IsNull())->check('something'); } catch (SfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::sf(new IsNull()))->check(null); } catch (SfException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::sf(new Email())->assert('not-null'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::sf(new Email()))->assert('example@example.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { diff --git a/tests/integration/rules/size.phpt b/tests/integration/rules/size.phpt index b157206a..e5d2fa74 100644 --- a/tests/integration/rules/size.phpt +++ b/tests/integration/rules/size.phpt @@ -14,73 +14,73 @@ use Respect\Validation\Validator as v; try { v::size('1kb', '2kb')->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::size('700kb', null)->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::size(null, '1kb')->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::size('500kb', '600kb'))->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::size('500kb', null))->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::size(null, '600kb'))->check('tests/fixtures/valid-image.gif'); } catch (SizeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::size('1kb', '2kb')->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::size('700kb', null)->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::size(null, '1kb')->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::size('500kb', '600kb'))->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::size('500kb', null))->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::size(null, '600kb'))->assert('tests/fixtures/valid-image.gif'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/slug.phpt b/tests/integration/rules/slug.phpt index 9ba6d680..f69b1655 100644 --- a/tests/integration/rules/slug.phpt +++ b/tests/integration/rules/slug.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::slug()->check('my-Slug'); } catch (SlugException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::slug())->check('my-slug'); } catch (SlugException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::slug()->assert('my-Slug'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::slug())->assert('my-slug'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/sorted.phpt b/tests/integration/rules/sorted.phpt index 6f9dfedc..b578cfbb 100644 --- a/tests/integration/rules/sorted.phpt +++ b/tests/integration/rules/sorted.phpt @@ -15,49 +15,49 @@ use Respect\Validation\Validator as v; try { v::sorted('ASC')->check([1, 3, 2]); } catch (SortedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::sorted('DESC')->check([1, 2, 3]); } catch (SortedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::sorted('ASC'))->check([1, 2, 3]); } catch (SortedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::sorted('DESC'))->check([3, 2, 1]); } catch (SortedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::sorted('ASC')->assert([3, 2, 1]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::sorted('DESC')->assert([1, 2, 3]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::sorted('ASC'))->assert([1, 2, 3]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::sorted('DESC'))->assert([3, 2, 1]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/space.phpt b/tests/integration/rules/space.phpt index 6654b6ea..1838a7b8 100644 --- a/tests/integration/rules/space.phpt +++ b/tests/integration/rules/space.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::space()->check('ab'); } catch (SpaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::space('c')->check('cd'); } catch (SpaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::space())->check("\t"); } catch (SpaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::space('def'))->check("\r"); } catch (SpaceException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::space()->assert('ef'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::space('e')->assert('gh'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::space())->assert("\n"); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::space('yk'))->assert(' k'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/startsWith.phpt b/tests/integration/rules/startsWith.phpt index 815a0be1..ae8c11c9 100644 --- a/tests/integration/rules/startsWith.phpt +++ b/tests/integration/rules/startsWith.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::startsWith('b')->check(['a', 'b']); } catch (StartsWithException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::startsWith(1.1))->check([1.1, 2.2]); } catch (StartsWithException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::startsWith('3.3', true)->assert([3.3, 4.4]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::startsWith('c'))->assert(['c', 'd']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/stringType.phpt b/tests/integration/rules/stringType.phpt index 6c385d62..997694bb 100644 --- a/tests/integration/rules/stringType.phpt +++ b/tests/integration/rules/stringType.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::stringType()->check(42); } catch (StringTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::stringType())->check('foo'); } catch (StringTypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::stringType()->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::stringType())->assert('bar'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/stringVal.phpt b/tests/integration/rules/stringVal.phpt index 6a1073c8..eda0593a 100644 --- a/tests/integration/rules/stringVal.phpt +++ b/tests/integration/rules/stringVal.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::stringVal()->check([]); } catch (StringValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::stringVal())->check(true); } catch (StringValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::stringVal()->assert(new stdClass()); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::stringVal())->assert(42); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/subset.phpt b/tests/integration/rules/subset.phpt index b8a57fc0..deab12d4 100644 --- a/tests/integration/rules/subset.phpt +++ b/tests/integration/rules/subset.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::subset([1, 2])->check([1, 2, 3]); } catch (SubsetException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::subset([1, 2, 3]))->check([1, 2]); } catch (SubsetException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::subset(['A', 'B'])->assert(['B', 'C']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::subset(['A']))->assert(['A']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/symbolicLink.phpt b/tests/integration/rules/symbolicLink.phpt index 3134e951..584688f6 100644 --- a/tests/integration/rules/symbolicLink.phpt +++ b/tests/integration/rules/symbolicLink.phpt @@ -15,25 +15,25 @@ use Respect\Validation\Validator as v; try { v::symbolicLink()->check('tests/fixtures/fake-filename'); } catch (SymbolicLinkException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::symbolicLink())->check('tests/fixtures/symbolic-link'); } catch (SymbolicLinkException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::symbolicLink()->assert('tests/fixtures/fake-filename'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::symbolicLink())->assert('tests/fixtures/symbolic-link'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/time.phpt b/tests/integration/rules/time.phpt index f0aa545b..816b6a34 100644 --- a/tests/integration/rules/time.phpt +++ b/tests/integration/rules/time.phpt @@ -16,25 +16,25 @@ date_default_timezone_set('UTC'); try { v::time()->check('2018-01-30'); } catch (TimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::time())->check('09:25:46'); } catch (TimeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::time()->assert('2018-01-30'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::time('g:i A'))->assert('8:13 AM'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/tld.phpt b/tests/integration/rules/tld.phpt index 2bc863f3..7f8dae05 100644 --- a/tests/integration/rules/tld.phpt +++ b/tests/integration/rules/tld.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::tld()->check('42'); } catch (TldException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::tld())->check('com'); } catch (TldException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::tld()->assert('1984'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::tld())->assert('com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/trueVal.phpt b/tests/integration/rules/trueVal.phpt index f5bb7d56..4c90e4a3 100644 --- a/tests/integration/rules/trueVal.phpt +++ b/tests/integration/rules/trueVal.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::trueVal()->check(false); } catch (TrueValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::trueVal())->check(1); } catch (TrueValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::trueVal()->assert(0); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::trueVal())->assert('true'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/type.phpt b/tests/integration/rules/type.phpt index 3925392a..0b09d9ea 100644 --- a/tests/integration/rules/type.phpt +++ b/tests/integration/rules/type.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::type('integer')->check('42'); } catch (TypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::type('string'))->check('foo'); } catch (TypeException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::type('double')->assert(20); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::type('bool'))->assert(true); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/unique.phpt b/tests/integration/rules/unique.phpt index 6ca95c10..6a406992 100644 --- a/tests/integration/rules/unique.phpt +++ b/tests/integration/rules/unique.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::unique()->check([1, 2, 2, 3]); } catch (UniqueException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::unique())->check([1, 2, 3, 4]); } catch (UniqueException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::unique()->assert('test'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::unique())->assert(['a', 'b', 'c']); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/uploaded.phpt b/tests/integration/rules/uploaded.phpt index f0dea045..5f544b65 100644 --- a/tests/integration/rules/uploaded.phpt +++ b/tests/integration/rules/uploaded.phpt @@ -22,28 +22,28 @@ uopz_set_return('is_uploaded_file', false); try { v::uploaded()->check('filename'); } catch (UploadedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } uopz_set_return('is_uploaded_file', true); try { v::not(v::uploaded())->check('filename'); } catch (UploadedException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } uopz_set_return('is_uploaded_file', false); try { v::uploaded()->assert('filename'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } uopz_set_return('is_uploaded_file', true); try { v::not(v::uploaded())->assert('filename'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/uppercase.phpt b/tests/integration/rules/uppercase.phpt index a54937b2..fb40b5b4 100644 --- a/tests/integration/rules/uppercase.phpt +++ b/tests/integration/rules/uppercase.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::uppercase()->check('lowercase'); } catch (UppercaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::uppercase()->assert('lowercase'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::uppercase())->check('UPPERCASE'); } catch (UppercaseException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::uppercase())->assert('UPPERCASE'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/url.phpt b/tests/integration/rules/url.phpt index 4b558e1a..43650ae0 100644 --- a/tests/integration/rules/url.phpt +++ b/tests/integration/rules/url.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::url()->check('example.com'); } catch (UrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::url())->check('http://example.com'); } catch (UrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::url()->assert('example.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::url())->assert('http://example.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/uuid.phpt b/tests/integration/rules/uuid.phpt index d6897bd3..e4ec76c7 100644 --- a/tests/integration/rules/uuid.phpt +++ b/tests/integration/rules/uuid.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::uuid()->check('g71a18f4-3a13-11e7-a919-92ebcb67fe33'); } catch (UuidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::uuid(1)->check('e0b5ffb9-9caf-2a34-9673-8fc91db78be6'); } catch (UuidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::uuid())->check('fb3a7909-8034-59f5-8f38-21adbc168db7'); } catch (UuidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::uuid(3))->check('11a38b9a-b3da-360f-9353-a5a725514269'); } catch (UuidException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::uuid()->assert('g71a18f4-3a13-11e7-a919-92ebcb67fe33'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::uuid(4)->assert('a71a18f4-3a13-11e7-a919-92ebcb67fe33'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::uuid())->assert('e0b5ffb9-9caf-4a34-9673-8fc91db78be6'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::uuid(5))->assert('c4a760a8-dbcf-5254-a0d9-6a4474bd1b62'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/version.phpt b/tests/integration/rules/version.phpt index c544ecf1..1dd4d77c 100644 --- a/tests/integration/rules/version.phpt +++ b/tests/integration/rules/version.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::version()->check('1.3.7--'); } catch (VersionException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::version())->check('1.0.0-alpha'); } catch (VersionException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::version()->assert('1.2.3.4-beta'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::version())->assert('1.3.7-rc.1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/videoUrl.phpt b/tests/integration/rules/videoUrl.phpt index 0fa03940..4e0be498 100644 --- a/tests/integration/rules/videoUrl.phpt +++ b/tests/integration/rules/videoUrl.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::videoUrl()->check('example.com'); } catch (VideoUrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::videoUrl('YouTube')->check('example.com'); } catch (VideoUrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::videoUrl())->check('https://player.vimeo.com/video/7178746722'); } catch (VideoUrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::videoUrl('YouTube'))->check('https://www.youtube.com/embed/netHLn9TScY'); } catch (VideoUrlException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::videoUrl()->assert('example.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::videoUrl('Vimeo')->assert('example.com'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::videoUrl())->assert('https://youtu.be/netHLn9TScY'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::videoUrl('Vimeo'))->assert('https://vimeo.com/71787467'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/vowel.phpt b/tests/integration/rules/vowel.phpt index bc66a99a..d69289bc 100644 --- a/tests/integration/rules/vowel.phpt +++ b/tests/integration/rules/vowel.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::vowel()->check('b'); } catch (VowelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::vowel('c')->check('d'); } catch (VowelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::vowel())->check('a'); } catch (VowelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::vowel('f'))->check('e'); } catch (VowelException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::vowel()->assert('g'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::vowel('h')->assert('j'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::vowel())->assert('i'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::vowel('k'))->assert('o'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/when.phpt b/tests/integration/rules/when.phpt index e3383082..6bded30e 100644 --- a/tests/integration/rules/when.phpt +++ b/tests/integration/rules/when.phpt @@ -15,49 +15,49 @@ use Respect\Validation\Validator as v; try { v::when(v::alwaysValid(), v::intVal())->check('abc'); } catch (IntValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::when(v::alwaysInvalid(), v::alwaysValid(), v::intVal())->check('def'); } catch (IntValException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::when(v::alwaysValid(), v::stringVal()))->check('ghi'); } catch (WhenException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::when(v::alwaysInvalid(), v::alwaysValid(), v::stringVal()))->check('jkl'); } catch (WhenException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::when(v::alwaysValid(), v::intVal())->assert('mno'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::when(v::alwaysInvalid(), v::alwaysValid(), v::intVal())->assert('pqr'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::when(v::alwaysValid(), v::stringVal()))->assert('stu'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::when(v::alwaysInvalid(), v::alwaysValid(), v::stringVal()))->assert('vwx'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/writable.phpt b/tests/integration/rules/writable.phpt index 838350b4..180b7002 100644 --- a/tests/integration/rules/writable.phpt +++ b/tests/integration/rules/writable.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::writable()->check('/path/of/a/valid/writable/file.txt'); } catch (WritableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::writable())->check('tests/fixtures/valid-image.png'); } catch (WritableException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::writable()->assert([]); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::writable())->assert('tests/fixtures/invalid-image.png'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> diff --git a/tests/integration/rules/xdigit.phpt b/tests/integration/rules/xdigit.phpt index 71fc8664..2d13b833 100644 --- a/tests/integration/rules/xdigit.phpt +++ b/tests/integration/rules/xdigit.phpt @@ -14,49 +14,49 @@ use Respect\Validation\Validator as v; try { v::xdigit()->check('aaa%a'); } catch (XdigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::xdigit(' ')->check('bbb%b'); } catch (XdigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::xdigit())->check('ccccc'); } catch (XdigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::xdigit('% '))->check('ddd%d'); } catch (XdigitException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::xdigit()->assert('eee^e'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::xdigit())->assert('fffff'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::xdigit('* &%')->assert('000^0'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::xdigit('^'))->assert('111^1'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/yes.phpt b/tests/integration/rules/yes.phpt index 314565d4..418ee886 100644 --- a/tests/integration/rules/yes.phpt +++ b/tests/integration/rules/yes.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::not(v::yes())->check('Yes'); } catch (YesException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::yes()->check('si'); } catch (YesException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::yes())->assert('Yes'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::yes()->assert('si'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/rules/zend.phpt b/tests/integration/rules/zend.phpt index 9eda01e0..3667de41 100644 --- a/tests/integration/rules/zend.phpt +++ b/tests/integration/rules/zend.phpt @@ -14,25 +14,25 @@ use Respect\Validation\Validator as v; try { v::zend('Hostname')->check('googlecombr'); } catch (ZendException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::not(v::zend('Hostname'))->check('google.com.br'); } catch (ZendException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::zend('Hostname')->assert('googlecombr'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } try { v::not(v::zend('Hostname'))->assert('google.com.br'); } catch (NestedValidationException $exception) { - echo $exception->getFullMessage().PHP_EOL; + echo $exception->getFullMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/integration/should_not_overwrite_defined_names.phpt b/tests/integration/should_not_overwrite_defined_names.phpt index 26e42b17..4bd2477a 100644 --- a/tests/integration/should_not_overwrite_defined_names.phpt +++ b/tests/integration/should_not_overwrite_defined_names.phpt @@ -15,7 +15,7 @@ $input = ['email' => 'not an email']; try { v::key('email', v::email()->setName('Email'))->setName('Foo')->check($input); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { @@ -23,13 +23,13 @@ try { // from the `Key` rule but it's actually from the `Validator`. v::key('email', v::email())->setName('Email')->check($input); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } try { v::key('email', v::email())->check($input); } catch (ValidationException $exception) { - echo $exception->getMessage().PHP_EOL; + echo $exception->getMessage() . PHP_EOL; } ?> --EXPECT-- diff --git a/tests/library/RuleTestCase.php b/tests/library/RuleTestCase.php index dead7c9d..02c64830 100644 --- a/tests/library/RuleTestCase.php +++ b/tests/library/RuleTestCase.php @@ -17,6 +17,7 @@ use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Message\Formatter; use Respect\Validation\Message\Stringifier\KeepOriginalStringName; use Respect\Validation\Validatable; + use function realpath; use function Respect\Stringifier\stringify; use function sprintf; @@ -63,7 +64,7 @@ abstract class RuleTestCase extends TestCase */ public function getFixtureDirectory(): string { - return realpath(__DIR__.'/../fixtures'); + return realpath(__DIR__ . '/../fixtures'); } /** diff --git a/tests/library/Rules/Stub.php b/tests/library/Rules/Stub.php index 8cdb8a6c..ba3522e9 100644 --- a/tests/library/Rules/Stub.php +++ b/tests/library/Rules/Stub.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Test\Rules; use Respect\Validation\Rules\AbstractRule; + use function array_shift; /** diff --git a/tests/unit/Exceptions/CheckExceptionsTest.php b/tests/unit/Exceptions/CheckExceptionsTest.php index 7aed390d..5426709a 100644 --- a/tests/unit/Exceptions/CheckExceptionsTest.php +++ b/tests/unit/Exceptions/CheckExceptionsTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Exceptions; use DirectoryIterator; use ReflectionClass; use Respect\Validation\Test\TestCase; + use function class_exists; use function mb_substr; use function sprintf; @@ -48,7 +49,7 @@ final class CheckExceptionsTest extends TestCase continue; } - $className = 'Respect\\Validation\\Rules\\'.$ruleName; + $className = 'Respect\\Validation\\Rules\\' . $ruleName; $reflectionClass = new ReflectionClass($className); if ($reflectionClass->isAbstract() || $reflectionClass->isInterface()) { continue; @@ -67,7 +68,7 @@ final class CheckExceptionsTest extends TestCase */ public function ruleHasAnExceptionWhichHasValidApi(string $ruleName): void { - $exceptionClass = 'Respect\\Validation\\Exceptions\\'.$ruleName.'Exception'; + $exceptionClass = 'Respect\\Validation\\Exceptions\\' . $ruleName . 'Exception'; self::assertTrue( class_exists($exceptionClass), sprintf('Expected exception class to exist: %s.', $ruleName) diff --git a/tests/unit/Exceptions/ValidationExceptionTest.php b/tests/unit/Exceptions/ValidationExceptionTest.php index 5ab1b84f..43cca878 100644 --- a/tests/unit/Exceptions/ValidationExceptionTest.php +++ b/tests/unit/Exceptions/ValidationExceptionTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Exceptions; use Respect\Validation\Message\Formatter; use Respect\Validation\Message\Stringifier\KeepOriginalStringName; use Respect\Validation\Test\TestCase; + use function trim; /** diff --git a/tests/unit/FactoryTest.php b/tests/unit/FactoryTest.php index f59d7e9d..2f544d6d 100644 --- a/tests/unit/FactoryTest.php +++ b/tests/unit/FactoryTest.php @@ -22,6 +22,7 @@ use Respect\Validation\Test\Rules\Invalid; use Respect\Validation\Test\Rules\Stub; use Respect\Validation\Test\Rules\Valid; use Respect\Validation\Test\TestCase; + use function sprintf; /** diff --git a/tests/unit/Rules/AbstractEnvelopeTest.php b/tests/unit/Rules/AbstractEnvelopeTest.php index 87b259b2..f26ed298 100644 --- a/tests/unit/Rules/AbstractEnvelopeTest.php +++ b/tests/unit/Rules/AbstractEnvelopeTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\TestCase; use Respect\Validation\Validatable; + use function array_intersect_key; /** diff --git a/tests/unit/Rules/AbstractRuleTest.php b/tests/unit/Rules/AbstractRuleTest.php index bf710257..e37a58b8 100644 --- a/tests/unit/Rules/AbstractRuleTest.php +++ b/tests/unit/Rules/AbstractRuleTest.php @@ -63,7 +63,7 @@ final class AbstractRuleTest extends TestCase $booleanResult, // Invoking it to trigger __invoke $abstractRuleMock($input), - 'When invoking an instance of AbstractRule, the method validate should'. + 'When invoking an instance of AbstractRule, the method validate should' . 'be called with the same input and return the same result.' ); } diff --git a/tests/unit/Rules/Base64Test.php b/tests/unit/Rules/Base64Test.php index 3f7d69c3..6e5cbf2f 100644 --- a/tests/unit/Rules/Base64Test.php +++ b/tests/unit/Rules/Base64Test.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function implode; /** diff --git a/tests/unit/Rules/CallTest.php b/tests/unit/Rules/CallTest.php index 9febca7a..559e7c0f 100644 --- a/tests/unit/Rules/CallTest.php +++ b/tests/unit/Rules/CallTest.php @@ -19,6 +19,7 @@ use Respect\Validation\Exceptions\AlwaysInvalidException; use Respect\Validation\Exceptions\CallException; use Respect\Validation\Test\TestCase; use Respect\Validation\Validatable; + use function restore_error_handler; use function set_error_handler; use function trigger_error; diff --git a/tests/unit/Rules/CallableTypeTest.php b/tests/unit/Rules/CallableTypeTest.php index 801e6888..c3d8964f 100644 --- a/tests/unit/Rules/CallableTypeTest.php +++ b/tests/unit/Rules/CallableTypeTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use const INF; /** diff --git a/tests/unit/Rules/CharsetTest.php b/tests/unit/Rules/CharsetTest.php index 9ca823be..dbe88fdd 100644 --- a/tests/unit/Rules/CharsetTest.php +++ b/tests/unit/Rules/CharsetTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function mb_convert_encoding; /** diff --git a/tests/unit/Rules/CountableTest.php b/tests/unit/Rules/CountableTest.php index 28153b30..ea6e5bc0 100644 --- a/tests/unit/Rules/CountableTest.php +++ b/tests/unit/Rules/CountableTest.php @@ -17,6 +17,7 @@ use ArrayIterator; use ArrayObject; use Respect\Validation\Test\RuleTestCase; use stdClass; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/DateTimeTest.php b/tests/unit/Rules/DateTimeTest.php index 1d8cbf28..39434286 100644 --- a/tests/unit/Rules/DateTimeTest.php +++ b/tests/unit/Rules/DateTimeTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use DateTime as DateTimeMutable; use DateTimeImmutable; use Respect\Validation\Test\RuleTestCase; + use function date_default_timezone_get; use function date_default_timezone_set; diff --git a/tests/unit/Rules/DirectoryTest.php b/tests/unit/Rules/DirectoryTest.php index 89a0e846..3f0013f3 100644 --- a/tests/unit/Rules/DirectoryTest.php +++ b/tests/unit/Rules/DirectoryTest.php @@ -17,6 +17,7 @@ use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use SplFileObject; use stdClass; + use function dir; /** diff --git a/tests/unit/Rules/EachTest.php b/tests/unit/Rules/EachTest.php index 99e4a8aa..f7bd024f 100644 --- a/tests/unit/Rules/EachTest.php +++ b/tests/unit/Rules/EachTest.php @@ -18,6 +18,7 @@ use Respect\Validation\Validatable; use SplStack; use stdClass; use Traversable; + use function range; /** diff --git a/tests/unit/Rules/EmailTest.php b/tests/unit/Rules/EmailTest.php index 1d4f3ea2..5bcf146f 100644 --- a/tests/unit/Rules/EmailTest.php +++ b/tests/unit/Rules/EmailTest.php @@ -19,6 +19,7 @@ use ReflectionException; use ReflectionProperty; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function tmpfile; /** diff --git a/tests/unit/Rules/EvenTest.php b/tests/unit/Rules/EvenTest.php index be2cbbdd..dd0cce79 100644 --- a/tests/unit/Rules/EvenTest.php +++ b/tests/unit/Rules/EvenTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use const INF; /** diff --git a/tests/unit/Rules/ExtensionTest.php b/tests/unit/Rules/ExtensionTest.php index e0694c6e..df515b7d 100644 --- a/tests/unit/Rules/ExtensionTest.php +++ b/tests/unit/Rules/ExtensionTest.php @@ -37,9 +37,9 @@ final class ExtensionTest extends RuleTestCase 'inc' => [new Extension('inc'), 'filename.inc'], 'bz2' => [new Extension('bz2'), 'filename.foo.bar.bz2'], 'php' => [new Extension('php'), new SplFileInfo(__FILE__)], - 'png' => [new Extension('png'), $this->getFixtureDirectory().'valid-image.png'], - 'gif' => [new Extension('gif'), $this->getFixtureDirectory().'valid-image.gif'], - 'file-invalid' => [new Extension('png'), $this->getFixtureDirectory().'invalid-image.png'], + 'png' => [new Extension('png'), $this->getFixtureDirectory() . 'valid-image.png'], + 'gif' => [new Extension('gif'), $this->getFixtureDirectory() . 'valid-image.gif'], + 'file-invalid' => [new Extension('png'), $this->getFixtureDirectory() . 'invalid-image.png'], ]; } diff --git a/tests/unit/Rules/FactorTest.php b/tests/unit/Rules/FactorTest.php index 3a875341..46669e02 100644 --- a/tests/unit/Rules/FactorTest.php +++ b/tests/unit/Rules/FactorTest.php @@ -16,9 +16,11 @@ namespace Respect\Validation\Rules; use DateTime; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function mt_getrandmax; use function mt_rand; use function uniqid; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/FalseValTest.php b/tests/unit/Rules/FalseValTest.php index bf992e72..194cefbb 100644 --- a/tests/unit/Rules/FalseValTest.php +++ b/tests/unit/Rules/FalseValTest.php @@ -15,7 +15,9 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function random_int; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/FileTest.php b/tests/unit/Rules/FileTest.php index 7c3a5d52..a337199a 100644 --- a/tests/unit/Rules/FileTest.php +++ b/tests/unit/Rules/FileTest.php @@ -17,6 +17,7 @@ use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use SplFileObject; use stdClass; + use const PHP_INT_MAX; /** @@ -39,8 +40,8 @@ final class FileTest extends RuleTestCase return [ 'filename' => [$sut, __FILE__], - 'SplFileInfo' => [$sut, new SplFileInfo($this->getFixtureDirectory().'/valid-image.png')], - 'SplFileObject' => [$sut, new SplFileObject($this->getFixtureDirectory().'/invalid-image.png')], + 'SplFileInfo' => [$sut, new SplFileInfo($this->getFixtureDirectory() . '/valid-image.png')], + 'SplFileObject' => [$sut, new SplFileObject($this->getFixtureDirectory() . '/invalid-image.png')], ]; } diff --git a/tests/unit/Rules/FilterVarTest.php b/tests/unit/Rules/FilterVarTest.php index ec4dd8b1..1f41ec4d 100644 --- a/tests/unit/Rules/FilterVarTest.php +++ b/tests/unit/Rules/FilterVarTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use const FILTER_FLAG_QUERY_REQUIRED; use const FILTER_SANITIZE_EMAIL; use const FILTER_VALIDATE_BOOLEAN; diff --git a/tests/unit/Rules/FiniteTest.php b/tests/unit/Rules/FiniteTest.php index 04dfb137..bdf7d067 100644 --- a/tests/unit/Rules/FiniteTest.php +++ b/tests/unit/Rules/FiniteTest.php @@ -15,7 +15,9 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function acos; + use const INF; use const PHP_INT_MAX; diff --git a/tests/unit/Rules/FloatTypeTest.php b/tests/unit/Rules/FloatTypeTest.php index 95c6bb3e..d449edf9 100644 --- a/tests/unit/Rules/FloatTypeTest.php +++ b/tests/unit/Rules/FloatTypeTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/ImageTest.php b/tests/unit/Rules/ImageTest.php index aae981b7..80865c6c 100644 --- a/tests/unit/Rules/ImageTest.php +++ b/tests/unit/Rules/ImageTest.php @@ -37,12 +37,12 @@ final class ImageTest extends RuleTestCase $rule = new Image(); return [ - [$rule, $this->getFixtureDirectory().'/valid-image.gif'], - [$rule, $this->getFixtureDirectory().'/valid-image.jpg'], - [$rule, $this->getFixtureDirectory().'/valid-image.png'], - [$rule, new SplFileInfo($this->getFixtureDirectory().'/valid-image.gif')], - [$rule, new SplFileInfo($this->getFixtureDirectory().'/valid-image.jpg')], - [$rule, new SplFileObject($this->getFixtureDirectory().'/valid-image.png')], + [$rule, $this->getFixtureDirectory() . '/valid-image.gif'], + [$rule, $this->getFixtureDirectory() . '/valid-image.jpg'], + [$rule, $this->getFixtureDirectory() . '/valid-image.png'], + [$rule, new SplFileInfo($this->getFixtureDirectory() . '/valid-image.gif')], + [$rule, new SplFileInfo($this->getFixtureDirectory() . '/valid-image.jpg')], + [$rule, new SplFileObject($this->getFixtureDirectory() . '/valid-image.png')], ]; } @@ -54,7 +54,7 @@ final class ImageTest extends RuleTestCase $rule = new Image(); return [ - [$rule, $this->getFixtureDirectory().'/invalid-image.png'], + [$rule, $this->getFixtureDirectory() . '/invalid-image.png'], [$rule, 'asdf'], [$rule, 1], [$rule, true], @@ -66,7 +66,7 @@ final class ImageTest extends RuleTestCase */ public function shouldValidateWithDefinedInstanceOfFileInfo(): void { - $input = $this->getFixtureDirectory().'/valid-image.gif'; + $input = $this->getFixtureDirectory() . '/valid-image.gif'; $finfo = $this->createMock(finfo::class); $finfo diff --git a/tests/unit/Rules/InfiniteTest.php b/tests/unit/Rules/InfiniteTest.php index 097090c9..f149998b 100644 --- a/tests/unit/Rules/InfiniteTest.php +++ b/tests/unit/Rules/InfiniteTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use const INF; use const PHP_INT_MAX; diff --git a/tests/unit/Rules/IntTypeTest.php b/tests/unit/Rules/IntTypeTest.php index 467fe8a2..301b1956 100644 --- a/tests/unit/Rules/IntTypeTest.php +++ b/tests/unit/Rules/IntTypeTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/IntValTest.php b/tests/unit/Rules/IntValTest.php index 7ae6e667..561a92c4 100644 --- a/tests/unit/Rules/IntValTest.php +++ b/tests/unit/Rules/IntValTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/IpTest.php b/tests/unit/Rules/IpTest.php index 7c4d3ab8..7eb340bc 100644 --- a/tests/unit/Rules/IpTest.php +++ b/tests/unit/Rules/IpTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Test\RuleTestCase; + use const FILTER_FLAG_IPV6; use const FILTER_FLAG_NO_PRIV_RANGE; diff --git a/tests/unit/Rules/LengthTest.php b/tests/unit/Rules/LengthTest.php index 9485a764..92c5eb1a 100644 --- a/tests/unit/Rules/LengthTest.php +++ b/tests/unit/Rules/LengthTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Test\RuleTestCase; use Respect\Validation\Test\Stubs\CountableStub; + use function range; use function tmpfile; diff --git a/tests/unit/Rules/MacAddressTest.php b/tests/unit/Rules/MacAddressTest.php index 52748f58..6342b7ab 100644 --- a/tests/unit/Rules/MacAddressTest.php +++ b/tests/unit/Rules/MacAddressTest.php @@ -14,8 +14,10 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function random_int; use function tmpfile; + use const PHP_INT_MAX; /** diff --git a/tests/unit/Rules/MaxAgeTest.php b/tests/unit/Rules/MaxAgeTest.php index 87066408..6e2df654 100644 --- a/tests/unit/Rules/MaxAgeTest.php +++ b/tests/unit/Rules/MaxAgeTest.php @@ -17,6 +17,7 @@ use DateTime; use DateTimeImmutable; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function date; use function strtotime; diff --git a/tests/unit/Rules/MimetypeTest.php b/tests/unit/Rules/MimetypeTest.php index 803fbfe9..7763f35c 100644 --- a/tests/unit/Rules/MimetypeTest.php +++ b/tests/unit/Rules/MimetypeTest.php @@ -17,8 +17,10 @@ use finfo; use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use SplFileObject; + use function random_int; use function tmpfile; + use const FILEINFO_MIME_TYPE; use const PHP_INT_MAX; diff --git a/tests/unit/Rules/MinAgeTest.php b/tests/unit/Rules/MinAgeTest.php index a1117d94..f06dbc20 100644 --- a/tests/unit/Rules/MinAgeTest.php +++ b/tests/unit/Rules/MinAgeTest.php @@ -17,6 +17,7 @@ use DateTime; use DateTimeImmutable; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function date; use function strtotime; diff --git a/tests/unit/Rules/NifTest.php b/tests/unit/Rules/NifTest.php index 7212cb6d..c4447503 100644 --- a/tests/unit/Rules/NifTest.php +++ b/tests/unit/Rules/NifTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function stream_context_create; /** diff --git a/tests/unit/Rules/NoTest.php b/tests/unit/Rules/NoTest.php index ec1223ea..56205cf6 100644 --- a/tests/unit/Rules/NoTest.php +++ b/tests/unit/Rules/NoTest.php @@ -14,8 +14,10 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function setlocale; use function sprintf; + use const LC_ALL; /** diff --git a/tests/unit/Rules/NumberTest.php b/tests/unit/Rules/NumberTest.php index e86043df..eb4bb376 100644 --- a/tests/unit/Rules/NumberTest.php +++ b/tests/unit/Rules/NumberTest.php @@ -15,8 +15,10 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function acos; use function sqrt; + use const INF; use const NAN; use const PHP_INT_MAX; diff --git a/tests/unit/Rules/OddTest.php b/tests/unit/Rules/OddTest.php index b2d2d43a..dfee30f5 100644 --- a/tests/unit/Rules/OddTest.php +++ b/tests/unit/Rules/OddTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function tmpfile; /** diff --git a/tests/unit/Rules/PhpLabelTest.php b/tests/unit/Rules/PhpLabelTest.php index a5c69410..bd2ae847 100644 --- a/tests/unit/Rules/PhpLabelTest.php +++ b/tests/unit/Rules/PhpLabelTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use DateTime; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function mb_strtoupper; use function mt_rand; use function random_int; diff --git a/tests/unit/Rules/PrintableTest.php b/tests/unit/Rules/PrintableTest.php index 93703787..b3de2c63 100644 --- a/tests/unit/Rules/PrintableTest.php +++ b/tests/unit/Rules/PrintableTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function chr; /** @@ -57,8 +58,8 @@ final class PrintableTest extends RuleTestCase return [ [$rule, ''], [$rule, null], - [$rule, 'foo'.chr(7).'bar'], - [$rule, 'foo'.chr(10).'bar'], + [$rule, 'foo' . chr(7) . 'bar'], + [$rule, 'foo' . chr(10) . 'bar'], ]; } } diff --git a/tests/unit/Rules/ReadableTest.php b/tests/unit/Rules/ReadableTest.php index a00ca186..db66af51 100644 --- a/tests/unit/Rules/ReadableTest.php +++ b/tests/unit/Rules/ReadableTest.php @@ -32,7 +32,7 @@ final class ReadableTest extends RuleTestCase */ public function providerForValidInput(): array { - $file = $this->getFixtureDirectory().'/valid-image.gif'; + $file = $this->getFixtureDirectory() . '/valid-image.gif'; $rule = new Readable(); return [ @@ -46,7 +46,7 @@ final class ReadableTest extends RuleTestCase */ public function providerForInvalidInput(): array { - $file = $this->getFixtureDirectory().'/invalid-image.gif'; + $file = $this->getFixtureDirectory() . '/invalid-image.gif'; $rule = new Readable(); return [ diff --git a/tests/unit/Rules/ResourceTypeTest.php b/tests/unit/Rules/ResourceTypeTest.php index 71cc9d10..06cee8d4 100644 --- a/tests/unit/Rules/ResourceTypeTest.php +++ b/tests/unit/Rules/ResourceTypeTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function stream_context_create; use function tmpfile; use function xml_parser_create; diff --git a/tests/unit/Rules/ScalarValTest.php b/tests/unit/Rules/ScalarValTest.php index 5fe8d5b9..8ee9ff60 100644 --- a/tests/unit/Rules/ScalarValTest.php +++ b/tests/unit/Rules/ScalarValTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function tmpfile; /** diff --git a/tests/unit/Rules/SfTest.php b/tests/unit/Rules/SfTest.php index 72af3c92..b750fd3d 100644 --- a/tests/unit/Rules/SfTest.php +++ b/tests/unit/Rules/SfTest.php @@ -19,6 +19,7 @@ use Symfony\Component\Validator\Constraints\IsFalse; use Symfony\Component\Validator\Constraints\IsNull; use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Validator\TraceableValidator; + use function class_exists; /** @@ -58,7 +59,9 @@ final class SfTest extends TestCase public function itShouldUseTheDefinedValidatorToValidate(): void { if (!class_exists(TraceableValidator::class)) { - self::markTestSkipped('The current version of Symfony Validator does not have '.TraceableValidator::class); + self::markTestSkipped( + 'The current version of Symfony Validator does not have ' . TraceableValidator::class + ); } $input = new stdClass(); diff --git a/tests/unit/Rules/StringValTest.php b/tests/unit/Rules/StringValTest.php index 3b4b381d..0ebd60dc 100644 --- a/tests/unit/Rules/StringValTest.php +++ b/tests/unit/Rules/StringValTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use Respect\Validation\Test\Stubs\ToStringStub; use stdClass; + use function tmpfile; /** diff --git a/tests/unit/Rules/SymbolicLinkTest.php b/tests/unit/Rules/SymbolicLinkTest.php index 2eb7c376..311fd296 100644 --- a/tests/unit/Rules/SymbolicLinkTest.php +++ b/tests/unit/Rules/SymbolicLinkTest.php @@ -16,6 +16,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use SplFileObject; + use function tmpfile; /** diff --git a/tests/unit/Rules/TypeTest.php b/tests/unit/Rules/TypeTest.php index abc8ed6e..a38d84b9 100644 --- a/tests/unit/Rules/TypeTest.php +++ b/tests/unit/Rules/TypeTest.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function tmpfile; /** diff --git a/tests/unit/Rules/UploadedTest.php b/tests/unit/Rules/UploadedTest.php index 8d69dc0f..d8d5d799 100644 --- a/tests/unit/Rules/UploadedTest.php +++ b/tests/unit/Rules/UploadedTest.php @@ -17,6 +17,7 @@ use PHPUnit\Framework\SkippedTestError; use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use stdClass; + use function extension_loaded; use function uopz_set_return; diff --git a/tests/unit/Rules/UuidTest.php b/tests/unit/Rules/UuidTest.php index 3c06e026..b9223767 100644 --- a/tests/unit/Rules/UuidTest.php +++ b/tests/unit/Rules/UuidTest.php @@ -16,7 +16,9 @@ namespace Respect\Validation\Rules; use Respect\Validation\Exceptions\ComponentException; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function random_int; + use const PHP_INT_MAX; use const PHP_INT_MIN; @@ -110,7 +112,7 @@ final class UuidTest extends RuleTestCase $version = random_int(6, PHP_INT_MAX); self::expectException(ComponentException::class); - self::expectExceptionMessage('Only versions 1, 3, 4, and 5 are supported: '.$version.' given'); + self::expectExceptionMessage('Only versions 1, 3, 4, and 5 are supported: ' . $version . ' given'); new Uuid($version); } @@ -123,7 +125,7 @@ final class UuidTest extends RuleTestCase $version = random_int(PHP_INT_MIN, 0); self::expectException(ComponentException::class); - self::expectExceptionMessage('Only versions 1, 3, 4, and 5 are supported: '.$version.' given'); + self::expectExceptionMessage('Only versions 1, 3, 4, and 5 are supported: ' . $version . ' given'); new Uuid($version); } diff --git a/tests/unit/Rules/VersionTest.php b/tests/unit/Rules/VersionTest.php index 6e8ee00d..73378ecc 100644 --- a/tests/unit/Rules/VersionTest.php +++ b/tests/unit/Rules/VersionTest.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; + use function uniqid; /** diff --git a/tests/unit/Rules/WritableTest.php b/tests/unit/Rules/WritableTest.php index a0bfc565..d7a6512c 100644 --- a/tests/unit/Rules/WritableTest.php +++ b/tests/unit/Rules/WritableTest.php @@ -17,6 +17,7 @@ use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use SplFileObject; use stdClass; + use function chmod; /** @@ -36,7 +37,7 @@ final class WritableTest extends RuleTestCase public function providerForValidInput(): array { $sut = new Writable(); - $filename = $this->getFixtureDirectory().'/valid-image.png'; + $filename = $this->getFixtureDirectory() . '/valid-image.png'; return [ 'writable file' => [$sut, $filename], @@ -52,7 +53,7 @@ final class WritableTest extends RuleTestCase public function providerForInvalidInput(): array { $rule = new Writable(); - $filename = $this->getFixtureDirectory().'/non-writable'; + $filename = $this->getFixtureDirectory() . '/non-writable'; $this->changeFileModeToUnwritable($filename); diff --git a/tests/unit/Rules/YesTest.php b/tests/unit/Rules/YesTest.php index 3bbc5184..30e43030 100644 --- a/tests/unit/Rules/YesTest.php +++ b/tests/unit/Rules/YesTest.php @@ -15,9 +15,11 @@ namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use stdClass; + use function random_int; use function setlocale; use function sprintf; + use const LC_ALL; use const PHP_INT_MAX; diff --git a/tests/unit/Rules/ZendTest.php b/tests/unit/Rules/ZendTest.php index 762ebdc8..cc66a46c 100644 --- a/tests/unit/Rules/ZendTest.php +++ b/tests/unit/Rules/ZendTest.php @@ -20,6 +20,7 @@ use Respect\Validation\Test\Stubs\ZendValidator; use Zend\Validator\ConfigProvider; use Zend\Validator\Date as ZendDate; use Zend\Validator\ValidatorInterface; + use function sprintf; /**