-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change will bring many breaking changes. The good thing is that we can finally use more modern resources available in PHP. I can imagine that's not a popular change since it will bring many breaking changes to users, but we shouldn't be stuck in time because of that. Using some of those features will make it easier to contribute to the project. At least, I hope so. There are still some useless doc-blocks, and we're not using "readonly" properties when we could. I aim to send those changes soon. Signed-off-by: Henrique Moody <[email protected]>
- Loading branch information
1 parent
d98d010
commit 9a13c9f
Showing
531 changed files
with
1,003 additions
and
5,387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
*/ | ||
class AllOfException extends GroupedValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::NONE => 'All of the required rules must pass for {{name}}', | ||
self::SOME => 'These rules must pass for {{name}}', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
*/ | ||
final class AlnumException extends FilteredValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} must contain only letters (a-z) and digits (0-9)', | ||
self::EXTRA => '{{name}} must contain only letters (a-z), digits (0-9) and {{additionalChars}}', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
*/ | ||
final class AlphaException extends FilteredValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} must contain only letters (a-z)', | ||
self::EXTRA => '{{name}} must contain only letters (a-z) and {{additionalChars}}', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,14 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
* @author William Espindola <[email protected]> | ||
*/ | ||
final class AlwaysInvalidException extends ValidationException | ||
{ | ||
public const SIMPLE = 'simple'; | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} is always invalid', | ||
self::SIMPLE => '{{name}} is not valid', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
* @author William Espindola <[email protected]> | ||
*/ | ||
final class AlwaysValidException extends ValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} is always valid', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
*/ | ||
final class AnyOfException extends NestedValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => 'At least one of these rules must pass for {{name}}', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Emmerson Siqueira <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
* @author João Torquato <[email protected]> | ||
*/ | ||
final class ArrayTypeException extends ValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} must be of type array', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,12 @@ | |
|
||
namespace Respect\Validation\Exceptions; | ||
|
||
/** | ||
* @author Alexandre Gomes Gaigalas <[email protected]> | ||
* @author Emmerson Siqueira <[email protected]> | ||
* @author Henrique Moody <[email protected]> | ||
*/ | ||
final class ArrayValException extends ValidationException | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* @var array<string, array<string, string>> | ||
*/ | ||
protected $defaultTemplates = [ | ||
protected array $defaultTemplates = [ | ||
self::MODE_DEFAULT => [ | ||
self::STANDARD => '{{name}} must be an array value', | ||
], | ||
|
Oops, something went wrong.