diff --git a/src/Enum/File/Image/Svg/Attribute.php b/src/Enum/File/Image/Svg/Attribute.php index d21a95d..fcc5534 100644 --- a/src/Enum/File/Image/Svg/Attribute.php +++ b/src/Enum/File/Image/Svg/Attribute.php @@ -2,7 +2,7 @@ namespace HarmonyIO\Validation\Enum\File\Image\Svg; -class Attribute +final class Attribute { public const ACCENT_HEIGHT = 'accent-height'; public const ACCUMULATE = 'accumulate'; diff --git a/src/Enum/Network/Dns/RecordType.php b/src/Enum/Network/Dns/RecordType.php index 0b9bc74..e08d855 100644 --- a/src/Enum/Network/Dns/RecordType.php +++ b/src/Enum/Network/Dns/RecordType.php @@ -47,7 +47,7 @@ * @method static RecordType MAILA() * @method static RecordType ALL() */ -class RecordType extends Enum +final class RecordType extends Enum { // phpcs:disable SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedConstant private const A = Record::A; diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index 8f226b2..0c8d8ba 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -3,6 +3,6 @@ namespace HarmonyIO\Validation\Exception; //phpcs:ignore SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix -class Exception extends \Exception +abstract class Exception extends \Exception { } diff --git a/src/Exception/FileInfo.php b/src/Exception/FileInfo.php index 04019a0..302a8b2 100644 --- a/src/Exception/FileInfo.php +++ b/src/Exception/FileInfo.php @@ -2,6 +2,6 @@ namespace HarmonyIO\Validation\Exception; -class FileInfo extends Exception +final class FileInfo extends Exception { } diff --git a/src/Exception/InvalidAgeRange.php b/src/Exception/InvalidAgeRange.php index ccd5aa5..032942b 100644 --- a/src/Exception/InvalidAgeRange.php +++ b/src/Exception/InvalidAgeRange.php @@ -2,7 +2,7 @@ namespace HarmonyIO\Validation\Exception; -class InvalidAgeRange extends Exception +final class InvalidAgeRange extends Exception { private const MESSAGE_TEMPLATE = 'The minimum age (`%d`) can not be greater than the maximum age (`%d`).'; diff --git a/src/Exception/InvalidAspectRatio.php b/src/Exception/InvalidAspectRatio.php index dab7546..05d5019 100644 --- a/src/Exception/InvalidAspectRatio.php +++ b/src/Exception/InvalidAspectRatio.php @@ -2,7 +2,7 @@ namespace HarmonyIO\Validation\Exception; -class InvalidAspectRatio extends Exception +final class InvalidAspectRatio extends Exception { private const MESSAGE_TEMPLATE = 'The aspect ratio (`%s`) could not be parsed.'; diff --git a/src/Exception/InvalidCidrRange.php b/src/Exception/InvalidCidrRange.php index 8f745de..45b6836 100644 --- a/src/Exception/InvalidCidrRange.php +++ b/src/Exception/InvalidCidrRange.php @@ -2,7 +2,7 @@ namespace HarmonyIO\Validation\Exception; -class InvalidCidrRange extends Exception +final class InvalidCidrRange extends Exception { public function __construct(string $message, int $code) { diff --git a/src/Exception/InvalidFullyQualifiedClassOrInterfaceName.php b/src/Exception/InvalidFullyQualifiedClassOrInterfaceName.php index 15a21d6..2b8ad56 100644 --- a/src/Exception/InvalidFullyQualifiedClassOrInterfaceName.php +++ b/src/Exception/InvalidFullyQualifiedClassOrInterfaceName.php @@ -2,7 +2,7 @@ namespace HarmonyIO\Validation\Exception; -class InvalidFullyQualifiedClassOrInterfaceName extends Exception +final class InvalidFullyQualifiedClassOrInterfaceName extends Exception { private const MESSAGE_TEMPLATE = 'Expected type `%s` should be a valid fully qualified class or interface name.'; diff --git a/src/Exception/InvalidResponse.php b/src/Exception/InvalidResponse.php index 2e6b55d..e984c7f 100644 --- a/src/Exception/InvalidResponse.php +++ b/src/Exception/InvalidResponse.php @@ -2,6 +2,6 @@ namespace HarmonyIO\Validation\Exception; -class InvalidResponse extends Exception +final class InvalidResponse extends Exception { } diff --git a/src/Exception/InvalidXml.php b/src/Exception/InvalidXml.php index d49882f..372c2df 100644 --- a/src/Exception/InvalidXml.php +++ b/src/Exception/InvalidXml.php @@ -2,6 +2,6 @@ namespace HarmonyIO\Validation\Exception; -class InvalidXml extends Exception +final class InvalidXml extends Exception { } diff --git a/src/Exception/RequestFailed.php b/src/Exception/RequestFailed.php index c8791b8..421260d 100644 --- a/src/Exception/RequestFailed.php +++ b/src/Exception/RequestFailed.php @@ -2,6 +2,6 @@ namespace HarmonyIO\Validation\Exception; -class RequestFailed extends Exception +final class RequestFailed extends Exception { } diff --git a/src/Rule/Age/Exact.php b/src/Rule/Age/Exact.php index af3a9a5..aea909d 100644 --- a/src/Rule/Age/Exact.php +++ b/src/Rule/Age/Exact.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Exact implements Rule +final class Exact implements Rule { /** @var int */ private $age; diff --git a/src/Rule/Age/Maximum.php b/src/Rule/Age/Maximum.php index 0858481..62004ac 100644 --- a/src/Rule/Age/Maximum.php +++ b/src/Rule/Age/Maximum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Maximum implements Rule +final class Maximum implements Rule { /** @var int */ private $maximumAge; diff --git a/src/Rule/Age/Minimum.php b/src/Rule/Age/Minimum.php index 160b07e..5047e29 100644 --- a/src/Rule/Age/Minimum.php +++ b/src/Rule/Age/Minimum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Minimum implements Rule +final class Minimum implements Rule { /** @var int */ private $minimumAge; diff --git a/src/Rule/Age/Range.php b/src/Rule/Age/Range.php index 4adc640..cf9d6cb 100644 --- a/src/Rule/Age/Range.php +++ b/src/Rule/Age/Range.php @@ -8,7 +8,7 @@ use HarmonyIO\Validation\Rule\Combinator\All; use HarmonyIO\Validation\Rule\Rule; -class Range implements Rule +final class Range implements Rule { /** @var int */ private $minimumAge; diff --git a/src/Rule/BankAccount/Iban/Country/Albania.php b/src/Rule/BankAccount/Iban/Country/Albania.php index 82f5f22..d909a5f 100644 --- a/src/Rule/BankAccount/Iban/Country/Albania.php +++ b/src/Rule/BankAccount/Iban/Country/Albania.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Albania implements Rule +final class Albania implements Rule { private const PATTERN = '~^AL\d{2}\d{8}[a–zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Andorra.php b/src/Rule/BankAccount/Iban/Country/Andorra.php index 975cb4e..d7b961c 100644 --- a/src/Rule/BankAccount/Iban/Country/Andorra.php +++ b/src/Rule/BankAccount/Iban/Country/Andorra.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Andorra implements Rule +final class Andorra implements Rule { private const PATTERN = '~^AD\d{2}\d{4}\d{4}[a–zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Austria.php b/src/Rule/BankAccount/Iban/Country/Austria.php index c530181..ca0fcdd 100644 --- a/src/Rule/BankAccount/Iban/Country/Austria.php +++ b/src/Rule/BankAccount/Iban/Country/Austria.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Austria implements Rule +final class Austria implements Rule { private const PATTERN = '~^AT\d{2}\d{5}\d{11}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Azerbaijan.php b/src/Rule/BankAccount/Iban/Country/Azerbaijan.php index b4f0dcd..de53c07 100644 --- a/src/Rule/BankAccount/Iban/Country/Azerbaijan.php +++ b/src/Rule/BankAccount/Iban/Country/Azerbaijan.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Azerbaijan implements Rule +final class Azerbaijan implements Rule { private const PATTERN = '~^AZ\d{2}[A-Z]{4}[a-zA-Z0-9]{20}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Bahrain.php b/src/Rule/BankAccount/Iban/Country/Bahrain.php index 770f008..80464df 100644 --- a/src/Rule/BankAccount/Iban/Country/Bahrain.php +++ b/src/Rule/BankAccount/Iban/Country/Bahrain.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Bahrain implements Rule +final class Bahrain implements Rule { private const PATTERN = '~^BH\d{2}[A-Z]{4}[a-zA-Z0-9]{14}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Belgium.php b/src/Rule/BankAccount/Iban/Country/Belgium.php index 8f10683..d27f115 100644 --- a/src/Rule/BankAccount/Iban/Country/Belgium.php +++ b/src/Rule/BankAccount/Iban/Country/Belgium.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Belgium implements Rule +final class Belgium implements Rule { private const PATTERN = '~^BE\d{2}\d{3}\d{7}\d{2}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/BosniaAndHerzegovina.php b/src/Rule/BankAccount/Iban/Country/BosniaAndHerzegovina.php index 642b4aa..6d8a176 100644 --- a/src/Rule/BankAccount/Iban/Country/BosniaAndHerzegovina.php +++ b/src/Rule/BankAccount/Iban/Country/BosniaAndHerzegovina.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class BosniaAndHerzegovina implements Rule +final class BosniaAndHerzegovina implements Rule { private const PATTERN = '~^BA39\d{3}\d{3}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Brazil.php b/src/Rule/BankAccount/Iban/Country/Brazil.php index 9ce9bd5..e787f38 100644 --- a/src/Rule/BankAccount/Iban/Country/Brazil.php +++ b/src/Rule/BankAccount/Iban/Country/Brazil.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Brazil implements Rule +final class Brazil implements Rule { private const PATTERN = '~^BR\d{2}\d{8}\d{5}\d{10}[A-Z]{1}[a-zA-Z0-9]{1}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/BritishVirginIslands.php b/src/Rule/BankAccount/Iban/Country/BritishVirginIslands.php index 6a665cf..307f616 100644 --- a/src/Rule/BankAccount/Iban/Country/BritishVirginIslands.php +++ b/src/Rule/BankAccount/Iban/Country/BritishVirginIslands.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class BritishVirginIslands implements Rule +final class BritishVirginIslands implements Rule { private const PATTERN = '~^VG\d{2}[A-Z]{4}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Bulgaria.php b/src/Rule/BankAccount/Iban/Country/Bulgaria.php index 975932c..51f7aed 100644 --- a/src/Rule/BankAccount/Iban/Country/Bulgaria.php +++ b/src/Rule/BankAccount/Iban/Country/Bulgaria.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Bulgaria implements Rule +final class Bulgaria implements Rule { private const PATTERN = '~^BG\d{2}[A-Z]{4}\d{4}[a-zA-Z0-9]{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/CostaRica.php b/src/Rule/BankAccount/Iban/Country/CostaRica.php index 91ae23d..6d55019 100644 --- a/src/Rule/BankAccount/Iban/Country/CostaRica.php +++ b/src/Rule/BankAccount/Iban/Country/CostaRica.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class CostaRica implements Rule +final class CostaRica implements Rule { private const PATTERN = '~^CR\d{2}0\d{3}\d{14}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Croatia.php b/src/Rule/BankAccount/Iban/Country/Croatia.php index b44e443..8d14b67 100644 --- a/src/Rule/BankAccount/Iban/Country/Croatia.php +++ b/src/Rule/BankAccount/Iban/Country/Croatia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Croatia implements Rule +final class Croatia implements Rule { private const PATTERN = '~^HR\d{2}\d{7}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Cyprus.php b/src/Rule/BankAccount/Iban/Country/Cyprus.php index a4ea66c..2d3262a 100644 --- a/src/Rule/BankAccount/Iban/Country/Cyprus.php +++ b/src/Rule/BankAccount/Iban/Country/Cyprus.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Cyprus implements Rule +final class Cyprus implements Rule { private const PATTERN = '~^CY\d{2}\d{3}\d{5}[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/CzechRepublic.php b/src/Rule/BankAccount/Iban/Country/CzechRepublic.php index b4a41a0..91e9af2 100644 --- a/src/Rule/BankAccount/Iban/Country/CzechRepublic.php +++ b/src/Rule/BankAccount/Iban/Country/CzechRepublic.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class CzechRepublic implements Rule +final class CzechRepublic implements Rule { private const PATTERN = '~^CZ\d{2}\d{4}\d{6}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Denmark.php b/src/Rule/BankAccount/Iban/Country/Denmark.php index 761a274..106051c 100644 --- a/src/Rule/BankAccount/Iban/Country/Denmark.php +++ b/src/Rule/BankAccount/Iban/Country/Denmark.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Denmark implements Rule +final class Denmark implements Rule { private const PATTERN = '~^DK\d{2}\d{4}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/DominicanRepublic.php b/src/Rule/BankAccount/Iban/Country/DominicanRepublic.php index 4766af4..73f77ae 100644 --- a/src/Rule/BankAccount/Iban/Country/DominicanRepublic.php +++ b/src/Rule/BankAccount/Iban/Country/DominicanRepublic.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class DominicanRepublic implements Rule +final class DominicanRepublic implements Rule { private const PATTERN = '~^DO\d{2}[A-Z]{4}\d{20}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/EastTimor.php b/src/Rule/BankAccount/Iban/Country/EastTimor.php index a232fd6..2b7b293 100644 --- a/src/Rule/BankAccount/Iban/Country/EastTimor.php +++ b/src/Rule/BankAccount/Iban/Country/EastTimor.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class EastTimor implements Rule +final class EastTimor implements Rule { private const PATTERN = '~^TL38\d{3}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Estonia.php b/src/Rule/BankAccount/Iban/Country/Estonia.php index 9085dd9..2bd8616 100644 --- a/src/Rule/BankAccount/Iban/Country/Estonia.php +++ b/src/Rule/BankAccount/Iban/Country/Estonia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Estonia implements Rule +final class Estonia implements Rule { private const PATTERN = '~^EE\d{2}\d{2}\d{2}\d{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/FaroeIslands.php b/src/Rule/BankAccount/Iban/Country/FaroeIslands.php index 1008df9..a13d5a6 100644 --- a/src/Rule/BankAccount/Iban/Country/FaroeIslands.php +++ b/src/Rule/BankAccount/Iban/Country/FaroeIslands.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class FaroeIslands implements Rule +final class FaroeIslands implements Rule { private const PATTERN = '~^FO\d{2}\d{4}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Finland.php b/src/Rule/BankAccount/Iban/Country/Finland.php index eb98be1..c1fa0d5 100644 --- a/src/Rule/BankAccount/Iban/Country/Finland.php +++ b/src/Rule/BankAccount/Iban/Country/Finland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Finland implements Rule +final class Finland implements Rule { private const PATTERN = '~^FI\d{2}\d{6}\d{8}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/France.php b/src/Rule/BankAccount/Iban/Country/France.php index 3b9591c..0cf226c 100644 --- a/src/Rule/BankAccount/Iban/Country/France.php +++ b/src/Rule/BankAccount/Iban/Country/France.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class France implements Rule +final class France implements Rule { private const PATTERN = '~^FR\d{2}\d{5}\d{5}[a-zA-Z0-9]{11}\d{2}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Georgia.php b/src/Rule/BankAccount/Iban/Country/Georgia.php index c48f566..9b0f420 100644 --- a/src/Rule/BankAccount/Iban/Country/Georgia.php +++ b/src/Rule/BankAccount/Iban/Country/Georgia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Georgia implements Rule +final class Georgia implements Rule { private const PATTERN = '~^GE\d{2}[A-Z]{2}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Germany.php b/src/Rule/BankAccount/Iban/Country/Germany.php index d8f69a7..9bcf9e5 100644 --- a/src/Rule/BankAccount/Iban/Country/Germany.php +++ b/src/Rule/BankAccount/Iban/Country/Germany.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Germany implements Rule +final class Germany implements Rule { private const PATTERN = '~^DE\d{2}\d{8}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Gibraltar.php b/src/Rule/BankAccount/Iban/Country/Gibraltar.php index e158043..7b28140 100644 --- a/src/Rule/BankAccount/Iban/Country/Gibraltar.php +++ b/src/Rule/BankAccount/Iban/Country/Gibraltar.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Gibraltar implements Rule +final class Gibraltar implements Rule { private const PATTERN = '~^GI\d{2}[A-Z]{4}[a-zA-Z0-9]{15}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Greece.php b/src/Rule/BankAccount/Iban/Country/Greece.php index 7308f61..912e3bb 100644 --- a/src/Rule/BankAccount/Iban/Country/Greece.php +++ b/src/Rule/BankAccount/Iban/Country/Greece.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Greece implements Rule +final class Greece implements Rule { private const PATTERN = '~^GR\d{2}\d{3}\d{4}[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Greenland.php b/src/Rule/BankAccount/Iban/Country/Greenland.php index 1609735..bd0cf00 100644 --- a/src/Rule/BankAccount/Iban/Country/Greenland.php +++ b/src/Rule/BankAccount/Iban/Country/Greenland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Greenland implements Rule +final class Greenland implements Rule { private const PATTERN = '~^GL\d{2}\d{4}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Guatemala.php b/src/Rule/BankAccount/Iban/Country/Guatemala.php index 96b2afc..255c9bf 100644 --- a/src/Rule/BankAccount/Iban/Country/Guatemala.php +++ b/src/Rule/BankAccount/Iban/Country/Guatemala.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Guatemala implements Rule +final class Guatemala implements Rule { private const PATTERN = '~^GT\d{2}[A-Z]{4}\d{2}\d{2}[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Hungary.php b/src/Rule/BankAccount/Iban/Country/Hungary.php index 5f3eadc..947cb45 100644 --- a/src/Rule/BankAccount/Iban/Country/Hungary.php +++ b/src/Rule/BankAccount/Iban/Country/Hungary.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Hungary implements Rule +final class Hungary implements Rule { private const PATTERN = '~^HU\d{2}\d{3}\d{5}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Iceland.php b/src/Rule/BankAccount/Iban/Country/Iceland.php index 24dbe0f..caaa644 100644 --- a/src/Rule/BankAccount/Iban/Country/Iceland.php +++ b/src/Rule/BankAccount/Iban/Country/Iceland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Iceland implements Rule +final class Iceland implements Rule { private const PATTERN = '~^IS\d{2}\d{4}\d{2}\d{6}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Ireland.php b/src/Rule/BankAccount/Iban/Country/Ireland.php index 2ceb874..eefb1e3 100644 --- a/src/Rule/BankAccount/Iban/Country/Ireland.php +++ b/src/Rule/BankAccount/Iban/Country/Ireland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Ireland implements Rule +final class Ireland implements Rule { private const PATTERN = '~^IE\d{2}[A-Z]{4}\d{6}\d{8}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Israel.php b/src/Rule/BankAccount/Iban/Country/Israel.php index 9f73b96..7307e67 100644 --- a/src/Rule/BankAccount/Iban/Country/Israel.php +++ b/src/Rule/BankAccount/Iban/Country/Israel.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Israel implements Rule +final class Israel implements Rule { private const PATTERN = '~^IL\d{2}\d{3}\d{3}\d{13}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Italy.php b/src/Rule/BankAccount/Iban/Country/Italy.php index 706124d..7d6bafc 100644 --- a/src/Rule/BankAccount/Iban/Country/Italy.php +++ b/src/Rule/BankAccount/Iban/Country/Italy.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Italy implements Rule +final class Italy implements Rule { private const PATTERN = '~^IT\d{2}[A-Z]{1}\d{5}\d{5}[a-zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Jordan.php b/src/Rule/BankAccount/Iban/Country/Jordan.php index 27231bf..358ea16 100644 --- a/src/Rule/BankAccount/Iban/Country/Jordan.php +++ b/src/Rule/BankAccount/Iban/Country/Jordan.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Jordan implements Rule +final class Jordan implements Rule { private const PATTERN = '~^JO\d{2}[A-Z]{4}\d{4}[a-zA-Z0-9]{18}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Kazakhstan.php b/src/Rule/BankAccount/Iban/Country/Kazakhstan.php index 13062ac..14ce58c 100644 --- a/src/Rule/BankAccount/Iban/Country/Kazakhstan.php +++ b/src/Rule/BankAccount/Iban/Country/Kazakhstan.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Kazakhstan implements Rule +final class Kazakhstan implements Rule { private const PATTERN = '~^KZ\d{2}\d{3}[a-zA-Z0-9]{13}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Kosovo.php b/src/Rule/BankAccount/Iban/Country/Kosovo.php index 2fa3c56..bb367b2 100644 --- a/src/Rule/BankAccount/Iban/Country/Kosovo.php +++ b/src/Rule/BankAccount/Iban/Country/Kosovo.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Kosovo implements Rule +final class Kosovo implements Rule { private const PATTERN = '~^XK\d{2}\d{4}[a-zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Kuwait.php b/src/Rule/BankAccount/Iban/Country/Kuwait.php index ce3be88..a4a34a4 100644 --- a/src/Rule/BankAccount/Iban/Country/Kuwait.php +++ b/src/Rule/BankAccount/Iban/Country/Kuwait.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Kuwait implements Rule +final class Kuwait implements Rule { private const PATTERN = '~^KW\d{2}[A-Z]{4}[a-zA-Z0-9]{22}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Latvia.php b/src/Rule/BankAccount/Iban/Country/Latvia.php index 07f11f4..6dd2c06 100644 --- a/src/Rule/BankAccount/Iban/Country/Latvia.php +++ b/src/Rule/BankAccount/Iban/Country/Latvia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Latvia implements Rule +final class Latvia implements Rule { private const PATTERN = '~^LV\d{2}[A-Z]{4}[a-zA-Z0-9]{13}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Lebanon.php b/src/Rule/BankAccount/Iban/Country/Lebanon.php index d47137f..240918a 100644 --- a/src/Rule/BankAccount/Iban/Country/Lebanon.php +++ b/src/Rule/BankAccount/Iban/Country/Lebanon.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Lebanon implements Rule +final class Lebanon implements Rule { private const PATTERN = '~^LB\d{2}\d{4}[a-zA-Z0-9]{20}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Liechtenstein.php b/src/Rule/BankAccount/Iban/Country/Liechtenstein.php index 209e1c7..4654b38 100644 --- a/src/Rule/BankAccount/Iban/Country/Liechtenstein.php +++ b/src/Rule/BankAccount/Iban/Country/Liechtenstein.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Liechtenstein implements Rule +final class Liechtenstein implements Rule { private const PATTERN = '~^LI\d{2}\d{5}[a-zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Lithuania.php b/src/Rule/BankAccount/Iban/Country/Lithuania.php index 0246ba2..2bed48e 100644 --- a/src/Rule/BankAccount/Iban/Country/Lithuania.php +++ b/src/Rule/BankAccount/Iban/Country/Lithuania.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Lithuania implements Rule +final class Lithuania implements Rule { private const PATTERN = '~^LT\d{2}\d{5}\d{11}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Luxembourg.php b/src/Rule/BankAccount/Iban/Country/Luxembourg.php index e862130..25ce644 100644 --- a/src/Rule/BankAccount/Iban/Country/Luxembourg.php +++ b/src/Rule/BankAccount/Iban/Country/Luxembourg.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Luxembourg implements Rule +final class Luxembourg implements Rule { private const PATTERN = '~^LU\d{2}\d{3}[a-zA-Z0-9]{13}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Macedonia.php b/src/Rule/BankAccount/Iban/Country/Macedonia.php index ce9ecfd..880dc55 100644 --- a/src/Rule/BankAccount/Iban/Country/Macedonia.php +++ b/src/Rule/BankAccount/Iban/Country/Macedonia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Macedonia implements Rule +final class Macedonia implements Rule { private const PATTERN = '~^MK07\d{3}[a-zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Malta.php b/src/Rule/BankAccount/Iban/Country/Malta.php index 5e78a69..60655ec 100644 --- a/src/Rule/BankAccount/Iban/Country/Malta.php +++ b/src/Rule/BankAccount/Iban/Country/Malta.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Malta implements Rule +final class Malta implements Rule { private const PATTERN = '~^MT\d{2}[A-Z]{4}\d{5}[a-zA-Z0-9]{18}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Mauritania.php b/src/Rule/BankAccount/Iban/Country/Mauritania.php index fe31810..15be94b 100644 --- a/src/Rule/BankAccount/Iban/Country/Mauritania.php +++ b/src/Rule/BankAccount/Iban/Country/Mauritania.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Mauritania implements Rule +final class Mauritania implements Rule { private const PATTERN = '~^MR13\d{5}\d{5}\d{11}\d{2}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Mauritius.php b/src/Rule/BankAccount/Iban/Country/Mauritius.php index da5b958..10d6561 100644 --- a/src/Rule/BankAccount/Iban/Country/Mauritius.php +++ b/src/Rule/BankAccount/Iban/Country/Mauritius.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Mauritius implements Rule +final class Mauritius implements Rule { private const PATTERN = '~^MU\d{2}[A-Z]{4}[a-zA-Z0-9]{22}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Moldova.php b/src/Rule/BankAccount/Iban/Country/Moldova.php index 7ae252f..1d9a0ad 100644 --- a/src/Rule/BankAccount/Iban/Country/Moldova.php +++ b/src/Rule/BankAccount/Iban/Country/Moldova.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Moldova implements Rule +final class Moldova implements Rule { private const PATTERN = '~^MD\d{2}[A-Z]{2}[a-zA-Z0-9]{18}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Monaco.php b/src/Rule/BankAccount/Iban/Country/Monaco.php index 5f2f022..4dcd5bd 100644 --- a/src/Rule/BankAccount/Iban/Country/Monaco.php +++ b/src/Rule/BankAccount/Iban/Country/Monaco.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Monaco implements Rule +final class Monaco implements Rule { private const PATTERN = '~^MC\d{2}\d{5}\d{5}[a-zA-Z0-9]{11}\d{2}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Montenegro.php b/src/Rule/BankAccount/Iban/Country/Montenegro.php index a9a0dd4..5b930ee 100644 --- a/src/Rule/BankAccount/Iban/Country/Montenegro.php +++ b/src/Rule/BankAccount/Iban/Country/Montenegro.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Montenegro implements Rule +final class Montenegro implements Rule { private const PATTERN = '~^ME25\d{3}\d{15}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Netherlands.php b/src/Rule/BankAccount/Iban/Country/Netherlands.php index 1d7235e..1c9be1f 100644 --- a/src/Rule/BankAccount/Iban/Country/Netherlands.php +++ b/src/Rule/BankAccount/Iban/Country/Netherlands.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Netherlands implements Rule +final class Netherlands implements Rule { private const PATTERN = '~^NL\d{2}[A-Z]{4}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Norway.php b/src/Rule/BankAccount/Iban/Country/Norway.php index 449e74a..b89ad19 100644 --- a/src/Rule/BankAccount/Iban/Country/Norway.php +++ b/src/Rule/BankAccount/Iban/Country/Norway.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Norway implements Rule +final class Norway implements Rule { private const PATTERN = '~^NO\d{2}\d{4}\d{7}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Pakistan.php b/src/Rule/BankAccount/Iban/Country/Pakistan.php index 1f84e64..fb7acea 100644 --- a/src/Rule/BankAccount/Iban/Country/Pakistan.php +++ b/src/Rule/BankAccount/Iban/Country/Pakistan.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Pakistan implements Rule +final class Pakistan implements Rule { private const PATTERN = '~^PK\d{2}[A-Z]{4}[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Palestine.php b/src/Rule/BankAccount/Iban/Country/Palestine.php index 615228b..2050b41 100644 --- a/src/Rule/BankAccount/Iban/Country/Palestine.php +++ b/src/Rule/BankAccount/Iban/Country/Palestine.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Palestine implements Rule +final class Palestine implements Rule { private const PATTERN = '~^PS\d{2}[A-Z]{4}[a-zA-Z0-9]{21}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Poland.php b/src/Rule/BankAccount/Iban/Country/Poland.php index dcba92b..6f1d808 100644 --- a/src/Rule/BankAccount/Iban/Country/Poland.php +++ b/src/Rule/BankAccount/Iban/Country/Poland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Poland implements Rule +final class Poland implements Rule { private const PATTERN = '~^PL\d{2}\d{8}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Portugal.php b/src/Rule/BankAccount/Iban/Country/Portugal.php index 9dc9ca9..52c53b1 100644 --- a/src/Rule/BankAccount/Iban/Country/Portugal.php +++ b/src/Rule/BankAccount/Iban/Country/Portugal.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Portugal implements Rule +final class Portugal implements Rule { private const PATTERN = '~^PT50\d{4}\d{4}\d{11}\d{2}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Qatar.php b/src/Rule/BankAccount/Iban/Country/Qatar.php index eadbdc7..7d19c6d 100644 --- a/src/Rule/BankAccount/Iban/Country/Qatar.php +++ b/src/Rule/BankAccount/Iban/Country/Qatar.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Qatar implements Rule +final class Qatar implements Rule { private const PATTERN = '~^QA\d{2}[A-Z]{4}[a-zA-Z0-9]{21}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Romania.php b/src/Rule/BankAccount/Iban/Country/Romania.php index 3ea1bad..bc4c4dd 100644 --- a/src/Rule/BankAccount/Iban/Country/Romania.php +++ b/src/Rule/BankAccount/Iban/Country/Romania.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Romania implements Rule +final class Romania implements Rule { private const PATTERN = '~^RO\d{2}[A-Z]{4}[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/SanMarino.php b/src/Rule/BankAccount/Iban/Country/SanMarino.php index 96e586f..7bfe64f 100644 --- a/src/Rule/BankAccount/Iban/Country/SanMarino.php +++ b/src/Rule/BankAccount/Iban/Country/SanMarino.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class SanMarino implements Rule +final class SanMarino implements Rule { private const PATTERN = '~^SM\d{2}[A-Z]{1}\d{5}\d{5}[a-zA-Z0-9]{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/SaudiArabia.php b/src/Rule/BankAccount/Iban/Country/SaudiArabia.php index b7cb15d..71463a7 100644 --- a/src/Rule/BankAccount/Iban/Country/SaudiArabia.php +++ b/src/Rule/BankAccount/Iban/Country/SaudiArabia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class SaudiArabia implements Rule +final class SaudiArabia implements Rule { private const PATTERN = '~^SA\d{2}\d{2}[a-zA-Z0-9]{18}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Serbia.php b/src/Rule/BankAccount/Iban/Country/Serbia.php index 82d9e20..c7a3ee2 100644 --- a/src/Rule/BankAccount/Iban/Country/Serbia.php +++ b/src/Rule/BankAccount/Iban/Country/Serbia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Serbia implements Rule +final class Serbia implements Rule { private const PATTERN = '~^RS35\d{3}\d{15}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Slovakia.php b/src/Rule/BankAccount/Iban/Country/Slovakia.php index 6e09792..670ee95 100644 --- a/src/Rule/BankAccount/Iban/Country/Slovakia.php +++ b/src/Rule/BankAccount/Iban/Country/Slovakia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Slovakia implements Rule +final class Slovakia implements Rule { private const PATTERN = '~^SK\d{2}\d{4}\d{6}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Slovenia.php b/src/Rule/BankAccount/Iban/Country/Slovenia.php index 063c354..fd88a1f 100644 --- a/src/Rule/BankAccount/Iban/Country/Slovenia.php +++ b/src/Rule/BankAccount/Iban/Country/Slovenia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Slovenia implements Rule +final class Slovenia implements Rule { private const PATTERN = '~^SI56\d{2}\d{3}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Spain.php b/src/Rule/BankAccount/Iban/Country/Spain.php index 6ed2a48..99aa9f8 100644 --- a/src/Rule/BankAccount/Iban/Country/Spain.php +++ b/src/Rule/BankAccount/Iban/Country/Spain.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Spain implements Rule +final class Spain implements Rule { private const PATTERN = '~^ES\d{2}\d{4}\d{4}\d{2}\d{10}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Sweden.php b/src/Rule/BankAccount/Iban/Country/Sweden.php index 6adb67f..bc9fe0d 100644 --- a/src/Rule/BankAccount/Iban/Country/Sweden.php +++ b/src/Rule/BankAccount/Iban/Country/Sweden.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Sweden implements Rule +final class Sweden implements Rule { private const PATTERN = '~^SE\d{2}\d{3}\d{17}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Switzerland.php b/src/Rule/BankAccount/Iban/Country/Switzerland.php index 689cfb5..57c0ca0 100644 --- a/src/Rule/BankAccount/Iban/Country/Switzerland.php +++ b/src/Rule/BankAccount/Iban/Country/Switzerland.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Switzerland implements Rule +final class Switzerland implements Rule { private const PATTERN = '~^CH\d{2}\d{5}\d{12}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Tunisia.php b/src/Rule/BankAccount/Iban/Country/Tunisia.php index cf73e03..add8169 100644 --- a/src/Rule/BankAccount/Iban/Country/Tunisia.php +++ b/src/Rule/BankAccount/Iban/Country/Tunisia.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Tunisia implements Rule +final class Tunisia implements Rule { private const PATTERN = '~^TN59\d{2}\d{3}\d{15}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/Turkey.php b/src/Rule/BankAccount/Iban/Country/Turkey.php index 2939b8e..b68ad2d 100644 --- a/src/Rule/BankAccount/Iban/Country/Turkey.php +++ b/src/Rule/BankAccount/Iban/Country/Turkey.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class Turkey implements Rule +final class Turkey implements Rule { private const PATTERN = '~^TR\d{2}\d{5}0[a-zA-Z0-9]{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/UnitedArabEmirates.php b/src/Rule/BankAccount/Iban/Country/UnitedArabEmirates.php index a2c6c2b..aecb225 100644 --- a/src/Rule/BankAccount/Iban/Country/UnitedArabEmirates.php +++ b/src/Rule/BankAccount/Iban/Country/UnitedArabEmirates.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class UnitedArabEmirates implements Rule +final class UnitedArabEmirates implements Rule { private const PATTERN = '~^AE\d{2}\d{3}\d{16}$~'; diff --git a/src/Rule/BankAccount/Iban/Country/UnitedKingdom.php b/src/Rule/BankAccount/Iban/Country/UnitedKingdom.php index b94770f..93d4c60 100644 --- a/src/Rule/BankAccount/Iban/Country/UnitedKingdom.php +++ b/src/Rule/BankAccount/Iban/Country/UnitedKingdom.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\BankAccount\Iban\IbanChecksum; use HarmonyIO\Validation\Rule\Rule; -class UnitedKingdom implements Rule +final class UnitedKingdom implements Rule { private const PATTERN = '~^GB\d{2}[A-Z]{4}\d{6}\d{8}$~'; diff --git a/src/Rule/BankAccount/Iban/Iban.php b/src/Rule/BankAccount/Iban/Iban.php index 9498801..8d8a045 100644 --- a/src/Rule/BankAccount/Iban/Iban.php +++ b/src/Rule/BankAccount/Iban/Iban.php @@ -75,7 +75,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class Iban implements Rule +final class Iban implements Rule { private const COUNTRY_RULES = [ Albania::class, diff --git a/src/Rule/BankAccount/Iban/IbanChecksum.php b/src/Rule/BankAccount/Iban/IbanChecksum.php index 91ff696..4986289 100644 --- a/src/Rule/BankAccount/Iban/IbanChecksum.php +++ b/src/Rule/BankAccount/Iban/IbanChecksum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class IbanChecksum implements Rule +final class IbanChecksum implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Combinator/All.php b/src/Rule/Combinator/All.php index 3e9f802..0f22f3f 100644 --- a/src/Rule/Combinator/All.php +++ b/src/Rule/Combinator/All.php @@ -6,7 +6,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class All implements Rule +final class All implements Rule { /** @var Rule[] */ private $rules = []; diff --git a/src/Rule/Combinator/Any.php b/src/Rule/Combinator/Any.php index b48ade5..5840179 100644 --- a/src/Rule/Combinator/Any.php +++ b/src/Rule/Combinator/Any.php @@ -6,7 +6,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class Any implements Rule +final class Any implements Rule { /** @var Rule[] */ private $rules = []; diff --git a/src/Rule/Combinator/AtLeast.php b/src/Rule/Combinator/AtLeast.php index 1dcf58e..702d52d 100644 --- a/src/Rule/Combinator/AtLeast.php +++ b/src/Rule/Combinator/AtLeast.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class AtLeast implements Rule +final class AtLeast implements Rule { /** @var int */ private $minimumNumberOfValidRules; diff --git a/src/Rule/Combinator/Negate.php b/src/Rule/Combinator/Negate.php index 65e9d5a..0ebdaac 100644 --- a/src/Rule/Combinator/Negate.php +++ b/src/Rule/Combinator/Negate.php @@ -6,7 +6,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class Negate implements Rule +final class Negate implements Rule { /** @var Rule */ private $rule; diff --git a/src/Rule/CreditCard/AmericanExpress.php b/src/Rule/CreditCard/AmericanExpress.php index f6a4f01..fe486c9 100644 --- a/src/Rule/CreditCard/AmericanExpress.php +++ b/src/Rule/CreditCard/AmericanExpress.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class AmericanExpress implements Rule +final class AmericanExpress implements Rule { private const PATTERN = '~^3[47][0-9]{13}$~'; diff --git a/src/Rule/CreditCard/DinersClub.php b/src/Rule/CreditCard/DinersClub.php index a9d37f3..8824c8b 100644 --- a/src/Rule/CreditCard/DinersClub.php +++ b/src/Rule/CreditCard/DinersClub.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class DinersClub implements Rule +final class DinersClub implements Rule { private const PATTERN = '~^3(?:0[0-5]|[68][0-9])[0-9]{11}$~'; diff --git a/src/Rule/CreditCard/Discover.php b/src/Rule/CreditCard/Discover.php index 8bf326b..c27ce13 100644 --- a/src/Rule/CreditCard/Discover.php +++ b/src/Rule/CreditCard/Discover.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Discover implements Rule +final class Discover implements Rule { private const PATTERN = '~^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$~'; diff --git a/src/Rule/CreditCard/LuhnChecksum.php b/src/Rule/CreditCard/LuhnChecksum.php index 34cb266..79f85a2 100644 --- a/src/Rule/CreditCard/LuhnChecksum.php +++ b/src/Rule/CreditCard/LuhnChecksum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class LuhnChecksum implements Rule +final class LuhnChecksum implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/CreditCard/MasterCard.php b/src/Rule/CreditCard/MasterCard.php index 4803908..92f5685 100644 --- a/src/Rule/CreditCard/MasterCard.php +++ b/src/Rule/CreditCard/MasterCard.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class MasterCard implements Rule +final class MasterCard implements Rule { private const PATTERN = '~^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$~'; diff --git a/src/Rule/CreditCard/Visa.php b/src/Rule/CreditCard/Visa.php index 324627c..565dfd0 100644 --- a/src/Rule/CreditCard/Visa.php +++ b/src/Rule/CreditCard/Visa.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Visa implements Rule +final class Visa implements Rule { private const PATTERN = '~^4[0-9]{12}(?:[0-9]{3})?$~'; diff --git a/src/Rule/DataFormat/Json.php b/src/Rule/DataFormat/Json.php index ed5c974..ac5c955 100644 --- a/src/Rule/DataFormat/Json.php +++ b/src/Rule/DataFormat/Json.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Json implements Rule +final class Json implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Email/NativeEmailAddress.php b/src/Rule/Email/NativeEmailAddress.php index 7740357..95f271d 100644 --- a/src/Rule/Email/NativeEmailAddress.php +++ b/src/Rule/Email/NativeEmailAddress.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class NativeEmailAddress implements Rule +final class NativeEmailAddress implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Email/RfcEmailAddress.php b/src/Rule/Email/RfcEmailAddress.php index 0bccb84..43d6169 100644 --- a/src/Rule/Email/RfcEmailAddress.php +++ b/src/Rule/Email/RfcEmailAddress.php @@ -8,7 +8,7 @@ use Egulias\EmailValidator\Validation\RFCValidation; use HarmonyIO\Validation\Rule\Rule; -class RfcEmailAddress implements Rule +final class RfcEmailAddress implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/AspectRatio.php b/src/Rule/File/Image/AspectRatio.php index 4346926..bf86383 100644 --- a/src/Rule/File/Image/AspectRatio.php +++ b/src/Rule/File/Image/AspectRatio.php @@ -9,7 +9,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class AspectRatio implements Rule +final class AspectRatio implements Rule { /** @var float */ private $ratio; diff --git a/src/Rule/File/Image/Image.php b/src/Rule/File/Image/Image.php index 3d43f55..f8b0163 100644 --- a/src/Rule/File/Image/Image.php +++ b/src/Rule/File/Image/Image.php @@ -11,7 +11,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class Image implements Rule +final class Image implements Rule { private const IMAGE_TYPES = [ Bmp::class, diff --git a/src/Rule/File/Image/Landscape.php b/src/Rule/File/Image/Landscape.php index 337cfcb..dd0a90c 100644 --- a/src/Rule/File/Image/Landscape.php +++ b/src/Rule/File/Image/Landscape.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Landscape implements Rule +final class Landscape implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/MaximumHeight.php b/src/Rule/File/Image/MaximumHeight.php index accd455..6e0b5eb 100644 --- a/src/Rule/File/Image/MaximumHeight.php +++ b/src/Rule/File/Image/MaximumHeight.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class MaximumHeight implements Rule +final class MaximumHeight implements Rule { /** @var int */ private $maximumHeight; diff --git a/src/Rule/File/Image/MaximumWidth.php b/src/Rule/File/Image/MaximumWidth.php index d362ece..bdfd454 100644 --- a/src/Rule/File/Image/MaximumWidth.php +++ b/src/Rule/File/Image/MaximumWidth.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class MaximumWidth implements Rule +final class MaximumWidth implements Rule { /** @var int */ private $maximumWidth; diff --git a/src/Rule/File/Image/MinimumHeight.php b/src/Rule/File/Image/MinimumHeight.php index 14429f9..7bc03f0 100644 --- a/src/Rule/File/Image/MinimumHeight.php +++ b/src/Rule/File/Image/MinimumHeight.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class MinimumHeight implements Rule +final class MinimumHeight implements Rule { /** @var int */ private $minimumHeight; diff --git a/src/Rule/File/Image/MinimumWidth.php b/src/Rule/File/Image/MinimumWidth.php index 743d2b2..386d26b 100644 --- a/src/Rule/File/Image/MinimumWidth.php +++ b/src/Rule/File/Image/MinimumWidth.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class MinimumWidth implements Rule +final class MinimumWidth implements Rule { /** @var int */ private $minimumWidth; diff --git a/src/Rule/File/Image/Portrait.php b/src/Rule/File/Image/Portrait.php index 6a7ae43..dda026d 100644 --- a/src/Rule/File/Image/Portrait.php +++ b/src/Rule/File/Image/Portrait.php @@ -8,7 +8,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Portrait implements Rule +final class Portrait implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Bmp.php b/src/Rule/File/Image/Type/Bmp.php index 281c61a..d68de6d 100644 --- a/src/Rule/File/Image/Type/Bmp.php +++ b/src/Rule/File/Image/Type/Bmp.php @@ -11,7 +11,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Bmp implements Rule +final class Bmp implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Gif.php b/src/Rule/File/Image/Type/Gif.php index 1183bb6..4ac5cfc 100644 --- a/src/Rule/File/Image/Type/Gif.php +++ b/src/Rule/File/Image/Type/Gif.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Gif implements Rule +final class Gif implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Jpeg.php b/src/Rule/File/Image/Type/Jpeg.php index 57fde5f..35b6598 100644 --- a/src/Rule/File/Image/Type/Jpeg.php +++ b/src/Rule/File/Image/Type/Jpeg.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Jpeg implements Rule +final class Jpeg implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Png.php b/src/Rule/File/Image/Type/Png.php index 424cbbd..fe6f29d 100644 --- a/src/Rule/File/Image/Type/Png.php +++ b/src/Rule/File/Image/Type/Png.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Png implements Rule +final class Png implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Svg.php b/src/Rule/File/Image/Type/Svg.php index 10be0c0..cf554bb 100644 --- a/src/Rule/File/Image/Type/Svg.php +++ b/src/Rule/File/Image/Type/Svg.php @@ -11,7 +11,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class Svg implements Rule +final class Svg implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/File/Image/Type/Svg/ValidAttributes.php b/src/Rule/File/Image/Type/Svg/ValidAttributes.php index 00ade9f..3699cc9 100644 --- a/src/Rule/File/Image/Type/Svg/ValidAttributes.php +++ b/src/Rule/File/Image/Type/Svg/ValidAttributes.php @@ -13,7 +13,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class ValidAttributes implements Rule +final class ValidAttributes implements Rule { /** @var Attribute */ private $attribute; diff --git a/src/Rule/File/Image/Type/Svg/ValidElements.php b/src/Rule/File/Image/Type/Svg/ValidElements.php index 85d5617..8e20ac1 100644 --- a/src/Rule/File/Image/Type/Svg/ValidElements.php +++ b/src/Rule/File/Image/Type/Svg/ValidElements.php @@ -13,7 +13,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class ValidElements implements Rule +final class ValidElements implements Rule { /** @var Element */ private $element; diff --git a/src/Rule/File/Integrity/Md5.php b/src/Rule/File/Integrity/Md5.php index a589bfe..a0f6d16 100644 --- a/src/Rule/File/Integrity/Md5.php +++ b/src/Rule/File/Integrity/Md5.php @@ -9,7 +9,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Md5 implements Rule +final class Md5 implements Rule { /** @var string string */ private $hash; diff --git a/src/Rule/File/Integrity/Sha1.php b/src/Rule/File/Integrity/Sha1.php index 12e5faa..fc465db 100644 --- a/src/Rule/File/Integrity/Sha1.php +++ b/src/Rule/File/Integrity/Sha1.php @@ -9,7 +9,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class Sha1 implements Rule +final class Sha1 implements Rule { /** @var string string */ private $hash; diff --git a/src/Rule/File/MaximumSize.php b/src/Rule/File/MaximumSize.php index 4a1c301..4a3bdeb 100644 --- a/src/Rule/File/MaximumSize.php +++ b/src/Rule/File/MaximumSize.php @@ -9,7 +9,7 @@ use function Amp\call; use function Amp\File\size; -class MaximumSize implements Rule +final class MaximumSize implements Rule { /** @var int */ private $maximumSizeInBytes; diff --git a/src/Rule/File/MimeType.php b/src/Rule/File/MimeType.php index 01d9879..9cabfde 100644 --- a/src/Rule/File/MimeType.php +++ b/src/Rule/File/MimeType.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\ParallelFunctions\parallel; -class MimeType implements Rule +final class MimeType implements Rule { /** @var string */ private $mimeType; diff --git a/src/Rule/File/MinimumSize.php b/src/Rule/File/MinimumSize.php index bfd5969..b909a7f 100644 --- a/src/Rule/File/MinimumSize.php +++ b/src/Rule/File/MinimumSize.php @@ -9,7 +9,7 @@ use function Amp\call; use function Amp\File\size; -class MinimumSize implements Rule +final class MinimumSize implements Rule { /** @var int */ private $minimumSizeInBytes; diff --git a/src/Rule/FileSystem/Directory.php b/src/Rule/FileSystem/Directory.php index 598f71e..f2fd625 100644 --- a/src/Rule/FileSystem/Directory.php +++ b/src/Rule/FileSystem/Directory.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\File\isdir; -class Directory implements Rule +final class Directory implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/FileSystem/Exists.php b/src/Rule/FileSystem/Exists.php index 5a0fc28..0f3d1e7 100644 --- a/src/Rule/FileSystem/Exists.php +++ b/src/Rule/FileSystem/Exists.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\File\exists; -class Exists implements Rule +final class Exists implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/FileSystem/File.php b/src/Rule/FileSystem/File.php index 44e1ec4..ebf31dc 100644 --- a/src/Rule/FileSystem/File.php +++ b/src/Rule/FileSystem/File.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\File\isfile; -class File implements Rule +final class File implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/GeoLocation/Latitude.php b/src/Rule/GeoLocation/Latitude.php index ecbae5b..69fcd61 100644 --- a/src/Rule/GeoLocation/Latitude.php +++ b/src/Rule/GeoLocation/Latitude.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Latitude implements Rule +final class Latitude implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/GeoLocation/Longitude.php b/src/Rule/GeoLocation/Longitude.php index 7bff4fd..269866c 100644 --- a/src/Rule/GeoLocation/Longitude.php +++ b/src/Rule/GeoLocation/Longitude.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Longitude implements Rule +final class Longitude implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Hash/HashMatches.php b/src/Rule/Hash/HashMatches.php index 6e2bb78..b04a733 100644 --- a/src/Rule/Hash/HashMatches.php +++ b/src/Rule/Hash/HashMatches.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class HashMatches implements Rule +final class HashMatches implements Rule { /** @var string */ private $knownString; diff --git a/src/Rule/Hash/PasswordMatches.php b/src/Rule/Hash/PasswordMatches.php index b13810b..265057f 100644 --- a/src/Rule/Hash/PasswordMatches.php +++ b/src/Rule/Hash/PasswordMatches.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\ParallelFunctions\parallel; -class PasswordMatches implements Rule +final class PasswordMatches implements Rule { /** @var string */ private $hash; diff --git a/src/Rule/NationalId/Bsn.php b/src/Rule/NationalId/Bsn.php index 4103c27..bd028f9 100644 --- a/src/Rule/NationalId/Bsn.php +++ b/src/Rule/NationalId/Bsn.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Bsn implements Rule +final class Bsn implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Network/Dns/MxRecord.php b/src/Rule/Network/Dns/MxRecord.php index 12e2578..0ef2328 100644 --- a/src/Rule/Network/Dns/MxRecord.php +++ b/src/Rule/Network/Dns/MxRecord.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\Dns\query; -class MxRecord implements Rule +final class MxRecord implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Network/Dns/RecordExists.php b/src/Rule/Network/Dns/RecordExists.php index d81175f..cfcfac9 100644 --- a/src/Rule/Network/Dns/RecordExists.php +++ b/src/Rule/Network/Dns/RecordExists.php @@ -10,7 +10,7 @@ use function Amp\call; use function Amp\Dns\query; -class RecordExists implements Rule +final class RecordExists implements Rule { /** @var RecordType */ private $recordType; diff --git a/src/Rule/Network/IpAddress/InCidrRange.php b/src/Rule/Network/IpAddress/InCidrRange.php index 62d927f..8b67d28 100644 --- a/src/Rule/Network/IpAddress/InCidrRange.php +++ b/src/Rule/Network/IpAddress/InCidrRange.php @@ -8,7 +8,7 @@ use HarmonyIO\Validation\Rule\Rule; use Wikimedia\IPSet; -class InCidrRange implements Rule +final class InCidrRange implements Rule { /** @var IPSet */ private $cidrRanges; diff --git a/src/Rule/Network/IpAddress/Ipv4.php b/src/Rule/Network/IpAddress/Ipv4.php index d4ad8ca..42487a7 100644 --- a/src/Rule/Network/IpAddress/Ipv4.php +++ b/src/Rule/Network/IpAddress/Ipv4.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Ipv4 implements Rule +final class Ipv4 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Network/IpAddress/Ipv6.php b/src/Rule/Network/IpAddress/Ipv6.php index 8fce8f4..579cdbd 100644 --- a/src/Rule/Network/IpAddress/Ipv6.php +++ b/src/Rule/Network/IpAddress/Ipv6.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Ipv6 implements Rule +final class Ipv6 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Network/IpAddress/NotInPrivateRange.php b/src/Rule/Network/IpAddress/NotInPrivateRange.php index ca7cfd3..8893e60 100644 --- a/src/Rule/Network/IpAddress/NotInPrivateRange.php +++ b/src/Rule/Network/IpAddress/NotInPrivateRange.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class NotInPrivateRange implements Rule +final class NotInPrivateRange implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Network/IpAddress/NotInReservedRange.php b/src/Rule/Network/IpAddress/NotInReservedRange.php index 888926c..fc42b6d 100644 --- a/src/Rule/Network/IpAddress/NotInReservedRange.php +++ b/src/Rule/Network/IpAddress/NotInReservedRange.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class NotInReservedRange implements Rule +final class NotInReservedRange implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Numeric/FloatType.php b/src/Rule/Numeric/FloatType.php index 51323c9..e63b9b8 100644 --- a/src/Rule/Numeric/FloatType.php +++ b/src/Rule/Numeric/FloatType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class FloatType implements Rule +final class FloatType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Numeric/Integer.php b/src/Rule/Numeric/Integer.php index ca91e99..cf53390 100644 --- a/src/Rule/Numeric/Integer.php +++ b/src/Rule/Numeric/Integer.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Integer implements Rule +final class Integer implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Numeric/Maximum.php b/src/Rule/Numeric/Maximum.php index d97dfa9..a8e61b0 100644 --- a/src/Rule/Numeric/Maximum.php +++ b/src/Rule/Numeric/Maximum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Maximum implements Rule +final class Maximum implements Rule { /** @var int */ private $maximum; diff --git a/src/Rule/Numeric/Minimum.php b/src/Rule/Numeric/Minimum.php index ef518ca..dacba91 100644 --- a/src/Rule/Numeric/Minimum.php +++ b/src/Rule/Numeric/Minimum.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Minimum implements Rule +final class Minimum implements Rule { /** @var int */ private $minimum; diff --git a/src/Rule/Numeric/NumericType.php b/src/Rule/Numeric/NumericType.php index 7eb5962..a314fc1 100644 --- a/src/Rule/Numeric/NumericType.php +++ b/src/Rule/Numeric/NumericType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class NumericType implements Rule +final class NumericType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Security/NotPwnedPassword.php b/src/Rule/Security/NotPwnedPassword.php index d5d796b..c027792 100644 --- a/src/Rule/Security/NotPwnedPassword.php +++ b/src/Rule/Security/NotPwnedPassword.php @@ -11,7 +11,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class NotPwnedPassword implements Rule +final class NotPwnedPassword implements Rule { private const BASE_URL = 'https://api.pwnedpasswords.com/range/%s'; diff --git a/src/Rule/Text/AlphaNumeric.php b/src/Rule/Text/AlphaNumeric.php index 701cb40..7f40f3a 100644 --- a/src/Rule/Text/AlphaNumeric.php +++ b/src/Rule/Text/AlphaNumeric.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class AlphaNumeric implements Rule +final class AlphaNumeric implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Text/Ascii.php b/src/Rule/Text/Ascii.php index 561b900..c307423 100644 --- a/src/Rule/Text/Ascii.php +++ b/src/Rule/Text/Ascii.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Ascii implements Rule +final class Ascii implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Text/ByteLength.php b/src/Rule/Text/ByteLength.php index 6621d59..f999169 100644 --- a/src/Rule/Text/ByteLength.php +++ b/src/Rule/Text/ByteLength.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class ByteLength implements Rule +final class ByteLength implements Rule { /** @var int */ private $length; diff --git a/src/Rule/Text/Length.php b/src/Rule/Text/Length.php index 0656dd4..05f4b6d 100644 --- a/src/Rule/Text/Length.php +++ b/src/Rule/Text/Length.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Length implements Rule +final class Length implements Rule { /** @var int */ private $length; diff --git a/src/Rule/Text/MaximumLength.php b/src/Rule/Text/MaximumLength.php index 611b306..90ce27f 100644 --- a/src/Rule/Text/MaximumLength.php +++ b/src/Rule/Text/MaximumLength.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class MaximumLength implements Rule +final class MaximumLength implements Rule { /** @var int */ private $length; diff --git a/src/Rule/Text/MinimumLength.php b/src/Rule/Text/MinimumLength.php index 63f805b..37319fb 100644 --- a/src/Rule/Text/MinimumLength.php +++ b/src/Rule/Text/MinimumLength.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class MinimumLength implements Rule +final class MinimumLength implements Rule { /** @var int */ private $length; diff --git a/src/Rule/Text/NoControlCharacters.php b/src/Rule/Text/NoControlCharacters.php index fb03a90..fbef5d8 100644 --- a/src/Rule/Text/NoControlCharacters.php +++ b/src/Rule/Text/NoControlCharacters.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class NoControlCharacters implements Rule +final class NoControlCharacters implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/ArrayType.php b/src/Rule/Type/ArrayType.php index 7ff74f0..25b73d6 100644 --- a/src/Rule/Type/ArrayType.php +++ b/src/Rule/Type/ArrayType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class ArrayType implements Rule +final class ArrayType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/BooleanType.php b/src/Rule/Type/BooleanType.php index 5ea0cbb..9a0ecaa 100644 --- a/src/Rule/Type/BooleanType.php +++ b/src/Rule/Type/BooleanType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class BooleanType implements Rule +final class BooleanType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/CallableType.php b/src/Rule/Type/CallableType.php index f10a283..7312a70 100644 --- a/src/Rule/Type/CallableType.php +++ b/src/Rule/Type/CallableType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class CallableType implements Rule +final class CallableType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/FloatType.php b/src/Rule/Type/FloatType.php index 02927de..9875478 100644 --- a/src/Rule/Type/FloatType.php +++ b/src/Rule/Type/FloatType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class FloatType implements Rule +final class FloatType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/InstanceOfType.php b/src/Rule/Type/InstanceOfType.php index 6665edd..bbb2c4c 100644 --- a/src/Rule/Type/InstanceOfType.php +++ b/src/Rule/Type/InstanceOfType.php @@ -7,7 +7,7 @@ use HarmonyIO\Validation\Exception\InvalidFullyQualifiedClassOrInterfaceName; use HarmonyIO\Validation\Rule\Rule; -class InstanceOfType implements Rule +final class InstanceOfType implements Rule { /** @var string */ private $fullyQualifiedClassOrInterfaceName; diff --git a/src/Rule/Type/IntegerType.php b/src/Rule/Type/IntegerType.php index 622bd12..1451922 100644 --- a/src/Rule/Type/IntegerType.php +++ b/src/Rule/Type/IntegerType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class IntegerType implements Rule +final class IntegerType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/IterableType.php b/src/Rule/Type/IterableType.php index df83d37..f150762 100644 --- a/src/Rule/Type/IterableType.php +++ b/src/Rule/Type/IterableType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class IterableType implements Rule +final class IterableType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/NullType.php b/src/Rule/Type/NullType.php index 93f0e6d..65fc32c 100644 --- a/src/Rule/Type/NullType.php +++ b/src/Rule/Type/NullType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class NullType implements Rule +final class NullType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/ObjectType.php b/src/Rule/Type/ObjectType.php index f86c72d..cca65da 100644 --- a/src/Rule/Type/ObjectType.php +++ b/src/Rule/Type/ObjectType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class ObjectType implements Rule +final class ObjectType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/ResourceType.php b/src/Rule/Type/ResourceType.php index 1e05160..9bac5c8 100644 --- a/src/Rule/Type/ResourceType.php +++ b/src/Rule/Type/ResourceType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class ResourceType implements Rule +final class ResourceType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Type/StringType.php b/src/Rule/Type/StringType.php index 801dc69..e2392cc 100644 --- a/src/Rule/Type/StringType.php +++ b/src/Rule/Type/StringType.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class StringType implements Rule +final class StringType implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Nil.php b/src/Rule/Uuid/Nil.php index 8c84fc1..5e8227a 100644 --- a/src/Rule/Uuid/Nil.php +++ b/src/Rule/Uuid/Nil.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Nil implements Rule +final class Nil implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Version1.php b/src/Rule/Uuid/Version1.php index 1d63a9b..14518e2 100644 --- a/src/Rule/Uuid/Version1.php +++ b/src/Rule/Uuid/Version1.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Version1 implements Rule +final class Version1 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Version2.php b/src/Rule/Uuid/Version2.php index a628bab..01e8a57 100644 --- a/src/Rule/Uuid/Version2.php +++ b/src/Rule/Uuid/Version2.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Version2 implements Rule +final class Version2 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Version3.php b/src/Rule/Uuid/Version3.php index ae511b9..99b0452 100644 --- a/src/Rule/Uuid/Version3.php +++ b/src/Rule/Uuid/Version3.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Version3 implements Rule +final class Version3 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Version4.php b/src/Rule/Uuid/Version4.php index 8c67794..ee7ee72 100644 --- a/src/Rule/Uuid/Version4.php +++ b/src/Rule/Uuid/Version4.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Version4 implements Rule +final class Version4 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/Uuid/Version5.php b/src/Rule/Uuid/Version5.php index 7940b85..47d7692 100644 --- a/src/Rule/Uuid/Version5.php +++ b/src/Rule/Uuid/Version5.php @@ -6,7 +6,7 @@ use Amp\Success; use HarmonyIO\Validation\Rule\Rule; -class Version5 implements Rule +final class Version5 implements Rule { /** * {@inheritdoc} diff --git a/src/Rule/VideoService/YouTube/VideoId.php b/src/Rule/VideoService/YouTube/VideoId.php index 529a231..2d6a3fd 100644 --- a/src/Rule/VideoService/YouTube/VideoId.php +++ b/src/Rule/VideoService/YouTube/VideoId.php @@ -10,7 +10,7 @@ use HarmonyIO\Validation\Rule\Rule; use function Amp\call; -class VideoId implements Rule +final class VideoId implements Rule { private const BASE_URL = 'https://www.youtube.com/oembed?url=%s%s&format=json'; diff --git a/src/Rule/VideoService/YouTube/VideoUrl.php b/src/Rule/VideoService/YouTube/VideoUrl.php index ba35592..83304bd 100644 --- a/src/Rule/VideoService/YouTube/VideoUrl.php +++ b/src/Rule/VideoService/YouTube/VideoUrl.php @@ -7,7 +7,7 @@ use HarmonyIO\HttpClient\Client\Client; use HarmonyIO\Validation\Rule\Rule; -class VideoUrl implements Rule +final class VideoUrl implements Rule { /** @var Client */ private $httpClient; diff --git a/tests/Unit/Exception/InvalidFullyQualifiedClassOrInterfaceTest.php b/tests/Unit/Exception/InvalidFullyQualifiedClassOrInterfaceTest.php index b883a13..fdaa4bf 100644 --- a/tests/Unit/Exception/InvalidFullyQualifiedClassOrInterfaceTest.php +++ b/tests/Unit/Exception/InvalidFullyQualifiedClassOrInterfaceTest.php @@ -27,7 +27,7 @@ public function testTheConstructorPassesTheCode(): void public function testTheConstructorPassesThePreviousException(): void { - $previousException = new Exception(); + $previousException = new \Exception(); $typeException = new InvalidFullyQualifiedClassOrInterfaceName('Foo\\Bar', 0, $previousException);