mirror of
https://github.com/Respect/Validation.git
synced 2024-06-04 14:52:17 +02:00
Changes on PHP-CS-Fixer configuration
Because of `declare(strict_types=1)` some changes were necessary.
This commit is contained in:
parent
0bb9b14658
commit
ef975629f3
44
.php_cs
44
.php_cs
|
@ -1,24 +1,24 @@
|
|||
<?php
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->files()
|
||||
->name('*.php')
|
||||
->name('*.phpt')
|
||||
->in('library')
|
||||
->in('tests');
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->level(\Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
||||
->fixers(array(
|
||||
'empty_return',
|
||||
'mb_str_functions',
|
||||
'multiline_spaces_before_semicolon',
|
||||
'newline_after_open_tag',
|
||||
'no_useless_else',
|
||||
'no_useless_return',
|
||||
'ordered_use',
|
||||
'phpdoc_order',
|
||||
'short_array_syntax',
|
||||
))
|
||||
->setUsingCache(true)
|
||||
->finder($finder);
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'@PHP71Migration:risky' => true,
|
||||
'phpdoc_align' => false,
|
||||
'phpdoc_summary' => false,
|
||||
'mb_str_functions' => true,
|
||||
'no_multiline_whitespace_before_semicolons' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'ordered_imports' => true,
|
||||
'phpdoc_order' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'no_short_echo_tag' => true,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->in(['library', 'tests'])
|
||||
->name('*.php')
|
||||
->name('*.phpt')
|
||||
);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"egulias/email-validator": "^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.8",
|
||||
"malukenho/docheader": "^0.1.4",
|
||||
"mikey179/vfsStream": "^1.6",
|
||||
"phpunit/phpunit": "^6.4",
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AgeException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AllOfException extends GroupedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AlnumException extends AlphaException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AlphaException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AlwaysInvalidException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AlwaysValidException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AnyOfException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ArrayTypeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ArrayValException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AtLeastException extends GroupedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class AttributeException extends NestedValidationException implements NonOmissibleExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class Base64Exception extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class BaseException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class BetweenException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class BoolTypeException extends ValidationException
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Respect/Validation.
|
||||
*
|
||||
|
@ -8,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class BoolValException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CallException extends GroupedValidationException implements NonOmissibleExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CallbackException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CharsetException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CnhException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CnpjException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CntrlException extends AlphaException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ConsonantException extends AlphaException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ContainsException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CountableException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CountryCodeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CpfException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CreditCardException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class CurrencyCodeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class DateTimeException extends ValidationException
|
||||
|
@ -29,7 +31,7 @@ class DateTimeException extends ValidationException
|
|||
public function configure($name, array $params = [])
|
||||
{
|
||||
$params['format'] = date(
|
||||
$params['format'],
|
||||
(string) $params['format'],
|
||||
strtotime('2005-12-30 01:02:03')
|
||||
);
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class DigitException extends AlphaException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class DirectoryException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class DomainException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class EachException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class EmailException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class EndsWithException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class EqualsException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class EvenException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
interface ExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ExecutableException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ExistsException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FalseValException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FibonacciException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FileException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FilterVarException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FloatTypeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class FloatValException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class GraphException extends AlphaException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class GroupedValidationException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class HexRgbColorException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IdenticalException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IdentityCardException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ImageException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class ImeiException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class InException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class InstanceException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IntTypeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IntValException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IpException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class IterableTypeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class JsonException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class KeyException extends AttributeException implements NonOmissibleExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class KeyNestedException extends AttributeException implements NonOmissibleExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class KeySetException extends GroupedValidationException implements NonOmissibleExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class KeyValueException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LanguageCodeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LeapDateException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LeapYearException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LengthException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions\Locale;
|
||||
|
||||
use Respect\Validation\Exceptions\ValidationException;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions\Locale;
|
||||
|
||||
use Respect\Validation\Exceptions\ValidationException;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LowercaseException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class LuhnException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MacAddressException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MaxException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MinException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MinimumAgeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MostOfException extends AtLeastException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class MultipleException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NegativeException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
use IteratorAggregate;
|
||||
|
@ -139,7 +141,7 @@ class NestedValidationException extends ValidationException implements IteratorA
|
|||
$relatedExceptions->rewind();
|
||||
$childException = $relatedExceptions->current();
|
||||
|
||||
return $relatedExceptions->count() === 1 && !$childException instanceof NonOmissibleExceptionInterface;
|
||||
return 1 === $relatedExceptions->count() && !$childException instanceof NonOmissibleExceptionInterface;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,7 +168,7 @@ class NestedValidationException extends ValidationException implements IteratorA
|
|||
if (isset($knownDepths[$currentDepthOriginal])) {
|
||||
$currentDepth = $knownDepths[$currentDepthOriginal];
|
||||
} elseif ($currentDepthOriginal > $lastDepthOriginal
|
||||
&& ($this->hasCustomTemplate() || $exceptionIterator->count() != 1)) {
|
||||
&& ($this->hasCustomTemplate() || 1 != $exceptionIterator->count())) {
|
||||
++$currentDepth;
|
||||
}
|
||||
|
||||
|
@ -217,7 +219,7 @@ class NestedValidationException extends ValidationException implements IteratorA
|
|||
$messages = [];
|
||||
$exceptions = $this->getIterator();
|
||||
|
||||
if ($this->hasCustomTemplate() || count($exceptions) != 1) {
|
||||
if ($this->hasCustomTemplate() || 1 != count($exceptions)) {
|
||||
$messages[] = sprintf('%s %s', $marker, $this->getMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NfeAccessKeyException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NoException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NoWhitespaceException extends ValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
interface NonOmissibleExceptionInterface extends ExceptionInterface
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NoneOfException extends NestedValidationException
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NotBlankException extends ValidationException
|
||||
|
@ -29,6 +31,6 @@ class NotBlankException extends ValidationException
|
|||
|
||||
public function chooseTemplate()
|
||||
{
|
||||
return $this->getName() == '' ? static::STANDARD : static::NAMED;
|
||||
return '' == $this->getName() ? static::STANDARD : static::NAMED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NotEmptyException extends ValidationException
|
||||
|
@ -28,6 +30,6 @@ class NotEmptyException extends ValidationException
|
|||
|
||||
public function chooseTemplate()
|
||||
{
|
||||
return $this->getName() == '' ? static::STANDARD : static::NAMED;
|
||||
return '' == $this->getName() ? static::STANDARD : static::NAMED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Respect\Validation\Exceptions;
|
||||
|
||||
class NotException extends GroupedValidationException
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue