From 9c49dd3bcffcaf1a4b9beace330379d5ca134140 Mon Sep 17 00:00:00 2001 From: Henrique Moody Date: Sat, 17 Oct 2015 22:44:47 -0300 Subject: [PATCH] Use short array syntax --- .php_cs | 6 +- CONTRIBUTING.md | 12 +- docs/ArrayVal.md | 2 +- docs/Call.md | 2 +- docs/CallableType.md | 2 +- docs/Charset.md | 2 +- docs/Contains.md | 2 +- docs/Each.md | 4 +- docs/EndsWith.md | 2 +- docs/In.md | 2 +- docs/Key.md | 4 +- docs/KeyNested.md | 8 +- docs/KeySet.md | 8 +- docs/Length.md | 2 +- docs/NotBlank.md | 14 +- docs/NotEmpty.md | 2 +- docs/NotOptional.md | 14 +- docs/README.md | 8 +- docs/ScalarVal.md | 2 +- docs/StartsWith.md | 2 +- library/ExceptionIterator.php | 2 +- .../Exceptions/AbstractGroupedException.php | 12 +- .../Exceptions/AbstractNestedException.php | 8 +- library/Exceptions/AgeException.php | 12 +- library/Exceptions/AllOfException.php | 12 +- library/Exceptions/AlnumException.php | 12 +- library/Exceptions/AlphaException.php | 12 +- library/Exceptions/AlwaysInvalidException.php | 12 +- library/Exceptions/AlwaysValidException.php | 12 +- library/Exceptions/ArrayValException.php | 12 +- library/Exceptions/AtLeastException.php | 12 +- library/Exceptions/AttributeException.php | 12 +- library/Exceptions/BankAccountException.php | 12 +- library/Exceptions/BankException.php | 12 +- library/Exceptions/BetweenException.php | 12 +- library/Exceptions/BicException.php | 12 +- library/Exceptions/BoolTypeException.php | 12 +- library/Exceptions/BsnException.php | 12 +- library/Exceptions/CallableTypeException.php | 12 +- library/Exceptions/CallbackException.php | 12 +- library/Exceptions/CharsetException.php | 12 +- library/Exceptions/CnhException.php | 12 +- library/Exceptions/CnpjException.php | 12 +- library/Exceptions/CntrlException.php | 12 +- library/Exceptions/ConsonantException.php | 12 +- library/Exceptions/ContainsException.php | 12 +- library/Exceptions/CountryCodeException.php | 12 +- library/Exceptions/CpfException.php | 12 +- library/Exceptions/CreditCardException.php | 12 +- library/Exceptions/DateException.php | 14 +- library/Exceptions/DigitException.php | 12 +- library/Exceptions/DirectoryException.php | 12 +- library/Exceptions/DomainException.php | 12 +- library/Exceptions/EachException.php | 12 +- library/Exceptions/EmailException.php | 12 +- library/Exceptions/EndsWithException.php | 12 +- library/Exceptions/EqualsException.php | 12 +- library/Exceptions/EvenException.php | 12 +- library/Exceptions/ExecutableException.php | 12 +- library/Exceptions/ExistsException.php | 12 +- library/Exceptions/ExtensionException.php | 12 +- library/Exceptions/FactorException.php | 12 +- library/Exceptions/FalseValException.php | 12 +- library/Exceptions/FileException.php | 12 +- library/Exceptions/FilterVarException.php | 12 +- library/Exceptions/FiniteException.php | 12 +- library/Exceptions/FloatValException.php | 12 +- library/Exceptions/GraphException.php | 12 +- library/Exceptions/HexRgbColorException.php | 12 +- library/Exceptions/IdenticalException.php | 12 +- library/Exceptions/InException.php | 12 +- library/Exceptions/InfiniteException.php | 12 +- library/Exceptions/InstanceException.php | 12 +- library/Exceptions/IntTypeException.php | 12 +- library/Exceptions/IntValException.php | 12 +- library/Exceptions/IpException.php | 14 +- library/Exceptions/JsonException.php | 12 +- library/Exceptions/KeyException.php | 12 +- library/Exceptions/KeyNestedException.php | 12 +- library/Exceptions/KeySetException.php | 12 +- library/Exceptions/KeyValueException.php | 12 +- library/Exceptions/LengthException.php | 12 +- .../Locale/GermanBankAccountException.php | 12 +- .../Exceptions/Locale/GermanBankException.php | 12 +- .../Exceptions/Locale/GermanBicException.php | 12 +- library/Exceptions/LowercaseException.php | 12 +- library/Exceptions/MacAddressException.php | 12 +- library/Exceptions/MaxException.php | 12 +- library/Exceptions/MimetypeException.php | 12 +- library/Exceptions/MinException.php | 12 +- library/Exceptions/MinimumAgeException.php | 12 +- library/Exceptions/MultipleException.php | 12 +- library/Exceptions/NegativeException.php | 12 +- library/Exceptions/NfeAccessKeyException.php | 12 +- library/Exceptions/NoException.php | 12 +- library/Exceptions/NoWhitespaceException.php | 12 +- library/Exceptions/NoneOfException.php | 12 +- library/Exceptions/NotBlankException.php | 12 +- library/Exceptions/NotEmptyException.php | 12 +- library/Exceptions/NotOptionalException.php | 12 +- library/Exceptions/NullTypeException.php | 12 +- library/Exceptions/NumericException.php | 12 +- library/Exceptions/ObjectTypeException.php | 12 +- library/Exceptions/OddException.php | 12 +- library/Exceptions/OneOfException.php | 12 +- library/Exceptions/OptionalException.php | 12 +- library/Exceptions/PerfectSquareException.php | 12 +- library/Exceptions/PhoneException.php | 12 +- library/Exceptions/PositiveException.php | 12 +- library/Exceptions/PostalCodeException.php | 12 +- library/Exceptions/PrimeNumberException.php | 12 +- library/Exceptions/PrntException.php | 12 +- library/Exceptions/PunctException.php | 12 +- library/Exceptions/ReadableException.php | 12 +- library/Exceptions/RegexException.php | 12 +- library/Exceptions/ResourceTypeException.php | 12 +- library/Exceptions/RomanException.php | 12 +- library/Exceptions/ScalarValException.php | 12 +- library/Exceptions/SfException.php | 12 +- library/Exceptions/SizeException.php | 12 +- library/Exceptions/SlugException.php | 12 +- library/Exceptions/SpaceException.php | 12 +- library/Exceptions/StartsWithException.php | 12 +- library/Exceptions/StringTypeException.php | 12 +- .../AdSubdivisionCodeException.php | 12 +- .../AeSubdivisionCodeException.php | 12 +- .../AfSubdivisionCodeException.php | 12 +- .../AgSubdivisionCodeException.php | 12 +- .../AiSubdivisionCodeException.php | 12 +- .../AlSubdivisionCodeException.php | 12 +- .../AmSubdivisionCodeException.php | 12 +- .../AnSubdivisionCodeException.php | 12 +- .../AoSubdivisionCodeException.php | 12 +- .../AqSubdivisionCodeException.php | 12 +- .../ArSubdivisionCodeException.php | 12 +- .../AsSubdivisionCodeException.php | 12 +- .../AtSubdivisionCodeException.php | 12 +- .../AuSubdivisionCodeException.php | 12 +- .../AwSubdivisionCodeException.php | 12 +- .../AxSubdivisionCodeException.php | 12 +- .../AzSubdivisionCodeException.php | 12 +- .../BaSubdivisionCodeException.php | 12 +- .../BbSubdivisionCodeException.php | 12 +- .../BdSubdivisionCodeException.php | 12 +- .../BeSubdivisionCodeException.php | 12 +- .../BfSubdivisionCodeException.php | 12 +- .../BgSubdivisionCodeException.php | 12 +- .../BhSubdivisionCodeException.php | 12 +- .../BiSubdivisionCodeException.php | 12 +- .../BjSubdivisionCodeException.php | 12 +- .../BlSubdivisionCodeException.php | 12 +- .../BmSubdivisionCodeException.php | 12 +- .../BnSubdivisionCodeException.php | 12 +- .../BoSubdivisionCodeException.php | 12 +- .../BqSubdivisionCodeException.php | 12 +- .../BrSubdivisionCodeException.php | 12 +- .../BsSubdivisionCodeException.php | 12 +- .../BtSubdivisionCodeException.php | 12 +- .../BvSubdivisionCodeException.php | 12 +- .../BwSubdivisionCodeException.php | 12 +- .../BySubdivisionCodeException.php | 12 +- .../BzSubdivisionCodeException.php | 12 +- .../CaSubdivisionCodeException.php | 12 +- .../CcSubdivisionCodeException.php | 12 +- .../CdSubdivisionCodeException.php | 12 +- .../CfSubdivisionCodeException.php | 12 +- .../CgSubdivisionCodeException.php | 12 +- .../ChSubdivisionCodeException.php | 12 +- .../CiSubdivisionCodeException.php | 12 +- .../CkSubdivisionCodeException.php | 12 +- .../ClSubdivisionCodeException.php | 12 +- .../CmSubdivisionCodeException.php | 12 +- .../CnSubdivisionCodeException.php | 12 +- .../CoSubdivisionCodeException.php | 12 +- .../CrSubdivisionCodeException.php | 12 +- .../CsSubdivisionCodeException.php | 12 +- .../CuSubdivisionCodeException.php | 12 +- .../CvSubdivisionCodeException.php | 12 +- .../CwSubdivisionCodeException.php | 12 +- .../CxSubdivisionCodeException.php | 12 +- .../CySubdivisionCodeException.php | 12 +- .../CzSubdivisionCodeException.php | 12 +- .../DeSubdivisionCodeException.php | 12 +- .../DjSubdivisionCodeException.php | 12 +- .../DkSubdivisionCodeException.php | 12 +- .../DmSubdivisionCodeException.php | 12 +- .../DoSubdivisionCodeException.php | 12 +- .../DzSubdivisionCodeException.php | 12 +- .../EcSubdivisionCodeException.php | 12 +- .../EeSubdivisionCodeException.php | 12 +- .../EgSubdivisionCodeException.php | 12 +- .../EhSubdivisionCodeException.php | 12 +- .../ErSubdivisionCodeException.php | 12 +- .../EsSubdivisionCodeException.php | 12 +- .../EtSubdivisionCodeException.php | 12 +- .../FiSubdivisionCodeException.php | 12 +- .../FjSubdivisionCodeException.php | 12 +- .../FkSubdivisionCodeException.php | 12 +- .../FmSubdivisionCodeException.php | 12 +- .../FoSubdivisionCodeException.php | 12 +- .../FrSubdivisionCodeException.php | 12 +- .../GaSubdivisionCodeException.php | 12 +- .../GbSubdivisionCodeException.php | 12 +- .../GdSubdivisionCodeException.php | 12 +- .../GeSubdivisionCodeException.php | 12 +- .../GfSubdivisionCodeException.php | 12 +- .../GgSubdivisionCodeException.php | 12 +- .../GhSubdivisionCodeException.php | 12 +- .../GiSubdivisionCodeException.php | 12 +- .../GlSubdivisionCodeException.php | 12 +- .../GmSubdivisionCodeException.php | 12 +- .../GnSubdivisionCodeException.php | 12 +- .../GpSubdivisionCodeException.php | 12 +- .../GqSubdivisionCodeException.php | 12 +- .../GrSubdivisionCodeException.php | 12 +- .../GsSubdivisionCodeException.php | 12 +- .../GtSubdivisionCodeException.php | 12 +- .../GuSubdivisionCodeException.php | 12 +- .../GwSubdivisionCodeException.php | 12 +- .../GySubdivisionCodeException.php | 12 +- .../HkSubdivisionCodeException.php | 12 +- .../HmSubdivisionCodeException.php | 12 +- .../HnSubdivisionCodeException.php | 12 +- .../HrSubdivisionCodeException.php | 12 +- .../HtSubdivisionCodeException.php | 12 +- .../HuSubdivisionCodeException.php | 12 +- .../IdSubdivisionCodeException.php | 12 +- .../IeSubdivisionCodeException.php | 12 +- .../IlSubdivisionCodeException.php | 12 +- .../ImSubdivisionCodeException.php | 12 +- .../InSubdivisionCodeException.php | 12 +- .../IoSubdivisionCodeException.php | 12 +- .../IqSubdivisionCodeException.php | 12 +- .../IrSubdivisionCodeException.php | 12 +- .../IsSubdivisionCodeException.php | 12 +- .../ItSubdivisionCodeException.php | 12 +- .../JeSubdivisionCodeException.php | 12 +- .../JmSubdivisionCodeException.php | 12 +- .../JoSubdivisionCodeException.php | 12 +- .../JpSubdivisionCodeException.php | 12 +- .../KeSubdivisionCodeException.php | 12 +- .../KgSubdivisionCodeException.php | 12 +- .../KhSubdivisionCodeException.php | 12 +- .../KiSubdivisionCodeException.php | 12 +- .../KmSubdivisionCodeException.php | 12 +- .../KnSubdivisionCodeException.php | 12 +- .../KpSubdivisionCodeException.php | 12 +- .../KrSubdivisionCodeException.php | 12 +- .../KwSubdivisionCodeException.php | 12 +- .../KySubdivisionCodeException.php | 12 +- .../KzSubdivisionCodeException.php | 12 +- .../LaSubdivisionCodeException.php | 12 +- .../LbSubdivisionCodeException.php | 12 +- .../LcSubdivisionCodeException.php | 12 +- .../LiSubdivisionCodeException.php | 12 +- .../LkSubdivisionCodeException.php | 12 +- .../LrSubdivisionCodeException.php | 12 +- .../LsSubdivisionCodeException.php | 12 +- .../LtSubdivisionCodeException.php | 12 +- .../LuSubdivisionCodeException.php | 12 +- .../LvSubdivisionCodeException.php | 12 +- .../LySubdivisionCodeException.php | 12 +- .../MaSubdivisionCodeException.php | 12 +- .../McSubdivisionCodeException.php | 12 +- .../MdSubdivisionCodeException.php | 12 +- .../MeSubdivisionCodeException.php | 12 +- .../MfSubdivisionCodeException.php | 12 +- .../MgSubdivisionCodeException.php | 12 +- .../MhSubdivisionCodeException.php | 12 +- .../MkSubdivisionCodeException.php | 12 +- .../MlSubdivisionCodeException.php | 12 +- .../MmSubdivisionCodeException.php | 12 +- .../MnSubdivisionCodeException.php | 12 +- .../MoSubdivisionCodeException.php | 12 +- .../MpSubdivisionCodeException.php | 12 +- .../MqSubdivisionCodeException.php | 12 +- .../MrSubdivisionCodeException.php | 12 +- .../MsSubdivisionCodeException.php | 12 +- .../MtSubdivisionCodeException.php | 12 +- .../MuSubdivisionCodeException.php | 12 +- .../MvSubdivisionCodeException.php | 12 +- .../MwSubdivisionCodeException.php | 12 +- .../MxSubdivisionCodeException.php | 12 +- .../MySubdivisionCodeException.php | 12 +- .../MzSubdivisionCodeException.php | 12 +- .../NaSubdivisionCodeException.php | 12 +- .../NcSubdivisionCodeException.php | 12 +- .../NeSubdivisionCodeException.php | 12 +- .../NfSubdivisionCodeException.php | 12 +- .../NgSubdivisionCodeException.php | 12 +- .../NiSubdivisionCodeException.php | 12 +- .../NlSubdivisionCodeException.php | 12 +- .../NoSubdivisionCodeException.php | 12 +- .../NpSubdivisionCodeException.php | 12 +- .../NrSubdivisionCodeException.php | 12 +- .../NuSubdivisionCodeException.php | 12 +- .../NzSubdivisionCodeException.php | 12 +- .../OmSubdivisionCodeException.php | 12 +- .../PaSubdivisionCodeException.php | 12 +- .../PeSubdivisionCodeException.php | 12 +- .../PfSubdivisionCodeException.php | 12 +- .../PgSubdivisionCodeException.php | 12 +- .../PhSubdivisionCodeException.php | 12 +- .../PkSubdivisionCodeException.php | 12 +- .../PlSubdivisionCodeException.php | 12 +- .../PmSubdivisionCodeException.php | 12 +- .../PnSubdivisionCodeException.php | 12 +- .../PrSubdivisionCodeException.php | 12 +- .../PsSubdivisionCodeException.php | 12 +- .../PtSubdivisionCodeException.php | 12 +- .../PwSubdivisionCodeException.php | 12 +- .../PySubdivisionCodeException.php | 12 +- .../QaSubdivisionCodeException.php | 12 +- .../ReSubdivisionCodeException.php | 12 +- .../RoSubdivisionCodeException.php | 12 +- .../RsSubdivisionCodeException.php | 12 +- .../RuSubdivisionCodeException.php | 12 +- .../RwSubdivisionCodeException.php | 12 +- .../SaSubdivisionCodeException.php | 12 +- .../SbSubdivisionCodeException.php | 12 +- .../ScSubdivisionCodeException.php | 12 +- .../SdSubdivisionCodeException.php | 12 +- .../SeSubdivisionCodeException.php | 12 +- .../SgSubdivisionCodeException.php | 12 +- .../ShSubdivisionCodeException.php | 12 +- .../SiSubdivisionCodeException.php | 12 +- .../SjSubdivisionCodeException.php | 12 +- .../SkSubdivisionCodeException.php | 12 +- .../SlSubdivisionCodeException.php | 12 +- .../SmSubdivisionCodeException.php | 12 +- .../SnSubdivisionCodeException.php | 12 +- .../SoSubdivisionCodeException.php | 12 +- .../SrSubdivisionCodeException.php | 12 +- .../SsSubdivisionCodeException.php | 12 +- .../StSubdivisionCodeException.php | 12 +- .../SvSubdivisionCodeException.php | 12 +- .../SxSubdivisionCodeException.php | 12 +- .../SySubdivisionCodeException.php | 12 +- .../SzSubdivisionCodeException.php | 12 +- .../TcSubdivisionCodeException.php | 12 +- .../TdSubdivisionCodeException.php | 12 +- .../TfSubdivisionCodeException.php | 12 +- .../TgSubdivisionCodeException.php | 12 +- .../ThSubdivisionCodeException.php | 12 +- .../TjSubdivisionCodeException.php | 12 +- .../TkSubdivisionCodeException.php | 12 +- .../TlSubdivisionCodeException.php | 12 +- .../TmSubdivisionCodeException.php | 12 +- .../TnSubdivisionCodeException.php | 12 +- .../ToSubdivisionCodeException.php | 12 +- .../TrSubdivisionCodeException.php | 12 +- .../TtSubdivisionCodeException.php | 12 +- .../TvSubdivisionCodeException.php | 12 +- .../TwSubdivisionCodeException.php | 12 +- .../TzSubdivisionCodeException.php | 12 +- .../UaSubdivisionCodeException.php | 12 +- .../UgSubdivisionCodeException.php | 12 +- .../UmSubdivisionCodeException.php | 12 +- .../UsSubdivisionCodeException.php | 12 +- .../UySubdivisionCodeException.php | 12 +- .../UzSubdivisionCodeException.php | 12 +- .../VaSubdivisionCodeException.php | 12 +- .../VcSubdivisionCodeException.php | 12 +- .../VeSubdivisionCodeException.php | 12 +- .../VgSubdivisionCodeException.php | 12 +- .../ViSubdivisionCodeException.php | 12 +- .../VnSubdivisionCodeException.php | 12 +- .../VuSubdivisionCodeException.php | 12 +- .../WfSubdivisionCodeException.php | 12 +- .../WsSubdivisionCodeException.php | 12 +- .../XkSubdivisionCodeException.php | 12 +- .../YeSubdivisionCodeException.php | 12 +- .../YtSubdivisionCodeException.php | 12 +- .../ZaSubdivisionCodeException.php | 12 +- .../ZmSubdivisionCodeException.php | 12 +- .../ZwSubdivisionCodeException.php | 12 +- .../Exceptions/SubdivisionCodeException.php | 12 +- library/Exceptions/SymbolicLinkException.php | 12 +- library/Exceptions/TldException.php | 12 +- library/Exceptions/TrueValException.php | 12 +- library/Exceptions/TypeException.php | 12 +- library/Exceptions/UploadedException.php | 12 +- library/Exceptions/UppercaseException.php | 12 +- library/Exceptions/UrlException.php | 12 +- library/Exceptions/ValidationException.php | 22 +- library/Exceptions/VersionException.php | 12 +- library/Exceptions/VideoUrlException.php | 12 +- library/Exceptions/VowelException.php | 12 +- library/Exceptions/WhenException.php | 12 +- library/Exceptions/WritableException.php | 12 +- library/Exceptions/XdigitException.php | 12 +- library/Exceptions/YesException.php | 12 +- library/Exceptions/ZendException.php | 12 +- library/Factory.php | 4 +- library/Rules/AbstractComposite.php | 8 +- library/Rules/AbstractCountryInfo.php | 4 +- library/Rules/AbstractInterval.php | 2 +- library/Rules/AbstractRelated.php | 8 +- library/Rules/AbstractRule.php | 4 +- library/Rules/AbstractWrapper.php | 2 +- library/Rules/AllOf.php | 4 +- library/Rules/Bsn.php | 1 + library/Rules/Call.php | 2 +- library/Rules/Charset.php | 2 +- library/Rules/Cnpj.php | 2 +- library/Rules/CountryCode.php | 514 +++++++++--------- library/Rules/Date.php | 4 +- library/Rules/Domain.php | 4 +- library/Rules/Each.php | 6 +- library/Rules/Factor.php | 2 +- library/Rules/FilterVar.php | 4 +- library/Rules/Instance.php | 2 +- library/Rules/Ip.php | 6 +- library/Rules/KeyNested.php | 1 - library/Rules/KeySet.php | 6 +- library/Rules/KeyValue.php | 8 +- library/Rules/NfeAccessKey.php | 2 +- library/Rules/Not.php | 2 +- library/Rules/NotOptional.php | 2 +- library/Rules/Optional.php | 2 +- library/Rules/PostalCode.php | 4 +- library/Rules/Sf.php | 6 +- library/Rules/Size.php | 2 +- .../SubdivisionCode/AdSubdivisionCode.php | 4 +- .../SubdivisionCode/AeSubdivisionCode.php | 4 +- .../SubdivisionCode/AfSubdivisionCode.php | 4 +- .../SubdivisionCode/AgSubdivisionCode.php | 4 +- .../SubdivisionCode/AiSubdivisionCode.php | 2 +- .../SubdivisionCode/AlSubdivisionCode.php | 4 +- .../SubdivisionCode/AmSubdivisionCode.php | 4 +- .../SubdivisionCode/AnSubdivisionCode.php | 2 +- .../SubdivisionCode/AoSubdivisionCode.php | 4 +- .../SubdivisionCode/AqSubdivisionCode.php | 2 +- .../SubdivisionCode/ArSubdivisionCode.php | 4 +- .../SubdivisionCode/AsSubdivisionCode.php | 4 +- .../SubdivisionCode/AtSubdivisionCode.php | 4 +- .../SubdivisionCode/AuSubdivisionCode.php | 4 +- .../SubdivisionCode/AwSubdivisionCode.php | 2 +- .../SubdivisionCode/AxSubdivisionCode.php | 2 +- .../SubdivisionCode/AzSubdivisionCode.php | 4 +- .../SubdivisionCode/BaSubdivisionCode.php | 4 +- .../SubdivisionCode/BbSubdivisionCode.php | 4 +- .../SubdivisionCode/BdSubdivisionCode.php | 4 +- .../SubdivisionCode/BeSubdivisionCode.php | 4 +- .../SubdivisionCode/BfSubdivisionCode.php | 4 +- .../SubdivisionCode/BgSubdivisionCode.php | 4 +- .../SubdivisionCode/BhSubdivisionCode.php | 4 +- .../SubdivisionCode/BiSubdivisionCode.php | 4 +- .../SubdivisionCode/BjSubdivisionCode.php | 4 +- .../SubdivisionCode/BlSubdivisionCode.php | 2 +- .../SubdivisionCode/BmSubdivisionCode.php | 4 +- .../SubdivisionCode/BnSubdivisionCode.php | 4 +- .../SubdivisionCode/BoSubdivisionCode.php | 4 +- .../SubdivisionCode/BqSubdivisionCode.php | 4 +- .../SubdivisionCode/BrSubdivisionCode.php | 4 +- .../SubdivisionCode/BsSubdivisionCode.php | 4 +- .../SubdivisionCode/BtSubdivisionCode.php | 4 +- .../SubdivisionCode/BvSubdivisionCode.php | 2 +- .../SubdivisionCode/BwSubdivisionCode.php | 4 +- .../SubdivisionCode/BySubdivisionCode.php | 4 +- .../SubdivisionCode/BzSubdivisionCode.php | 4 +- .../SubdivisionCode/CaSubdivisionCode.php | 4 +- .../SubdivisionCode/CcSubdivisionCode.php | 4 +- .../SubdivisionCode/CdSubdivisionCode.php | 4 +- .../SubdivisionCode/CfSubdivisionCode.php | 4 +- .../SubdivisionCode/CgSubdivisionCode.php | 4 +- .../SubdivisionCode/ChSubdivisionCode.php | 4 +- .../SubdivisionCode/CiSubdivisionCode.php | 4 +- .../SubdivisionCode/CkSubdivisionCode.php | 4 +- .../SubdivisionCode/ClSubdivisionCode.php | 4 +- .../SubdivisionCode/CmSubdivisionCode.php | 4 +- .../SubdivisionCode/CnSubdivisionCode.php | 4 +- .../SubdivisionCode/CoSubdivisionCode.php | 4 +- .../SubdivisionCode/CrSubdivisionCode.php | 4 +- .../SubdivisionCode/CsSubdivisionCode.php | 4 +- .../SubdivisionCode/CuSubdivisionCode.php | 4 +- .../SubdivisionCode/CvSubdivisionCode.php | 4 +- .../SubdivisionCode/CwSubdivisionCode.php | 2 +- .../SubdivisionCode/CxSubdivisionCode.php | 2 +- .../SubdivisionCode/CySubdivisionCode.php | 4 +- .../SubdivisionCode/CzSubdivisionCode.php | 4 +- .../SubdivisionCode/DeSubdivisionCode.php | 4 +- .../SubdivisionCode/DjSubdivisionCode.php | 4 +- .../SubdivisionCode/DkSubdivisionCode.php | 4 +- .../SubdivisionCode/DmSubdivisionCode.php | 4 +- .../SubdivisionCode/DoSubdivisionCode.php | 4 +- .../SubdivisionCode/DzSubdivisionCode.php | 4 +- .../SubdivisionCode/EcSubdivisionCode.php | 4 +- .../SubdivisionCode/EeSubdivisionCode.php | 4 +- .../SubdivisionCode/EgSubdivisionCode.php | 4 +- .../SubdivisionCode/EhSubdivisionCode.php | 2 +- .../SubdivisionCode/ErSubdivisionCode.php | 4 +- .../SubdivisionCode/EsSubdivisionCode.php | 4 +- .../SubdivisionCode/EtSubdivisionCode.php | 4 +- .../SubdivisionCode/FiSubdivisionCode.php | 4 +- .../SubdivisionCode/FjSubdivisionCode.php | 4 +- .../SubdivisionCode/FkSubdivisionCode.php | 2 +- .../SubdivisionCode/FmSubdivisionCode.php | 4 +- .../SubdivisionCode/FoSubdivisionCode.php | 2 +- .../SubdivisionCode/FrSubdivisionCode.php | 4 +- .../SubdivisionCode/GaSubdivisionCode.php | 4 +- .../SubdivisionCode/GbSubdivisionCode.php | 4 +- .../SubdivisionCode/GdSubdivisionCode.php | 4 +- .../SubdivisionCode/GeSubdivisionCode.php | 4 +- .../SubdivisionCode/GfSubdivisionCode.php | 2 +- .../SubdivisionCode/GgSubdivisionCode.php | 2 +- .../SubdivisionCode/GhSubdivisionCode.php | 4 +- .../SubdivisionCode/GiSubdivisionCode.php | 2 +- .../SubdivisionCode/GlSubdivisionCode.php | 4 +- .../SubdivisionCode/GmSubdivisionCode.php | 4 +- .../SubdivisionCode/GnSubdivisionCode.php | 4 +- .../SubdivisionCode/GpSubdivisionCode.php | 2 +- .../SubdivisionCode/GqSubdivisionCode.php | 4 +- .../SubdivisionCode/GrSubdivisionCode.php | 4 +- .../SubdivisionCode/GsSubdivisionCode.php | 2 +- .../SubdivisionCode/GtSubdivisionCode.php | 4 +- .../SubdivisionCode/GuSubdivisionCode.php | 2 +- .../SubdivisionCode/GwSubdivisionCode.php | 4 +- .../SubdivisionCode/GySubdivisionCode.php | 4 +- .../SubdivisionCode/HkSubdivisionCode.php | 4 +- .../SubdivisionCode/HmSubdivisionCode.php | 4 +- .../SubdivisionCode/HnSubdivisionCode.php | 4 +- .../SubdivisionCode/HrSubdivisionCode.php | 4 +- .../SubdivisionCode/HtSubdivisionCode.php | 4 +- .../SubdivisionCode/HuSubdivisionCode.php | 4 +- .../SubdivisionCode/IdSubdivisionCode.php | 4 +- .../SubdivisionCode/IeSubdivisionCode.php | 4 +- .../SubdivisionCode/IlSubdivisionCode.php | 4 +- .../SubdivisionCode/ImSubdivisionCode.php | 2 +- .../SubdivisionCode/InSubdivisionCode.php | 4 +- .../SubdivisionCode/IoSubdivisionCode.php | 4 +- .../SubdivisionCode/IqSubdivisionCode.php | 4 +- .../SubdivisionCode/IrSubdivisionCode.php | 4 +- .../SubdivisionCode/IsSubdivisionCode.php | 4 +- .../SubdivisionCode/ItSubdivisionCode.php | 4 +- .../SubdivisionCode/JeSubdivisionCode.php | 2 +- .../SubdivisionCode/JmSubdivisionCode.php | 4 +- .../SubdivisionCode/JoSubdivisionCode.php | 4 +- .../SubdivisionCode/JpSubdivisionCode.php | 4 +- .../SubdivisionCode/KeSubdivisionCode.php | 4 +- .../SubdivisionCode/KgSubdivisionCode.php | 4 +- .../SubdivisionCode/KhSubdivisionCode.php | 4 +- .../SubdivisionCode/KiSubdivisionCode.php | 4 +- .../SubdivisionCode/KmSubdivisionCode.php | 4 +- .../SubdivisionCode/KnSubdivisionCode.php | 4 +- .../SubdivisionCode/KpSubdivisionCode.php | 4 +- .../SubdivisionCode/KrSubdivisionCode.php | 4 +- .../SubdivisionCode/KwSubdivisionCode.php | 4 +- .../SubdivisionCode/KySubdivisionCode.php | 4 +- .../SubdivisionCode/KzSubdivisionCode.php | 4 +- .../SubdivisionCode/LaSubdivisionCode.php | 4 +- .../SubdivisionCode/LbSubdivisionCode.php | 4 +- .../SubdivisionCode/LcSubdivisionCode.php | 4 +- .../SubdivisionCode/LiSubdivisionCode.php | 4 +- .../SubdivisionCode/LkSubdivisionCode.php | 4 +- .../SubdivisionCode/LrSubdivisionCode.php | 4 +- .../SubdivisionCode/LsSubdivisionCode.php | 4 +- .../SubdivisionCode/LtSubdivisionCode.php | 4 +- .../SubdivisionCode/LuSubdivisionCode.php | 4 +- .../SubdivisionCode/LvSubdivisionCode.php | 4 +- .../SubdivisionCode/LySubdivisionCode.php | 4 +- .../SubdivisionCode/MaSubdivisionCode.php | 4 +- .../SubdivisionCode/McSubdivisionCode.php | 4 +- .../SubdivisionCode/MdSubdivisionCode.php | 4 +- .../SubdivisionCode/MeSubdivisionCode.php | 4 +- .../SubdivisionCode/MfSubdivisionCode.php | 2 +- .../SubdivisionCode/MgSubdivisionCode.php | 4 +- .../SubdivisionCode/MhSubdivisionCode.php | 4 +- .../SubdivisionCode/MkSubdivisionCode.php | 4 +- .../SubdivisionCode/MlSubdivisionCode.php | 4 +- .../SubdivisionCode/MmSubdivisionCode.php | 4 +- .../SubdivisionCode/MnSubdivisionCode.php | 4 +- .../SubdivisionCode/MoSubdivisionCode.php | 2 +- .../SubdivisionCode/MpSubdivisionCode.php | 4 +- .../SubdivisionCode/MqSubdivisionCode.php | 2 +- .../SubdivisionCode/MrSubdivisionCode.php | 4 +- .../SubdivisionCode/MsSubdivisionCode.php | 2 +- .../SubdivisionCode/MtSubdivisionCode.php | 4 +- .../SubdivisionCode/MuSubdivisionCode.php | 4 +- .../SubdivisionCode/MvSubdivisionCode.php | 4 +- .../SubdivisionCode/MwSubdivisionCode.php | 4 +- .../SubdivisionCode/MxSubdivisionCode.php | 4 +- .../SubdivisionCode/MySubdivisionCode.php | 4 +- .../SubdivisionCode/MzSubdivisionCode.php | 4 +- .../SubdivisionCode/NaSubdivisionCode.php | 4 +- .../SubdivisionCode/NcSubdivisionCode.php | 4 +- .../SubdivisionCode/NeSubdivisionCode.php | 4 +- .../SubdivisionCode/NfSubdivisionCode.php | 2 +- .../SubdivisionCode/NgSubdivisionCode.php | 4 +- .../SubdivisionCode/NiSubdivisionCode.php | 4 +- .../SubdivisionCode/NlSubdivisionCode.php | 4 +- .../SubdivisionCode/NoSubdivisionCode.php | 4 +- .../SubdivisionCode/NpSubdivisionCode.php | 4 +- .../SubdivisionCode/NrSubdivisionCode.php | 4 +- .../SubdivisionCode/NuSubdivisionCode.php | 2 +- .../SubdivisionCode/NzSubdivisionCode.php | 4 +- .../SubdivisionCode/OmSubdivisionCode.php | 4 +- .../SubdivisionCode/PaSubdivisionCode.php | 4 +- .../SubdivisionCode/PeSubdivisionCode.php | 4 +- .../SubdivisionCode/PfSubdivisionCode.php | 4 +- .../SubdivisionCode/PgSubdivisionCode.php | 4 +- .../SubdivisionCode/PhSubdivisionCode.php | 4 +- .../SubdivisionCode/PkSubdivisionCode.php | 4 +- .../SubdivisionCode/PlSubdivisionCode.php | 4 +- .../SubdivisionCode/PmSubdivisionCode.php | 4 +- .../SubdivisionCode/PnSubdivisionCode.php | 2 +- .../SubdivisionCode/PrSubdivisionCode.php | 2 +- .../SubdivisionCode/PsSubdivisionCode.php | 4 +- .../SubdivisionCode/PtSubdivisionCode.php | 4 +- .../SubdivisionCode/PwSubdivisionCode.php | 4 +- .../SubdivisionCode/PySubdivisionCode.php | 4 +- .../SubdivisionCode/QaSubdivisionCode.php | 4 +- .../SubdivisionCode/ReSubdivisionCode.php | 2 +- .../SubdivisionCode/RoSubdivisionCode.php | 4 +- .../SubdivisionCode/RsSubdivisionCode.php | 4 +- .../SubdivisionCode/RuSubdivisionCode.php | 4 +- .../SubdivisionCode/RwSubdivisionCode.php | 4 +- .../SubdivisionCode/SaSubdivisionCode.php | 4 +- .../SubdivisionCode/SbSubdivisionCode.php | 4 +- .../SubdivisionCode/ScSubdivisionCode.php | 4 +- .../SubdivisionCode/SdSubdivisionCode.php | 4 +- .../SubdivisionCode/SeSubdivisionCode.php | 4 +- .../SubdivisionCode/SgSubdivisionCode.php | 4 +- .../SubdivisionCode/ShSubdivisionCode.php | 4 +- .../SubdivisionCode/SiSubdivisionCode.php | 4 +- .../SubdivisionCode/SjSubdivisionCode.php | 4 +- .../SubdivisionCode/SkSubdivisionCode.php | 4 +- .../SubdivisionCode/SlSubdivisionCode.php | 4 +- .../SubdivisionCode/SmSubdivisionCode.php | 4 +- .../SubdivisionCode/SnSubdivisionCode.php | 4 +- .../SubdivisionCode/SoSubdivisionCode.php | 4 +- .../SubdivisionCode/SrSubdivisionCode.php | 4 +- .../SubdivisionCode/SsSubdivisionCode.php | 4 +- .../SubdivisionCode/StSubdivisionCode.php | 4 +- .../SubdivisionCode/SvSubdivisionCode.php | 4 +- .../SubdivisionCode/SxSubdivisionCode.php | 2 +- .../SubdivisionCode/SySubdivisionCode.php | 4 +- .../SubdivisionCode/SzSubdivisionCode.php | 4 +- .../SubdivisionCode/TcSubdivisionCode.php | 4 +- .../SubdivisionCode/TdSubdivisionCode.php | 4 +- .../SubdivisionCode/TfSubdivisionCode.php | 2 +- .../SubdivisionCode/TgSubdivisionCode.php | 4 +- .../SubdivisionCode/ThSubdivisionCode.php | 4 +- .../SubdivisionCode/TjSubdivisionCode.php | 4 +- .../SubdivisionCode/TkSubdivisionCode.php | 4 +- .../SubdivisionCode/TlSubdivisionCode.php | 4 +- .../SubdivisionCode/TmSubdivisionCode.php | 4 +- .../SubdivisionCode/TnSubdivisionCode.php | 4 +- .../SubdivisionCode/ToSubdivisionCode.php | 4 +- .../SubdivisionCode/TrSubdivisionCode.php | 4 +- .../SubdivisionCode/TtSubdivisionCode.php | 4 +- .../SubdivisionCode/TvSubdivisionCode.php | 4 +- .../SubdivisionCode/TwSubdivisionCode.php | 4 +- .../SubdivisionCode/TzSubdivisionCode.php | 4 +- .../SubdivisionCode/UaSubdivisionCode.php | 4 +- .../SubdivisionCode/UgSubdivisionCode.php | 4 +- .../SubdivisionCode/UmSubdivisionCode.php | 4 +- .../SubdivisionCode/UsSubdivisionCode.php | 4 +- .../SubdivisionCode/UySubdivisionCode.php | 4 +- .../SubdivisionCode/UzSubdivisionCode.php | 4 +- .../SubdivisionCode/VaSubdivisionCode.php | 2 +- .../SubdivisionCode/VcSubdivisionCode.php | 4 +- .../SubdivisionCode/VeSubdivisionCode.php | 4 +- .../SubdivisionCode/VgSubdivisionCode.php | 2 +- .../SubdivisionCode/ViSubdivisionCode.php | 4 +- .../SubdivisionCode/VnSubdivisionCode.php | 4 +- .../SubdivisionCode/VuSubdivisionCode.php | 4 +- .../SubdivisionCode/WfSubdivisionCode.php | 4 +- .../SubdivisionCode/WsSubdivisionCode.php | 4 +- .../SubdivisionCode/XkSubdivisionCode.php | 2 +- .../SubdivisionCode/YeSubdivisionCode.php | 4 +- .../SubdivisionCode/YtSubdivisionCode.php | 2 +- .../SubdivisionCode/ZaSubdivisionCode.php | 4 +- .../SubdivisionCode/ZmSubdivisionCode.php | 4 +- .../SubdivisionCode/ZwSubdivisionCode.php | 4 +- library/Rules/Tld.php | 4 +- library/Rules/Type.php | 4 +- library/Rules/VideoUrl.php | 4 +- library/Rules/When.php | 2 +- library/Rules/Zend.php | 6 +- library/Validatable.php | 2 +- library/Validator.php | 2 +- tests/integration/alnum_2.phpt | 6 +- tests/integration/alnum_3.phpt | 6 +- tests/integration/alnum_4.phpt | 2 +- tests/integration/alnum_5.phpt | 2 +- tests/integration/alnum_6_expected_char.phpt | 6 +- tests/integration/alnum_7_not_empty.phpt | 6 +- tests/integration/alnum_8_uppercase.phpt | 6 +- tests/integration/alpha_2.phpt | 4 +- tests/integration/alpha_3.phpt | 4 +- tests/integration/alpha_4.phpt | 4 +- tests/integration/assert-with-keys.phpt | 12 +- tests/integration/boolType_2.phpt | 6 +- tests/integration/boolType_3.phpt | 6 +- tests/integration/boolType_4.phpt | 6 +- tests/integration/boolType_5.phpt | 6 +- tests/integration/bsn_2.phpt | 2 +- tests/integration/bsn_3.phpt | 2 +- tests/integration/callableType_2.phpt | 33 +- tests/integration/callableType_3.phpt | 32 +- tests/integration/callableType_4.phpt | 20 +- tests/integration/countryCode_alpha-2_3.phpt | 2 +- tests/integration/countryCode_alpha-2_4.phpt | 2 +- tests/integration/countryCode_alpha-2_5.phpt | 2 +- tests/integration/countryCode_alpha-2_6.phpt | 2 +- tests/integration/countryCode_alpha-3_1.phpt | 2 +- tests/integration/countryCode_alpha-3_2.phpt | 2 +- tests/integration/countryCode_alpha-3_3.phpt | 4 +- tests/integration/countryCode_alpha-3_4.phpt | 4 +- tests/integration/countryCode_alpha-3_5.phpt | 4 +- tests/integration/countryCode_alpha-3_6.phpt | 4 +- tests/integration/countryCode_number_1.phpt | 2 +- tests/integration/countryCode_number_2.phpt | 2 +- tests/integration/countryCode_number_3.phpt | 4 +- tests/integration/countryCode_number_4.phpt | 4 +- tests/integration/countryCode_number_5.phpt | 4 +- tests/integration/countryCode_number_6.phpt | 4 +- tests/integration/cpf_1.phpt | 1 - tests/integration/cpf_2.phpt | 2 +- tests/integration/cpf_3.phpt | 2 +- tests/integration/cpf_4.phpt | 2 +- tests/integration/cpf_5.phpt | 2 +- tests/integration/creditCard_1.phpt | 1 - tests/integration/creditCard_2.phpt | 4 +- tests/integration/creditCard_3.phpt | 4 +- tests/integration/email_2.phpt | 2 +- tests/integration/email_3.phpt | 2 +- tests/integration/email_4.phpt | 2 +- tests/integration/email_5.phpt | 2 +- tests/integration/email_6.phpt | 2 +- ...apply_templates_to_flattened_messages.phpt | 8 +- ...mposite_validation_messages_flattened.phpt | 6 +- ...de_all_validation_messages_in_a_chain.phpt | 4 +- tests/integration/intType_2.phpt | 2 +- tests/integration/intType_3.phpt | 2 +- tests/integration/intType_4.phpt | 2 +- tests/integration/intType_5.phpt | 2 +- tests/integration/ip_3.phpt | 4 +- tests/integration/ip_4.phpt | 4 +- tests/integration/ip_5.phpt | 4 +- tests/integration/ip_6.phpt | 2 +- ...uld_not_trigger_catchable_fatal_error.phpt | 2 +- tests/integration/key-nested.phpt | 11 +- tests/integration/keyValue-1.phpt | 10 +- tests/integration/keyValue-2.phpt | 14 +- .../integration/keys_as_validator_names.phpt | 2 +- tests/integration/length_2.phpt | 2 +- tests/integration/length_3.phpt | 2 +- tests/integration/minimumAge_2.phpt | 8 +- tests/integration/minimumAge_3.phpt | 1 - tests/integration/minimumAge_4.phpt | 8 +- tests/integration/notBlank_1.phpt | 22 +- tests/integration/notBlank_2.phpt | 4 +- tests/integration/notBlank_3.phpt | 4 +- tests/integration/notBlank_4.phpt | 6 +- tests/integration/notEmpty_1.phpt | 10 +- tests/integration/notEmpty_2.phpt | 4 +- tests/integration/notEmpty_3.phpt | 4 +- tests/integration/notEmpty_4.phpt | 6 +- tests/integration/notOptional_1.phpt | 2 +- tests/integration/notOptional_2.phpt | 4 +- tests/integration/notOptional_3.phpt | 4 +- tests/integration/notOptional_4.phpt | 8 +- tests/integration/not_with_recursion.phpt | 2 +- tests/integration/not_without_recursion.phpt | 2 +- tests/integration/nullType_2.phpt | 4 +- tests/integration/nullType_3.phpt | 4 +- tests/integration/nullType_4.phpt | 4 +- tests/integration/numeric_2.phpt | 4 +- tests/integration/numeric_3.phpt | 4 +- tests/integration/numeric_4.phpt | 4 +- tests/integration/objectType_2.phpt | 2 +- tests/integration/optional-assert.phpt | 1 - tests/integration/optional-check.phpt | 1 - tests/integration/optional-validate.phpt | 1 - tests/integration/optional_2.phpt | 3 +- tests/integration/optional_3.phpt | 3 +- ...r_should_use_template_as_main_message.phpt | 2 +- tests/integration/slug_1.phpt | 1 - tests/integration/slug_2.phpt | 2 +- tests/integration/slug_3.phpt | 2 +- tests/integration/slug_4.phpt | 2 +- tests/integration/slug_5.phpt | 2 +- tests/integration/stringType_2.phpt | 2 +- tests/integration/stringType_3.phpt | 2 +- tests/integration/stringType_4.phpt | 2 +- tests/integration/stringType_5.phpt | 2 +- tests/integration/tld_2.phpt | 2 +- tests/integration/tld_3.phpt | 2 +- tests/integration/tld_4.phpt | 2 +- tests/integration/tld_5.phpt | 2 +- tests/integration/translator-assert.phpt | 4 +- tests/integration/translator-check.phpt | 4 +- tests/integration/when_1.phpt | 4 +- tests/integration/when_2.phpt | 4 +- tests/integration/yes_1.phpt | 1 - tests/integration/yes_2.phpt | 2 +- tests/integration/yes_3.phpt | 2 +- tests/library/RuleTestCase.php | 4 +- tests/unit/Exceptions/CheckExceptionsTest.php | 8 +- .../Exceptions/ValidationExceptionTest.php | 110 ++-- tests/unit/FactoryTest.php | 8 +- tests/unit/Rules/AbstractCompositeTest.php | 12 +- tests/unit/Rules/AbstractRuleTest.php | 12 +- tests/unit/Rules/AgeTest.php | 48 +- tests/unit/Rules/AllOfTest.php | 22 +- tests/unit/Rules/AlnumTest.php | 72 +-- tests/unit/Rules/AlphaTest.php | 76 +-- tests/unit/Rules/AlwaysValidTest.php | 22 +- tests/unit/Rules/ArrayValTest.php | 26 +- tests/unit/Rules/AttributeTest.php | 10 +- tests/unit/Rules/BaseTest.php | 66 +-- tests/unit/Rules/BetweenTest.php | 50 +- tests/unit/Rules/BoolTypeTest.php | 2 +- tests/unit/Rules/BsnTest.php | 54 +- tests/unit/Rules/CallTest.php | 6 +- tests/unit/Rules/CallableTypeTest.php | 26 +- tests/unit/Rules/CallbackTest.php | 2 +- tests/unit/Rules/CharsetTest.php | 50 +- tests/unit/Rules/CnhTest.php | 210 +++---- tests/unit/Rules/CnpjTest.php | 68 +-- tests/unit/Rules/CntrlTest.php | 52 +- tests/unit/Rules/ConsonantTest.php | 64 +-- tests/unit/Rules/ContainsTest.php | 58 +- tests/unit/Rules/CountryCodeTest.php | 32 +- tests/unit/Rules/CpfTest.php | 74 +-- tests/unit/Rules/CreditCardTest.php | 30 +- tests/unit/Rules/DateTest.php | 16 +- tests/unit/Rules/DigitTest.php | 62 +-- tests/unit/Rules/DirectoryTest.php | 22 +- tests/unit/Rules/DomainTest.php | 38 +- tests/unit/Rules/EachTest.php | 24 +- tests/unit/Rules/EmailTest.php | 40 +- tests/unit/Rules/EndsWithTest.php | 36 +- tests/unit/Rules/EqualsTest.php | 20 +- tests/unit/Rules/EvenTest.php | 26 +- tests/unit/Rules/ExecutableTest.php | 2 +- tests/unit/Rules/ExtensionTest.php | 14 +- tests/unit/Rules/FactorTest.php | 76 +-- tests/unit/Rules/FalseValTest.php | 50 +- tests/unit/Rules/FileTest.php | 2 +- tests/unit/Rules/FilterVarTest.php | 4 +- tests/unit/Rules/FiniteTest.php | 30 +- tests/unit/Rules/FloatValTest.php | 36 +- tests/unit/Rules/GraphTest.php | 48 +- tests/unit/Rules/HexRgbColorTest.php | 52 +- tests/unit/Rules/IdenticalTest.php | 25 +- tests/unit/Rules/InTest.php | 56 +- tests/unit/Rules/InfiniteTest.php | 32 +- tests/unit/Rules/IntTypeTest.php | 24 +- tests/unit/Rules/IntValTest.php | 30 +- tests/unit/Rules/IpTest.php | 100 ++-- tests/unit/Rules/JsonTest.php | 22 +- tests/unit/Rules/KeyNestedTest.php | 86 +-- tests/unit/Rules/KeySetTest.php | 20 +- tests/unit/Rules/KeyTest.php | 14 +- tests/unit/Rules/KeyValueTest.php | 20 +- tests/unit/Rules/LeapDateTest.php | 2 +- tests/unit/Rules/LeapYearTest.php | 2 +- tests/unit/Rules/LengthTest.php | 66 +-- tests/unit/Rules/LowercaseTest.php | 32 +- tests/unit/Rules/MacAddressTest.php | 26 +- tests/unit/Rules/MaxTest.php | 34 +- tests/unit/Rules/MimetypeTest.php | 6 +- tests/unit/Rules/MinTest.php | 42 +- tests/unit/Rules/MininumAgeTest.php | 32 +- tests/unit/Rules/MultipleTest.php | 46 +- tests/unit/Rules/NegativeTest.php | 36 +- tests/unit/Rules/NfeAccessKeyTest.php | 52 +- tests/unit/Rules/NoTest.php | 30 +- tests/unit/Rules/NoWhitespaceTest.php | 30 +- tests/unit/Rules/NotBlankTest.php | 50 +- tests/unit/Rules/NotEmptyTest.php | 30 +- tests/unit/Rules/NotOptionalTest.php | 40 +- tests/unit/Rules/NotTest.php | 32 +- tests/unit/Rules/NullTypeTest.php | 14 +- tests/unit/Rules/NumericTest.php | 30 +- tests/unit/Rules/ObjectTypeTest.php | 24 +- tests/unit/Rules/OddTest.php | 26 +- tests/unit/Rules/OptionalTest.php | 42 +- tests/unit/Rules/PerfectSquareTest.php | 48 +- tests/unit/Rules/PhoneTest.php | 148 ++--- tests/unit/Rules/PositiveTest.php | 36 +- tests/unit/Rules/PostalCodeTest.php | 34 +- tests/unit/Rules/PrimeNumberTest.php | 46 +- tests/unit/Rules/PrntTest.php | 48 +- tests/unit/Rules/PunctTest.php | 52 +- tests/unit/Rules/ReadableTest.php | 2 +- tests/unit/Rules/ResourceTypeTest.php | 26 +- tests/unit/Rules/RomanTest.php | 48 +- tests/unit/Rules/ScalarValTest.php | 30 +- tests/unit/Rules/SizeTest.php | 62 +-- tests/unit/Rules/SlugTest.php | 38 +- tests/unit/Rules/SpaceTest.php | 52 +- tests/unit/Rules/StartsWithTest.php | 36 +- tests/unit/Rules/StringTypeTest.php | 20 +- tests/unit/Rules/SubdivisionCodeTest.php | 24 +- tests/unit/Rules/SymbolicLinkTest.php | 2 +- tests/unit/Rules/TldTest.php | 28 +- tests/unit/Rules/TrueValTest.php | 50 +- tests/unit/Rules/TypeTest.php | 36 +- tests/unit/Rules/UppercaseTest.php | 32 +- tests/unit/Rules/UrlTest.php | 40 +- tests/unit/Rules/VersionTest.php | 36 +- tests/unit/Rules/VideoUrlTest.php | 50 +- tests/unit/Rules/VowelTest.php | 60 +- tests/unit/Rules/WhenTest.php | 52 +- tests/unit/Rules/WritableTest.php | 2 +- tests/unit/Rules/XdigitTest.php | 38 +- tests/unit/Rules/YesTest.php | 28 +- tests/unit/Rules/ZendTest.php | 4 +- 912 files changed, 5446 insertions(+), 5457 deletions(-) diff --git a/.php_cs b/.php_cs index 8180228f..5810a78c 100644 --- a/.php_cs +++ b/.php_cs @@ -19,11 +19,15 @@ return Symfony\CS\Config\Config::create() 'phpdoc_separation', // An empty line feed should precede a return statement. 'return', + // PHP arrays should use the PHP 5.4 short-syntax. + 'short_array_syntax', // Remove trailing whitespace at the end of blank lines. 'whitespacy_lines', // Removes extra empty lines. 'extra_empty_lines', // Unused use statements must be removed. - 'unused_use' + 'unused_use', + // Ordering use statements. + 'ordered_use', )) ->finder($finder); diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2124abf1..c2e3c185 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,14 +64,14 @@ namespace Respect\Validation\Exceptions; class HelloWorldException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a Hello World', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a Hello World', - ) - ); + ] + ]; } ``` diff --git a/docs/ArrayVal.md b/docs/ArrayVal.md index 9b719b02..ef8deaf9 100644 --- a/docs/ArrayVal.md +++ b/docs/ArrayVal.md @@ -5,7 +5,7 @@ Validates if the input is an array or traversable object. ```php -v::arrayVal()->validate(array()); //true +v::arrayVal()->validate([]); //true v::arrayVal()->validate(new ArrayObject); //true ``` diff --git a/docs/Call.md b/docs/Call.md index 616ffbdb..f56b0a8e 100644 --- a/docs/Call.md +++ b/docs/Call.md @@ -41,7 +41,7 @@ v::call( It is possible to call methods and closures as the first parameter: ```php -v::call(array($myObj, 'methodName'), v::intVal())->validate($myInput); +v::call([$myObj, 'methodName'], v::intVal())->validate($myInput); v::call(function($input) {}, v::intVal())->validate($myInput); ``` diff --git a/docs/CallableType.md b/docs/CallableType.md index a6b80abc..24458fc2 100644 --- a/docs/CallableType.md +++ b/docs/CallableType.md @@ -7,7 +7,7 @@ Validates if the input is a callable value. ```php v::callableType()->validate(function () {}); //true v::callableType()->validate('trim'); //true -v::callableType()->validate(array(new ObjectType, 'methodName')); //true +v::callableType()->validate([new ObjectType, 'methodName']); //true ``` *** diff --git a/docs/Charset.md b/docs/Charset.md index b0f7221b..0da0eb21 100644 --- a/docs/Charset.md +++ b/docs/Charset.md @@ -7,7 +7,7 @@ Validates if a string is in a specific charset. ```php v::charset('ASCII')->validate('açúcar'); //false v::charset('ASCII')->validate('sugar'); //true -v::charset(array('ISO-8859-1', 'EUC-JP'))->validate('日本国'); // true +v::charset(['ISO-8859-1', 'EUC-JP'])->validate('日本国'); // true ``` The array format is a logic OR, not AND. diff --git a/docs/Contains.md b/docs/Contains.md index 881aed94..a26fe6ed 100644 --- a/docs/Contains.md +++ b/docs/Contains.md @@ -12,7 +12,7 @@ v::contains('ipsum')->validate('lorem ipsum'); //true For arrays: ```php -v::contains('ipsum')->validate(array('ipsum', 'lorem')); //true +v::contains('ipsum')->validate(['ipsum', 'lorem']); //true ``` A second parameter may be passed for identical comparison instead diff --git a/docs/Each.md b/docs/Each.md index 50d3e78c..0acbe9c0 100644 --- a/docs/Each.md +++ b/docs/Each.md @@ -8,11 +8,11 @@ Iterates over an array or Iterator and validates the value or key of each entry: ```php -$releaseDates = array( +$releaseDates = [ 'validation' => '2010-01-01', 'template' => '2011-01-01', 'relational' => '2011-02-05', -); +]; v::arrayVal()->each(v::date())->validate($releaseDates); //true v::arrayVal()->each(v::date(), v::stringType()->lowercase())->validate($releaseDates); //true diff --git a/docs/EndsWith.md b/docs/EndsWith.md index dcc79976..f7a62081 100644 --- a/docs/EndsWith.md +++ b/docs/EndsWith.md @@ -15,7 +15,7 @@ v::endsWith('ipsum')->validate('lorem ipsum'); //true For arrays: ```php -v::endsWith('ipsum')->validate(array('lorem', 'ipsum')); //true +v::endsWith('ipsum')->validate(['lorem', 'ipsum']); //true ``` A second parameter may be passed for identical comparison instead diff --git a/docs/In.md b/docs/In.md index a783d350..524a154e 100644 --- a/docs/In.md +++ b/docs/In.md @@ -14,7 +14,7 @@ v::in('lorem ipsum')->validate('ipsum'); //true For arrays: ```php -v::in(array('lorem', 'ipsum'))->validate('lorem'); //true +v::in(['lorem', 'ipsum'])->validate('lorem'); //true ``` A second parameter may be passed for identical comparison instead diff --git a/docs/Key.md b/docs/Key.md index d71ba525..6bcae71e 100644 --- a/docs/Key.md +++ b/docs/Key.md @@ -7,9 +7,9 @@ Validates an array key. ```php -$dict = array( +$dict = [ 'foo' => 'bar' -); +]; v::key('foo')->validate($dict); //true ``` diff --git a/docs/KeyNested.md b/docs/KeyNested.md index 52c17bae..3129dde3 100644 --- a/docs/KeyNested.md +++ b/docs/KeyNested.md @@ -9,11 +9,11 @@ Validates an array key or an object property using `.` to represent nested data. Validating keys from arrays or `ArrayAccess` instances: ```php -$array = array( - 'foo' => array( +$array = [ + 'foo' => [ 'bar' => 123, - ), -); + ], +]; v::keyNested('foo.bar')->validate($array); // true ``` diff --git a/docs/KeySet.md b/docs/KeySet.md index c4a9c3a6..0f9230de 100644 --- a/docs/KeySet.md +++ b/docs/KeySet.md @@ -5,7 +5,7 @@ Validates a keys in a defined structure. ```php -$dict = array('foo' => 42); +$dict = ['foo' => 42]; v::keySet( v::key('foo', v::intVal()) @@ -14,7 +14,7 @@ v::keySet( Extra keys are not allowed: ```php -$dict = array('foo' => 42, 'bar' => 'String'); +$dict = ['foo' => 42, 'bar' => 'String']; v::keySet( v::key('foo', v::intVal()) @@ -23,7 +23,7 @@ v::keySet( Missing required keys are not allowed: ```php -$dict = array('foo' => 42, 'bar' => 'String'); +$dict = ['foo' => 42, 'bar' => 'String']; v::keySet( v::key('foo', v::intVal()), @@ -34,7 +34,7 @@ v::keySet( Missing non-required keys are allowed: ```php -$dict = array('foo' => 42, 'bar' => 'String'); +$dict = ['foo' => 42, 'bar' => 'String']; v::keySet( v::key('foo', v::intVal()), diff --git a/docs/Length.md b/docs/Length.md index 76615046..51e92244 100644 --- a/docs/Length.md +++ b/docs/Length.md @@ -27,7 +27,7 @@ The type as the first validator in a chain is a good practice, since length accepts many types: ```php -v::arrayVal()->length(1, 5)->validate(array('foo', 'bar')); //true +v::arrayVal()->length(1, 5)->validate(['foo', 'bar']); //true ``` A third parameter may be passed to validate the passed values inclusive: diff --git a/docs/NotBlank.md b/docs/NotBlank.md index f1442695..35a5ef2d 100644 --- a/docs/NotBlank.md +++ b/docs/NotBlank.md @@ -8,19 +8,19 @@ or empty arrays, recursively). ```php v::notBlank()->validate(null); // false v::notBlank()->validate(''); // false -v::notBlank()->validate(array()); // false +v::notBlank()->validate([]); // false v::notBlank()->validate(' '); // false v::notBlank()->validate(0); // false v::notBlank()->validate('0'); // false v::notBlank()->validate(0); // false v::notBlank()->validate('0.0'); // false v::notBlank()->validate(false); // false -v::notBlank()->validate(array('')); // false -v::notBlank()->validate(array(' ')); // false -v::notBlank()->validate(array(0)); // false -v::notBlank()->validate(array('0')); // false -v::notBlank()->validate(array(false)); // false -v::notBlank()->validate(array(array(''), array(0))); // false +v::notBlank()->validate(['']); // false +v::notBlank()->validate([' ']); // false +v::notBlank()->validate([0]); // false +v::notBlank()->validate(['0']); // false +v::notBlank()->validate([false]); // false +v::notBlank()->validate([[''], [0]]); // false v::notBlank()->validate(new stdClass()); // false ``` diff --git a/docs/NotEmpty.md b/docs/NotEmpty.md index 570e1021..64ce3416 100644 --- a/docs/NotEmpty.md +++ b/docs/NotEmpty.md @@ -25,7 +25,7 @@ v::intVal()->notEmpty()->validate(0); //false Empty arrays: ```php -v::arrayVal()->notEmpty()->validate(array()); //false +v::arrayVal()->notEmpty()->validate([]); //false ``` Whitespace: diff --git a/docs/NotOptional.md b/docs/NotOptional.md index a11c3821..f34fecf6 100644 --- a/docs/NotOptional.md +++ b/docs/NotOptional.md @@ -13,19 +13,19 @@ v::notOptional()->validate(null); //false Other values: ```php -v::notOptional()->validate(array()); // true +v::notOptional()->validate([]); // true v::notOptional()->validate(' '); // true v::notOptional()->validate(0); // true v::notOptional()->validate('0'); // true v::notOptional()->validate(0); // true v::notOptional()->validate('0.0'); // true v::notOptional()->validate(false); // true -v::notOptional()->validate(array('')); // true -v::notOptional()->validate(array(' ')); // true -v::notOptional()->validate(array(0)); // true -v::notOptional()->validate(array('0')); // true -v::notOptional()->validate(array(false)); // true -v::notOptional()->validate(array(array(''), array(0))); // true +v::notOptional()->validate(['']); // true +v::notOptional()->validate([' ']); // true +v::notOptional()->validate([0]); // true +v::notOptional()->validate(['0']); // true +v::notOptional()->validate([false]); // true +v::notOptional()->validate([[''), [0]]); // true v::notOptional()->validate(new stdClass()); // true ``` diff --git a/docs/README.md b/docs/README.md index 454644a6..653e90f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -143,7 +143,7 @@ use Respect\Validation\Exceptions\NestedValidationExceptionInterface; try { $usernameValidator->assert('really messed up screen#name'); } catch(NestedValidationExceptionInterface $exception) { - var_dump($exception->findMessages(array('alnum', 'length', 'noWhitespace'))); + var_dump($exception->findMessages(['alnum', 'length', 'noWhitespace'])); } ``` @@ -184,11 +184,11 @@ Getting messages as an array is fine, but sometimes you need to customize them i to present them to the user. This is possible using the `findMessages()` method as well: ```php -$errors = $exception->findMessages(array( +$errors = $exception->findMessages([ 'alnum' => '{{name}} must contain only letters and digits', 'length' => '{{name}} must not have more than 15 chars', 'noWhitespace' => '{{name}} cannot contain spaces' -)); +]); ``` For all messages, the `{{name}}` and `{{input}}` variable is available for templates. @@ -204,7 +204,7 @@ $exception->setParam('translator', 'gettext'); ``` The example above uses `gettext()` but you can use any other callable value, like -`array($translator, 'trans')` or `you_custom_function()`. +`[$translator, 'trans']` or `you_custom_function()`. After that, if you call `getMainMessage()` or `getFullMessage()` (for nested), the message will be translated. diff --git a/docs/ScalarVal.md b/docs/ScalarVal.md index 3f6a0749..300f7af4 100644 --- a/docs/ScalarVal.md +++ b/docs/ScalarVal.md @@ -5,7 +5,7 @@ Validates if the input is a scalar value. ```php -v::scalarVal()->validate(array()); //false +v::scalarVal()->validate([]); //false v::scalarVal()->validate(135.0); //true ``` diff --git a/docs/StartsWith.md b/docs/StartsWith.md index fbee1309..70d04bb3 100644 --- a/docs/StartsWith.md +++ b/docs/StartsWith.md @@ -15,7 +15,7 @@ v::startsWith('lorem')->validate('lorem ipsum'); //true For arrays: ```php -v::startsWith('lorem')->validate(array('lorem', 'ipsum')); //true +v::startsWith('lorem')->validate(['lorem', 'ipsum']); //true ``` `true` may be passed as a parameter to indicate identical comparison diff --git a/library/ExceptionIterator.php b/library/ExceptionIterator.php index 2fea3543..e344baeb 100644 --- a/library/ExceptionIterator.php +++ b/library/ExceptionIterator.php @@ -21,7 +21,7 @@ class ExceptionIterator extends RecursiveArrayIterator public function __construct($target, $fullRelated = false) { $this->fullRelated = $fullRelated; - parent::__construct(is_array($target) ? $target : array($target)); + parent::__construct(is_array($target) ? $target : [$target]); } public function current() diff --git a/library/Exceptions/AbstractGroupedException.php b/library/Exceptions/AbstractGroupedException.php index 21cd2891..08b80b5e 100644 --- a/library/Exceptions/AbstractGroupedException.php +++ b/library/Exceptions/AbstractGroupedException.php @@ -15,16 +15,16 @@ class AbstractGroupedException extends AbstractNestedException { const NONE = 0; const SOME = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NONE => 'All of the required rules must pass for {{name}}', self::SOME => 'These rules must pass for {{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NONE => 'None of there rules must pass for {{name}}', self::SOME => 'These rules must not pass for {{name}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/AbstractNestedException.php b/library/Exceptions/AbstractNestedException.php index b88e8de1..f036fab5 100644 --- a/library/Exceptions/AbstractNestedException.php +++ b/library/Exceptions/AbstractNestedException.php @@ -20,7 +20,7 @@ class AbstractNestedException extends ValidationException implements NestedValid const ITERATE_TREE = 1; const ITERATE_ALL = 2; - protected $related = array(); + protected $related = []; public function addRelated(ValidationException $related) { @@ -31,7 +31,7 @@ class AbstractNestedException extends ValidationException implements NestedValid public function findMessages(array $paths) { - $messages = array(); + $messages = []; foreach ($paths as $key => $value) { $numericKey = is_numeric($key); @@ -75,7 +75,7 @@ class AbstractNestedException extends ValidationException implements NestedValid public function getMessages() { - $messages = array(); + $messages = []; foreach ($this->getIterator() as $key => $exception) { if ($key === 0) { continue; @@ -89,7 +89,7 @@ class AbstractNestedException extends ValidationException implements NestedValid public function getFullMessage() { - $message = array(); + $message = []; $iterator = $this->getIterator(false, self::ITERATE_TREE); foreach ($iterator as $m) { $message[] = $m; diff --git a/library/Exceptions/AgeException.php b/library/Exceptions/AgeException.php index aa53c5e3..eaafa687 100644 --- a/library/Exceptions/AgeException.php +++ b/library/Exceptions/AgeException.php @@ -17,18 +17,18 @@ class AgeException extends AbstractNestedException const LOWER = 1; const GREATER = 2; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::BOTH => '{{name}} must be between {{minAge}} and {{maxAge}} years ago', self::LOWER => '{{name}} must be lower than {{minAge}} years ago', self::GREATER => '{{name}} must be greater than {{maxAge}} years ago', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::BOTH => '{{name}} must not be between {{minAge}} and {{maxAge}} years ago', self::LOWER => '{{name}} must not be lower than {{minAge}} years ago', self::GREATER => '{{name}} must not be greater than {{maxAge}} years ago', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/AllOfException.php b/library/Exceptions/AllOfException.php index fa266413..92ef6d24 100644 --- a/library/Exceptions/AllOfException.php +++ b/library/Exceptions/AllOfException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class AllOfException extends AbstractGroupedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NONE => 'All of the required rules must pass for {{name}}', self::SOME => 'These rules must pass for {{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NONE => 'None of these rules must pass for {{name}}', self::SOME => 'These rules must not pass for {{name}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/AlnumException.php b/library/Exceptions/AlnumException.php index 0e8c1bb7..b082551c 100644 --- a/library/Exceptions/AlnumException.php +++ b/library/Exceptions/AlnumException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class AlnumException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $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}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain letters (a-z) or digits (0-9)', self::EXTRA => '{{name}} must not contain letters (a-z), digits (0-9) or {{additionalChars}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/AlphaException.php b/library/Exceptions/AlphaException.php index fe07115e..78161303 100644 --- a/library/Exceptions/AlphaException.php +++ b/library/Exceptions/AlphaException.php @@ -15,16 +15,16 @@ class AlphaException extends ValidationException { const EXTRA = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only letters (a-z)', self::EXTRA => '{{name}} must contain only letters (a-z) and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain letters (a-z)', self::EXTRA => '{{name}} must not contain letters (a-z) or "{{additionalChars}}"', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/AlwaysInvalidException.php b/library/Exceptions/AlwaysInvalidException.php index a194c8e0..9c9512c2 100644 --- a/library/Exceptions/AlwaysInvalidException.php +++ b/library/Exceptions/AlwaysInvalidException.php @@ -15,14 +15,14 @@ class AlwaysInvalidException extends ValidationException { const SIMPLE = 0; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is always invalid', self::SIMPLE => '{{name}} is not valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is always valid', self::SIMPLE => '{{name}} is valid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/AlwaysValidException.php b/library/Exceptions/AlwaysValidException.php index a061fd83..4416e469 100644 --- a/library/Exceptions/AlwaysValidException.php +++ b/library/Exceptions/AlwaysValidException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class AlwaysValidException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is always valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is always invalid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ArrayValException.php b/library/Exceptions/ArrayValException.php index aa1b0015..5bd9bdb6 100644 --- a/library/Exceptions/ArrayValException.php +++ b/library/Exceptions/ArrayValException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ArrayValException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an array', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an array', - ), - ); + ], + ]; } diff --git a/library/Exceptions/AtLeastException.php b/library/Exceptions/AtLeastException.php index 5c78f2bb..499303d6 100644 --- a/library/Exceptions/AtLeastException.php +++ b/library/Exceptions/AtLeastException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class AtLeastException extends AbstractGroupedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NONE => 'At least {{howMany}} of the {{failed}} required rules must pass for {{name}}', self::SOME => 'At least {{howMany}} of the {{failed}} required rules must pass for {{name}}, only {{passed}} passed.', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NONE => 'At least {{howMany}} of the {{failed}} required rules must not pass for {{name}}', self::SOME => 'At least {{howMany}} of the {{failed}} required rules must not pass for {{name}}, only {{passed}} passed.', - ), - ); + ], + ]; } diff --git a/library/Exceptions/AttributeException.php b/library/Exceptions/AttributeException.php index 94e0190c..2b4a24c4 100644 --- a/library/Exceptions/AttributeException.php +++ b/library/Exceptions/AttributeException.php @@ -15,16 +15,16 @@ class AttributeException extends AbstractNestedException { const NOT_PRESENT = 0; const INVALID = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NOT_PRESENT => 'Attribute {{name}} must be present', self::INVALID => 'Attribute {{name}} must be valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NOT_PRESENT => 'Attribute {{name}} must not be present', self::INVALID => 'Attribute {{name}} must not validate', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/BankAccountException.php b/library/Exceptions/BankAccountException.php index b05f43d9..924bb24e 100644 --- a/library/Exceptions/BankAccountException.php +++ b/library/Exceptions/BankAccountException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class BankAccountException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a bank account', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a bank account', - ), - ); + ], + ]; } diff --git a/library/Exceptions/BankException.php b/library/Exceptions/BankException.php index 3a1e4455..8d116a36 100644 --- a/library/Exceptions/BankException.php +++ b/library/Exceptions/BankException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class BankException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a bank', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a bank', - ), - ); + ], + ]; } diff --git a/library/Exceptions/BetweenException.php b/library/Exceptions/BetweenException.php index e7d10280..6a4aa1b9 100644 --- a/library/Exceptions/BetweenException.php +++ b/library/Exceptions/BetweenException.php @@ -17,18 +17,18 @@ class BetweenException extends AbstractNestedException const LOWER = 1; const GREATER = 2; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::BOTH => '{{name}} must be between {{minValue}} and {{maxValue}}', self::LOWER => '{{name}} must be greater than {{minValue}}', self::GREATER => '{{name}} must be lower than {{maxValue}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::BOTH => '{{name}} must not be between {{minValue}} and {{maxValue}}', self::LOWER => '{{name}} must not be greater than {{minValue}}', self::GREATER => '{{name}} must not be lower than {{maxValue}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/BicException.php b/library/Exceptions/BicException.php index ca6a09e4..bf6d00d0 100644 --- a/library/Exceptions/BicException.php +++ b/library/Exceptions/BicException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class BicException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a BIC', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a BIC', - ), - ); + ], + ]; } diff --git a/library/Exceptions/BoolTypeException.php b/library/Exceptions/BoolTypeException.php index 48202ac4..ece8aec4 100644 --- a/library/Exceptions/BoolTypeException.php +++ b/library/Exceptions/BoolTypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class BoolTypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a boolean', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a boolean', - ), - ); + ], + ]; } diff --git a/library/Exceptions/BsnException.php b/library/Exceptions/BsnException.php index 91b20038..89e0ad93 100644 --- a/library/Exceptions/BsnException.php +++ b/library/Exceptions/BsnException.php @@ -19,12 +19,12 @@ class BsnException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a BSN', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a BSN', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CallableTypeException.php b/library/Exceptions/CallableTypeException.php index 24fa66c2..5c24875c 100644 --- a/library/Exceptions/CallableTypeException.php +++ b/library/Exceptions/CallableTypeException.php @@ -19,12 +19,12 @@ class CallableTypeException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a callable', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a callable', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CallbackException.php b/library/Exceptions/CallbackException.php index f3e78903..3e964cf9 100644 --- a/library/Exceptions/CallbackException.php +++ b/library/Exceptions/CallbackException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CallbackException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be valid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CharsetException.php b/library/Exceptions/CharsetException.php index 253b7a64..fcf95f4f 100644 --- a/library/Exceptions/CharsetException.php +++ b/library/Exceptions/CharsetException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CharsetException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be in the {{charset}} charset', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be in the {{charset}} charset', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CnhException.php b/library/Exceptions/CnhException.php index 7a3d8128..9ace46c5 100644 --- a/library/Exceptions/CnhException.php +++ b/library/Exceptions/CnhException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CnhException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid CNH number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid CNH number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CnpjException.php b/library/Exceptions/CnpjException.php index 3b008f1f..28115dc1 100644 --- a/library/Exceptions/CnpjException.php +++ b/library/Exceptions/CnpjException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CnpjException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid CNPJ number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid CNPJ number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CntrlException.php b/library/Exceptions/CntrlException.php index ca6c849b..8b280b5e 100644 --- a/library/Exceptions/CntrlException.php +++ b/library/Exceptions/CntrlException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class CntrlException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only control characters', self::EXTRA => '{{name}} must contain only control characters and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain control characters', self::EXTRA => '{{name}} must not contain control characters or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ConsonantException.php b/library/Exceptions/ConsonantException.php index 468e70b6..56ff774f 100644 --- a/library/Exceptions/ConsonantException.php +++ b/library/Exceptions/ConsonantException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class ConsonantException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only consonants', self::EXTRA => '{{name}} must contain only consonants and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain consonants', self::EXTRA => '{{name}} must not contain consonants or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ContainsException.php b/library/Exceptions/ContainsException.php index f4e1d340..2c3060c3 100644 --- a/library/Exceptions/ContainsException.php +++ b/library/Exceptions/ContainsException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ContainsException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain the value "{{containsValue}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain the value "{{containsValue}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CountryCodeException.php b/library/Exceptions/CountryCodeException.php index e76c504f..d3281721 100644 --- a/library/Exceptions/CountryCodeException.php +++ b/library/Exceptions/CountryCodeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CountryCodeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid country', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid country', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CpfException.php b/library/Exceptions/CpfException.php index 08acf2fd..e66f688e 100644 --- a/library/Exceptions/CpfException.php +++ b/library/Exceptions/CpfException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CpfException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid CPF number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid CPF number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/CreditCardException.php b/library/Exceptions/CreditCardException.php index 84bdd41b..ee8d7312 100644 --- a/library/Exceptions/CreditCardException.php +++ b/library/Exceptions/CreditCardException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class CreditCardException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid Credit Card number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid Credit Card number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/DateException.php b/library/Exceptions/DateException.php index 42ed3540..2d43cc8c 100644 --- a/library/Exceptions/DateException.php +++ b/library/Exceptions/DateException.php @@ -15,18 +15,18 @@ class DateException extends ValidationException { const FORMAT = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid date', self::FORMAT => '{{name}} must be a valid date. Sample format: {{format}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid date', self::FORMAT => '{{name}} must not be a valid date in the format {{format}}', - ), - ); + ], + ]; - public function configure($name, array $params = array()) + public function configure($name, array $params = []) { $params['format'] = date( $params['format'], diff --git a/library/Exceptions/DigitException.php b/library/Exceptions/DigitException.php index 7f1e6ee6..981b2865 100644 --- a/library/Exceptions/DigitException.php +++ b/library/Exceptions/DigitException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class DigitException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only digits (0-9)', self::EXTRA => '{{name}} must contain only digits (0-9) and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain digits (0-9)', self::EXTRA => '{{name}} must not contain digits (0-9) or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/DirectoryException.php b/library/Exceptions/DirectoryException.php index b2eb36af..362d1bbe 100644 --- a/library/Exceptions/DirectoryException.php +++ b/library/Exceptions/DirectoryException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class DirectoryException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a directory', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a directory', - ), - ); + ], + ]; } diff --git a/library/Exceptions/DomainException.php b/library/Exceptions/DomainException.php index af0c96d2..2c7f6956 100644 --- a/library/Exceptions/DomainException.php +++ b/library/Exceptions/DomainException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class DomainException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid domain', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid domain', - ), - ); + ], + ]; } diff --git a/library/Exceptions/EachException.php b/library/Exceptions/EachException.php index 4d60a59c..243c5cbf 100644 --- a/library/Exceptions/EachException.php +++ b/library/Exceptions/EachException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class EachException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'Each item in {{name}} must be valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'Each item in {{name}} must not validate', - ), - ); + ], + ]; } diff --git a/library/Exceptions/EmailException.php b/library/Exceptions/EmailException.php index 731aaebb..9cb357ec 100644 --- a/library/Exceptions/EmailException.php +++ b/library/Exceptions/EmailException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class EmailException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be valid email', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an email', - ), - ); + ], + ]; } diff --git a/library/Exceptions/EndsWithException.php b/library/Exceptions/EndsWithException.php index 7b16d7f6..319d817b 100644 --- a/library/Exceptions/EndsWithException.php +++ b/library/Exceptions/EndsWithException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class EndsWithException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must end with ({{endValue}})', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not end with ({{endValue}})', - ), - ); + ], + ]; } diff --git a/library/Exceptions/EqualsException.php b/library/Exceptions/EqualsException.php index 61a53d52..82b08673 100644 --- a/library/Exceptions/EqualsException.php +++ b/library/Exceptions/EqualsException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class EqualsException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be equals {{compareTo}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be equals {{compareTo}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/EvenException.php b/library/Exceptions/EvenException.php index c760ff77..73e26bfa 100644 --- a/library/Exceptions/EvenException.php +++ b/library/Exceptions/EvenException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class EvenException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an even number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an even number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ExecutableException.php b/library/Exceptions/ExecutableException.php index 9e898bdb..bfe83714 100644 --- a/library/Exceptions/ExecutableException.php +++ b/library/Exceptions/ExecutableException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ExecutableException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an executable file', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an executable file', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ExistsException.php b/library/Exceptions/ExistsException.php index 26124d07..66ea3e5a 100644 --- a/library/Exceptions/ExistsException.php +++ b/library/Exceptions/ExistsException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ExistsException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must exists', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not exists', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ExtensionException.php b/library/Exceptions/ExtensionException.php index 9244c2d5..5129a016 100644 --- a/library/Exceptions/ExtensionException.php +++ b/library/Exceptions/ExtensionException.php @@ -21,12 +21,12 @@ class ExtensionException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must have {{extension}} extension', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not have {{extension}} extension', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FactorException.php b/library/Exceptions/FactorException.php index a67e9cd3..8ee27642 100644 --- a/library/Exceptions/FactorException.php +++ b/library/Exceptions/FactorException.php @@ -16,12 +16,12 @@ namespace Respect\Validation\Exceptions; */ class FactorException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a factor of {{dividend}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a factor of {{dividend}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FalseValException.php b/library/Exceptions/FalseValException.php index ab2e4c48..2813e3b4 100644 --- a/library/Exceptions/FalseValException.php +++ b/library/Exceptions/FalseValException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class FalseValException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is not considered as "False"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is considered as "False"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FileException.php b/library/Exceptions/FileException.php index 26a87d31..b76f3cef 100644 --- a/library/Exceptions/FileException.php +++ b/library/Exceptions/FileException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class FileException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a file', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a file', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FilterVarException.php b/library/Exceptions/FilterVarException.php index 0a7c2dd3..1bfc4c11 100644 --- a/library/Exceptions/FilterVarException.php +++ b/library/Exceptions/FilterVarException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class FilterVarException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be valid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FiniteException.php b/library/Exceptions/FiniteException.php index 4d02af97..8bf2ae08 100644 --- a/library/Exceptions/FiniteException.php +++ b/library/Exceptions/FiniteException.php @@ -19,12 +19,12 @@ class FiniteException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a finite number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a finite number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/FloatValException.php b/library/Exceptions/FloatValException.php index 5b1eadf0..9ea6cbb3 100644 --- a/library/Exceptions/FloatValException.php +++ b/library/Exceptions/FloatValException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class FloatValException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a float number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a float number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/GraphException.php b/library/Exceptions/GraphException.php index eb4d863e..e058ab59 100644 --- a/library/Exceptions/GraphException.php +++ b/library/Exceptions/GraphException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class GraphException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only graphical characters', self::EXTRA => '{{name}} must contain only graphical characters and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain graphical characters', self::EXTRA => '{{name}} must not contain graphical characters or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/HexRgbColorException.php b/library/Exceptions/HexRgbColorException.php index c9513487..9c5a96ab 100644 --- a/library/Exceptions/HexRgbColorException.php +++ b/library/Exceptions/HexRgbColorException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class HexRgbColorException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a hex RGB color', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a hex RGB color', - ), - ); + ], + ]; } diff --git a/library/Exceptions/IdenticalException.php b/library/Exceptions/IdenticalException.php index 2c779337..8e920722 100644 --- a/library/Exceptions/IdenticalException.php +++ b/library/Exceptions/IdenticalException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class IdenticalException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be identical as {{compareTo}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be identical as {{compareTo}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/InException.php b/library/Exceptions/InException.php index b07739d6..d1728b10 100644 --- a/library/Exceptions/InException.php +++ b/library/Exceptions/InException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class InException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be in {{haystack}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be in {{haystack}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/InfiniteException.php b/library/Exceptions/InfiniteException.php index fa3ecd58..8587a79f 100644 --- a/library/Exceptions/InfiniteException.php +++ b/library/Exceptions/InfiniteException.php @@ -19,12 +19,12 @@ class InfiniteException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an infinite number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an infinite number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/InstanceException.php b/library/Exceptions/InstanceException.php index a899f49f..86737e3f 100644 --- a/library/Exceptions/InstanceException.php +++ b/library/Exceptions/InstanceException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class InstanceException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an instance of {{instanceName}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an instance of {{instanceName}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/IntTypeException.php b/library/Exceptions/IntTypeException.php index 1217ce55..6c299d29 100644 --- a/library/Exceptions/IntTypeException.php +++ b/library/Exceptions/IntTypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class IntTypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be of the type integer', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be of the type integer', - ), - ); + ], + ]; } diff --git a/library/Exceptions/IntValException.php b/library/Exceptions/IntValException.php index 0def1d02..933dbf60 100644 --- a/library/Exceptions/IntValException.php +++ b/library/Exceptions/IntValException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class IntValException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an integer number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an integer number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/IpException.php b/library/Exceptions/IpException.php index c0c7f2db..8ab60310 100644 --- a/library/Exceptions/IpException.php +++ b/library/Exceptions/IpException.php @@ -16,18 +16,18 @@ class IpException extends ValidationException const STANDARD = 0; const NETWORK_RANGE = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an IP address', self::NETWORK_RANGE => '{{name}} must be an IP address in the {{range}} range', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an IP address', self::NETWORK_RANGE => '{{name}} must not be an IP address in the {{range}} range', - ), - ); + ], + ]; - public function configure($name, array $params = array()) + public function configure($name, array $params = []) { if ($params['networkRange']) { $range = $params['networkRange']; diff --git a/library/Exceptions/JsonException.php b/library/Exceptions/JsonException.php index af383235..bad8ae26 100644 --- a/library/Exceptions/JsonException.php +++ b/library/Exceptions/JsonException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class JsonException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid JSON string', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid JSON string', - ), - ); + ], + ]; } diff --git a/library/Exceptions/KeyException.php b/library/Exceptions/KeyException.php index 2b9bd9ae..afc2cd03 100644 --- a/library/Exceptions/KeyException.php +++ b/library/Exceptions/KeyException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class KeyException extends AttributeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NOT_PRESENT => 'Key {{name}} must be present', self::INVALID => 'Key {{name}} must be valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NOT_PRESENT => 'Key {{name}} must not be present', self::INVALID => 'Key {{name}} must not be valid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/KeyNestedException.php b/library/Exceptions/KeyNestedException.php index 4a26217d..7fe888d7 100644 --- a/library/Exceptions/KeyNestedException.php +++ b/library/Exceptions/KeyNestedException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class KeyNestedException extends AttributeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NOT_PRESENT => 'No items were found for key chain {{name}}', self::INVALID => 'Key chain {{name}} is not valid', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NOT_PRESENT => 'Items for key chain {{name}} must not be present', self::INVALID => 'Key chain {{name}} must not be valid', - ), - ); + ], + ]; } diff --git a/library/Exceptions/KeySetException.php b/library/Exceptions/KeySetException.php index ab86e559..3e25cf12 100644 --- a/library/Exceptions/KeySetException.php +++ b/library/Exceptions/KeySetException.php @@ -18,18 +18,18 @@ class KeySetException extends AbstractGroupedException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::NONE => 'All of the required rules must pass for {{name}}', self::SOME => 'These rules must pass for {{name}}', self::STRUCTURE => 'Must have keys {{keys}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::NONE => 'None of these rules must pass for {{name}}', self::SOME => 'These rules must not pass for {{name}}', self::STRUCTURE => 'Must not have keys {{keys}}', - ), - ); + ], + ]; /** * {@inheritdoc} diff --git a/library/Exceptions/KeyValueException.php b/library/Exceptions/KeyValueException.php index 36d4e6de..dde31e93 100644 --- a/library/Exceptions/KeyValueException.php +++ b/library/Exceptions/KeyValueException.php @@ -15,16 +15,16 @@ class KeyValueException extends ValidationException { const COMPONENT = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'Key {{name}} must be present', self::COMPONENT => '{{baseKey}} must be valid to validate {{comparedKey}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'Key {{name}} must not be present', self::COMPONENT => '{{baseKey}} must not be valid to validate {{comparedKey}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/LengthException.php b/library/Exceptions/LengthException.php index 021b7d4c..49efe87f 100644 --- a/library/Exceptions/LengthException.php +++ b/library/Exceptions/LengthException.php @@ -17,18 +17,18 @@ class LengthException extends ValidationException const LOWER = 1; const GREATER = 2; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::BOTH => '{{name}} must have a length between {{minValue}} and {{maxValue}}', self::LOWER => '{{name}} must have a length greater than {{minValue}}', self::GREATER => '{{name}} must have a length lower than {{maxValue}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::BOTH => '{{name}} must not have a length between {{minValue}} and {{maxValue}}', self::LOWER => '{{name}} must not have a length greater than {{minValue}}', self::GREATER => '{{name}} must not have a length lower than {{maxValue}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/Locale/GermanBankAccountException.php b/library/Exceptions/Locale/GermanBankAccountException.php index 5b753db2..6e2fe42c 100644 --- a/library/Exceptions/Locale/GermanBankAccountException.php +++ b/library/Exceptions/Locale/GermanBankAccountException.php @@ -15,12 +15,12 @@ use Respect\Validation\Exceptions\BankAccountException; class GermanBankAccountException extends BankAccountException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a german bank account', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a german bank account', - ), - ); + ], + ]; } diff --git a/library/Exceptions/Locale/GermanBankException.php b/library/Exceptions/Locale/GermanBankException.php index 6b576334..43930904 100644 --- a/library/Exceptions/Locale/GermanBankException.php +++ b/library/Exceptions/Locale/GermanBankException.php @@ -15,12 +15,12 @@ use Respect\Validation\Exceptions\BankException; class GermanBankException extends BankException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a german bank', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a german bank', - ), - ); + ], + ]; } diff --git a/library/Exceptions/Locale/GermanBicException.php b/library/Exceptions/Locale/GermanBicException.php index 46c404d1..321ffa1c 100644 --- a/library/Exceptions/Locale/GermanBicException.php +++ b/library/Exceptions/Locale/GermanBicException.php @@ -15,12 +15,12 @@ use Respect\Validation\Exceptions\BicException; class GermanBicException extends BicException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a german BIC', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a german BIC', - ), - ); + ], + ]; } diff --git a/library/Exceptions/LowercaseException.php b/library/Exceptions/LowercaseException.php index bde97015..2971869f 100644 --- a/library/Exceptions/LowercaseException.php +++ b/library/Exceptions/LowercaseException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class LowercaseException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be lowercase', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be lowercase', - ), - ); + ], + ]; } diff --git a/library/Exceptions/MacAddressException.php b/library/Exceptions/MacAddressException.php index e6a05b05..194b7dc7 100644 --- a/library/Exceptions/MacAddressException.php +++ b/library/Exceptions/MacAddressException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class MacAddressException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid mac address', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid mac address', - ), - ); + ], + ]; } diff --git a/library/Exceptions/MaxException.php b/library/Exceptions/MaxException.php index d5053df9..b3ee3e74 100644 --- a/library/Exceptions/MaxException.php +++ b/library/Exceptions/MaxException.php @@ -15,16 +15,16 @@ class MaxException extends ValidationException { const INCLUSIVE = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be lower than {{interval}}', self::INCLUSIVE => '{{name}} must be lower than or equals {{interval}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be lower than {{interval}}', self::INCLUSIVE => '{{name}} must not be lower than or equals {{interval}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/MimetypeException.php b/library/Exceptions/MimetypeException.php index 439c1399..4ca57cfd 100644 --- a/library/Exceptions/MimetypeException.php +++ b/library/Exceptions/MimetypeException.php @@ -21,12 +21,12 @@ class MimetypeException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must have {{mimetype}} mimetype', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not have {{mimetype}} mimetype', - ), - ); + ], + ]; } diff --git a/library/Exceptions/MinException.php b/library/Exceptions/MinException.php index 483c83b7..d6d95285 100644 --- a/library/Exceptions/MinException.php +++ b/library/Exceptions/MinException.php @@ -15,16 +15,16 @@ class MinException extends ValidationException { const INCLUSIVE = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be greater than {{interval}}', self::INCLUSIVE => '{{name}} must be greater than or equals {{interval}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be greater than {{interval}}', self::INCLUSIVE => '{{name}} must not be greater than or equals {{interval}}', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/MinimumAgeException.php b/library/Exceptions/MinimumAgeException.php index c384dee7..ac3f24ac 100644 --- a/library/Exceptions/MinimumAgeException.php +++ b/library/Exceptions/MinimumAgeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class MinimumAgeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'The age must be {{age}} years or more.', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'The age must not be {{age}} years or more.', - ), - ); + ], + ]; } diff --git a/library/Exceptions/MultipleException.php b/library/Exceptions/MultipleException.php index 26f83608..97668bca 100644 --- a/library/Exceptions/MultipleException.php +++ b/library/Exceptions/MultipleException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class MultipleException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be multiple of {{multipleOf}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be multiple of {{multipleOf}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NegativeException.php b/library/Exceptions/NegativeException.php index 6191e440..e2229663 100644 --- a/library/Exceptions/NegativeException.php +++ b/library/Exceptions/NegativeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NegativeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be negative', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be negative', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NfeAccessKeyException.php b/library/Exceptions/NfeAccessKeyException.php index 4d8fd5df..349bdf24 100644 --- a/library/Exceptions/NfeAccessKeyException.php +++ b/library/Exceptions/NfeAccessKeyException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NfeAccessKeyException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid NFe access key', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid NFe access key', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NoException.php b/library/Exceptions/NoException.php index 23e12e40..617ec3c2 100644 --- a/library/Exceptions/NoException.php +++ b/library/Exceptions/NoException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NoException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is not considered as "No"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is considered as "No"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NoWhitespaceException.php b/library/Exceptions/NoWhitespaceException.php index e42698c6..01b65c8e 100644 --- a/library/Exceptions/NoWhitespaceException.php +++ b/library/Exceptions/NoWhitespaceException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NoWhitespaceException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must not contain whitespace', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not not contain whitespace', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NoneOfException.php b/library/Exceptions/NoneOfException.php index aa475047..f86716f3 100644 --- a/library/Exceptions/NoneOfException.php +++ b/library/Exceptions/NoneOfException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NoneOfException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'None of these rules must pass for {{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'All of these rules must pass for {{name}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NotBlankException.php b/library/Exceptions/NotBlankException.php index 36630df2..66b57223 100644 --- a/library/Exceptions/NotBlankException.php +++ b/library/Exceptions/NotBlankException.php @@ -16,16 +16,16 @@ class NotBlankException extends ValidationException const STANDARD = 0; const NAMED = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'The value must not be blank', self::NAMED => '{{name}} must not be blank', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'The value must be blank', self::NAMED => '{{name}} must be blank', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/NotEmptyException.php b/library/Exceptions/NotEmptyException.php index c20366c3..7414280e 100644 --- a/library/Exceptions/NotEmptyException.php +++ b/library/Exceptions/NotEmptyException.php @@ -15,16 +15,16 @@ class NotEmptyException extends ValidationException { const STANDARD = 0; const NAMED = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'The value must not be empty', self::NAMED => '{{name}} must not be empty', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'The value must be empty', self::NAMED => '{{name}} must be empty', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/NotOptionalException.php b/library/Exceptions/NotOptionalException.php index a51b5cc0..e4b613bf 100644 --- a/library/Exceptions/NotOptionalException.php +++ b/library/Exceptions/NotOptionalException.php @@ -16,16 +16,16 @@ class NotOptionalException extends ValidationException const STANDARD = 0; const NAMED = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'The value must not be optional', self::NAMED => '{{name}} must not be optional', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'The value must be optional', self::NAMED => '{{name}} must be optional', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/NullTypeException.php b/library/Exceptions/NullTypeException.php index 12d28ac7..f5d69efb 100644 --- a/library/Exceptions/NullTypeException.php +++ b/library/Exceptions/NullTypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NullTypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be null', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be null', - ), - ); + ], + ]; } diff --git a/library/Exceptions/NumericException.php b/library/Exceptions/NumericException.php index 0e78c052..538620f5 100644 --- a/library/Exceptions/NumericException.php +++ b/library/Exceptions/NumericException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class NumericException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be numeric', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be numeric', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ObjectTypeException.php b/library/Exceptions/ObjectTypeException.php index 309200d5..f6dd6b94 100644 --- a/library/Exceptions/ObjectTypeException.php +++ b/library/Exceptions/ObjectTypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ObjectTypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an object', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an object', - ), - ); + ], + ]; } diff --git a/library/Exceptions/OddException.php b/library/Exceptions/OddException.php index bc6ec302..87a0c572 100644 --- a/library/Exceptions/OddException.php +++ b/library/Exceptions/OddException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class OddException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an odd number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an odd number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/OneOfException.php b/library/Exceptions/OneOfException.php index ab66af59..16b7fdb4 100644 --- a/library/Exceptions/OneOfException.php +++ b/library/Exceptions/OneOfException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class OneOfException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'At least one of these rules must pass for {{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'At least one of these rules must not pass for {{name}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/OptionalException.php b/library/Exceptions/OptionalException.php index 14c6526f..f52d5795 100644 --- a/library/Exceptions/OptionalException.php +++ b/library/Exceptions/OptionalException.php @@ -16,16 +16,16 @@ class OptionalException extends ValidationException const STANDARD = 0; const NAMED = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'The value must be optional', self::NAMED => '{{name}} must be optional', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'The value must not be optional', self::NAMED => '{{name}} must not be optional', - ), - ); + ], + ]; public function chooseTemplate() { diff --git a/library/Exceptions/PerfectSquareException.php b/library/Exceptions/PerfectSquareException.php index 35f3bc0b..27f3ae9f 100644 --- a/library/Exceptions/PerfectSquareException.php +++ b/library/Exceptions/PerfectSquareException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class PerfectSquareException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid perfect square', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid perfect square', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PhoneException.php b/library/Exceptions/PhoneException.php index 0dcf23cb..f680684a 100644 --- a/library/Exceptions/PhoneException.php +++ b/library/Exceptions/PhoneException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class PhoneException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid telephone number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid telephone number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PositiveException.php b/library/Exceptions/PositiveException.php index 5c584325..c370216c 100644 --- a/library/Exceptions/PositiveException.php +++ b/library/Exceptions/PositiveException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class PositiveException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be positive', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be positive', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PostalCodeException.php b/library/Exceptions/PostalCodeException.php index 86a0dba9..3eaf14ce 100644 --- a/library/Exceptions/PostalCodeException.php +++ b/library/Exceptions/PostalCodeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class PostalCodeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid postal code on {{countryCode}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid postal code on {{countryCode}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PrimeNumberException.php b/library/Exceptions/PrimeNumberException.php index 185abbaa..5c4fdf96 100644 --- a/library/Exceptions/PrimeNumberException.php +++ b/library/Exceptions/PrimeNumberException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class PrimeNumberException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid prime number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid prime number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PrntException.php b/library/Exceptions/PrntException.php index c0f1ed48..79531511 100644 --- a/library/Exceptions/PrntException.php +++ b/library/Exceptions/PrntException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class PrntException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only printable characters', self::EXTRA => '{{name}} must contain only printable characters and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain printable characters', self::EXTRA => '{{name}} must not contain printable characters or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/PunctException.php b/library/Exceptions/PunctException.php index abc35484..36948d60 100644 --- a/library/Exceptions/PunctException.php +++ b/library/Exceptions/PunctException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class PunctException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only punctuation characters', self::EXTRA => '{{name}} must contain only punctuation characters and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain punctuation characters', self::EXTRA => '{{name}} must not contain punctuation characters or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ReadableException.php b/library/Exceptions/ReadableException.php index e346205f..9965e2a6 100644 --- a/library/Exceptions/ReadableException.php +++ b/library/Exceptions/ReadableException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ReadableException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be readable', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be readable', - ), - ); + ], + ]; } diff --git a/library/Exceptions/RegexException.php b/library/Exceptions/RegexException.php index a2a19e97..76a629bb 100644 --- a/library/Exceptions/RegexException.php +++ b/library/Exceptions/RegexException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class RegexException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must validate against {{regex}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not validate against {{regex}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ResourceTypeException.php b/library/Exceptions/ResourceTypeException.php index f7fe5c6f..a1f05572 100644 --- a/library/Exceptions/ResourceTypeException.php +++ b/library/Exceptions/ResourceTypeException.php @@ -19,12 +19,12 @@ class ResourceTypeException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a resource', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a resource', - ), - ); + ], + ]; } diff --git a/library/Exceptions/RomanException.php b/library/Exceptions/RomanException.php index 97fd8199..937730d9 100644 --- a/library/Exceptions/RomanException.php +++ b/library/Exceptions/RomanException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class RomanException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid roman number', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid roman number', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ScalarValException.php b/library/Exceptions/ScalarValException.php index 265a4104..8744f32c 100644 --- a/library/Exceptions/ScalarValException.php +++ b/library/Exceptions/ScalarValException.php @@ -19,12 +19,12 @@ class ScalarValException extends ValidationException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a scalar value', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a scalar value', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SfException.php b/library/Exceptions/SfException.php index fef44fc4..76fa3856 100644 --- a/library/Exceptions/SfException.php +++ b/library/Exceptions/SfException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class SfException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SizeException.php b/library/Exceptions/SizeException.php index a57c7c2c..5074bbde 100644 --- a/library/Exceptions/SizeException.php +++ b/library/Exceptions/SizeException.php @@ -21,16 +21,16 @@ class SizeException extends BetweenException /** * @var array */ - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::BOTH => '{{name}} must be between {{minSize}} and {{maxSize}}', self::LOWER => '{{name}} must be greater than {{minSize}}', self::GREATER => '{{name}} must be lower than {{maxSize}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::BOTH => '{{name}} must not be between {{minSize}} and {{maxSize}}', self::LOWER => '{{name}} must not be greater than {{minSize}}', self::GREATER => '{{name}} must not be lower than {{maxSize}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SlugException.php b/library/Exceptions/SlugException.php index 73da8a30..c2604359 100644 --- a/library/Exceptions/SlugException.php +++ b/library/Exceptions/SlugException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class SlugException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid slug', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid slug', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SpaceException.php b/library/Exceptions/SpaceException.php index 6b4d619a..f2474228 100644 --- a/library/Exceptions/SpaceException.php +++ b/library/Exceptions/SpaceException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class SpaceException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only space characters', self::EXTRA => '{{name}} must contain only space characters and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain space characters', self::EXTRA => '{{name}} must not contain space characters or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/StartsWithException.php b/library/Exceptions/StartsWithException.php index f40335df..b0fb95e8 100644 --- a/library/Exceptions/StartsWithException.php +++ b/library/Exceptions/StartsWithException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class StartsWithException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must start with ({{startValue}})', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not start with ({{startValue}})', - ), - ); + ], + ]; } diff --git a/library/Exceptions/StringTypeException.php b/library/Exceptions/StringTypeException.php index ce0646d4..8b2840bc 100644 --- a/library/Exceptions/StringTypeException.php +++ b/library/Exceptions/StringTypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class StringTypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a string', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be string', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AdSubdivisionCodeException.php index 858b1dc9..e1186b73 100644 --- a/library/Exceptions/SubdivisionCode/AdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Andorra', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Andorra', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AeSubdivisionCodeException.php index 1fb8285d..2cfd928f 100644 --- a/library/Exceptions/SubdivisionCode/AeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of United Arab Emirates', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of United Arab Emirates', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AfSubdivisionCodeException.php index 288fbbd6..c01b375e 100644 --- a/library/Exceptions/SubdivisionCode/AfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Afghanistan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Afghanistan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AgSubdivisionCodeException.php index fc5a09a8..2d84419c 100644 --- a/library/Exceptions/SubdivisionCode/AgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Antigua and Barbuda', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Antigua and Barbuda', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AiSubdivisionCodeException.php index ed6ab1b5..1855f171 100644 --- a/library/Exceptions/SubdivisionCode/AiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Anguilla', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Anguilla', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AlSubdivisionCodeException.php index 52013da3..0361e51e 100644 --- a/library/Exceptions/SubdivisionCode/AlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Albania', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Albania', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AmSubdivisionCodeException.php index f282459b..9c9afc0b 100644 --- a/library/Exceptions/SubdivisionCode/AmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Armenia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Armenia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AnSubdivisionCodeException.php index f25daff7..f3bc25aa 100644 --- a/library/Exceptions/SubdivisionCode/AnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Netherlands Antilles', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Netherlands Antilles', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AoSubdivisionCodeException.php index 7dd969e3..6e54ae1e 100644 --- a/library/Exceptions/SubdivisionCode/AoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Angola', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Angola', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AqSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AqSubdivisionCodeException.php index ab462371..8fc38343 100644 --- a/library/Exceptions/SubdivisionCode/AqSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AqSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AqSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Antarctica', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Antarctica', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ArSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ArSubdivisionCodeException.php index 9ff76c61..52a7a1fd 100644 --- a/library/Exceptions/SubdivisionCode/ArSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ArSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ArSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Argentina', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Argentina', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AsSubdivisionCodeException.php index 81b5b91a..9eb3c1af 100644 --- a/library/Exceptions/SubdivisionCode/AsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of American Samoa', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of American Samoa', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AtSubdivisionCodeException.php index 89bd5a74..c6b5c726 100644 --- a/library/Exceptions/SubdivisionCode/AtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Austria', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Austria', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AuSubdivisionCodeException.php index 9d71940a..b982179b 100644 --- a/library/Exceptions/SubdivisionCode/AuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Australia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Australia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AwSubdivisionCodeException.php index 5ff86051..2cc31b81 100644 --- a/library/Exceptions/SubdivisionCode/AwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Aruba', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Aruba', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AxSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AxSubdivisionCodeException.php index ec986c04..2ac81d2b 100644 --- a/library/Exceptions/SubdivisionCode/AxSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AxSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AxSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Åland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Åland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/AzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/AzSubdivisionCodeException.php index 7a13d661..22e29d2f 100644 --- a/library/Exceptions/SubdivisionCode/AzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/AzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class AzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Azerbaijan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Azerbaijan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BaSubdivisionCodeException.php index a26d5ca0..fdd7fe87 100644 --- a/library/Exceptions/SubdivisionCode/BaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bosnia and Herzegovina', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bosnia and Herzegovina', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BbSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BbSubdivisionCodeException.php index a1e831b9..8eb8ba36 100644 --- a/library/Exceptions/SubdivisionCode/BbSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BbSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BbSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Barbados', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Barbados', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BdSubdivisionCodeException.php index 7f83a2be..8df36c2f 100644 --- a/library/Exceptions/SubdivisionCode/BdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bangladesh', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bangladesh', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BeSubdivisionCodeException.php index 1438979c..83073aff 100644 --- a/library/Exceptions/SubdivisionCode/BeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Belgium', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Belgium', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BfSubdivisionCodeException.php index bd5e3e5a..09cf11ca 100644 --- a/library/Exceptions/SubdivisionCode/BfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Burkina Faso', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Burkina Faso', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BgSubdivisionCodeException.php index d2913d9f..48123759 100644 --- a/library/Exceptions/SubdivisionCode/BgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bulgaria', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bulgaria', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BhSubdivisionCodeException.php index f82c6fb7..67a7fd39 100644 --- a/library/Exceptions/SubdivisionCode/BhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bahrain', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bahrain', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BiSubdivisionCodeException.php index 902c398f..946a26dc 100644 --- a/library/Exceptions/SubdivisionCode/BiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Burundi', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Burundi', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BjSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BjSubdivisionCodeException.php index 3299e902..a4893a7e 100644 --- a/library/Exceptions/SubdivisionCode/BjSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BjSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BjSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Benin', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Benin', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BlSubdivisionCodeException.php index 10549dcf..8c246f5a 100644 --- a/library/Exceptions/SubdivisionCode/BlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Barthélemy', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Barthélemy', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BmSubdivisionCodeException.php index e8b1056a..9d114bd3 100644 --- a/library/Exceptions/SubdivisionCode/BmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bermuda', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bermuda', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BnSubdivisionCodeException.php index 3bb05532..ff5b171b 100644 --- a/library/Exceptions/SubdivisionCode/BnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Brunei', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Brunei', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BoSubdivisionCodeException.php index 239ba5b1..1e9afcfa 100644 --- a/library/Exceptions/SubdivisionCode/BoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bolivia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bolivia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BqSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BqSubdivisionCodeException.php index 2714773a..27d5b80f 100644 --- a/library/Exceptions/SubdivisionCode/BqSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BqSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BqSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bonaire', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bonaire', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BrSubdivisionCodeException.php index e62148e2..dc78b3e1 100644 --- a/library/Exceptions/SubdivisionCode/BrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Brazil', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Brazil', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BsSubdivisionCodeException.php index 4a38c6a4..1d508a09 100644 --- a/library/Exceptions/SubdivisionCode/BsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bahamas', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bahamas', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BtSubdivisionCodeException.php index eb1c4459..06826b16 100644 --- a/library/Exceptions/SubdivisionCode/BtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bhutan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bhutan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BvSubdivisionCodeException.php index 34d778ad..9cdb9546 100644 --- a/library/Exceptions/SubdivisionCode/BvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Bouvet Island', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Bouvet Island', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BwSubdivisionCodeException.php index 8510b10c..4aaaa22a 100644 --- a/library/Exceptions/SubdivisionCode/BwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Botswana', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Botswana', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BySubdivisionCodeException.php index e7329aa0..1537996b 100644 --- a/library/Exceptions/SubdivisionCode/BySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Belarus', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Belarus', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/BzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/BzSubdivisionCodeException.php index 7fff176e..360e1d94 100644 --- a/library/Exceptions/SubdivisionCode/BzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/BzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class BzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Belize', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Belize', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CaSubdivisionCodeException.php index a2659926..d9673a5a 100644 --- a/library/Exceptions/SubdivisionCode/CaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Canada', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Canada', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CcSubdivisionCodeException.php index 8ccb98f8..000db2d7 100644 --- a/library/Exceptions/SubdivisionCode/CcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cocos [Keeling] Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cocos [Keeling] Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CdSubdivisionCodeException.php index 774a7a18..67a0613b 100644 --- a/library/Exceptions/SubdivisionCode/CdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Democratic Republic of the Congo', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Democratic Republic of the Congo', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CfSubdivisionCodeException.php index 0290d03f..67172ef3 100644 --- a/library/Exceptions/SubdivisionCode/CfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Central African Republic', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Central African Republic', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CgSubdivisionCodeException.php index 6f1e3a6c..6984d462 100644 --- a/library/Exceptions/SubdivisionCode/CgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Republic of the Congo', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Republic of the Congo', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ChSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ChSubdivisionCodeException.php index cef77fdb..f6aedf69 100644 --- a/library/Exceptions/SubdivisionCode/ChSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ChSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ChSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Switzerland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Switzerland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CiSubdivisionCodeException.php index 493e8a7b..4299f83e 100644 --- a/library/Exceptions/SubdivisionCode/CiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ivory Coast', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ivory Coast', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CkSubdivisionCodeException.php index 31114614..7325d83d 100644 --- a/library/Exceptions/SubdivisionCode/CkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cook Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cook Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ClSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ClSubdivisionCodeException.php index afcf2fd8..ccbd691d 100644 --- a/library/Exceptions/SubdivisionCode/ClSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ClSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ClSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Chile', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Chile', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CmSubdivisionCodeException.php index 323c730e..e0f5d5a4 100644 --- a/library/Exceptions/SubdivisionCode/CmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cameroon', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cameroon', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CnSubdivisionCodeException.php index 3c53916a..c1c92748 100644 --- a/library/Exceptions/SubdivisionCode/CnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of China', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of China', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CoSubdivisionCodeException.php index 11d9fabc..7f99b3a7 100644 --- a/library/Exceptions/SubdivisionCode/CoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Colombia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Colombia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CrSubdivisionCodeException.php index a429f4a7..e5abddec 100644 --- a/library/Exceptions/SubdivisionCode/CrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Costa Rica', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Costa Rica', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CsSubdivisionCodeException.php index bc31839f..10fe81ce 100644 --- a/library/Exceptions/SubdivisionCode/CsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Serbia And Montenegro', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Serbia And Montenegro', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CuSubdivisionCodeException.php index 0a9233a4..618c905e 100644 --- a/library/Exceptions/SubdivisionCode/CuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cuba', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cuba', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CvSubdivisionCodeException.php index a6a48209..99141bd8 100644 --- a/library/Exceptions/SubdivisionCode/CvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cape Verde', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cape Verde', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CwSubdivisionCodeException.php index cfb9680a..8c28435a 100644 --- a/library/Exceptions/SubdivisionCode/CwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Curacao', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Curacao', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CxSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CxSubdivisionCodeException.php index e028cd7e..a2a95b31 100644 --- a/library/Exceptions/SubdivisionCode/CxSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CxSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CxSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Christmas Island', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Christmas Island', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CySubdivisionCodeException.php index 275f9ce6..a1b1da96 100644 --- a/library/Exceptions/SubdivisionCode/CySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cyprus', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cyprus', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/CzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/CzSubdivisionCodeException.php index 257a15fd..2029e0d7 100644 --- a/library/Exceptions/SubdivisionCode/CzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/CzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class CzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Czech Republic', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Czech Republic', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DeSubdivisionCodeException.php index a8874478..4f07751c 100644 --- a/library/Exceptions/SubdivisionCode/DeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Germany', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Germany', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DjSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DjSubdivisionCodeException.php index b35cf6e8..a41df22c 100644 --- a/library/Exceptions/SubdivisionCode/DjSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DjSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DjSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Djibouti', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Djibouti', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DkSubdivisionCodeException.php index 0e36a1dd..cef6f3ca 100644 --- a/library/Exceptions/SubdivisionCode/DkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Denmark', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Denmark', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DmSubdivisionCodeException.php index 501b2a5b..eef71571 100644 --- a/library/Exceptions/SubdivisionCode/DmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Dominica', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Dominica', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DoSubdivisionCodeException.php index 4a2d8a72..93562299 100644 --- a/library/Exceptions/SubdivisionCode/DoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Dominican Republic', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Dominican Republic', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/DzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/DzSubdivisionCodeException.php index 546753b6..1d4d0075 100644 --- a/library/Exceptions/SubdivisionCode/DzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/DzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class DzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Algeria', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Algeria', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EcSubdivisionCodeException.php index 37663be5..4815a16e 100644 --- a/library/Exceptions/SubdivisionCode/EcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ecuador', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ecuador', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EeSubdivisionCodeException.php index 48046df2..8309a594 100644 --- a/library/Exceptions/SubdivisionCode/EeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Estonia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Estonia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EgSubdivisionCodeException.php index 7d677d65..3c55a7ca 100644 --- a/library/Exceptions/SubdivisionCode/EgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Egypt', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Egypt', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EhSubdivisionCodeException.php index 62360ff0..533c4440 100644 --- a/library/Exceptions/SubdivisionCode/EhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Western Sahara', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Western Sahara', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ErSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ErSubdivisionCodeException.php index db7b1ebc..b162128b 100644 --- a/library/Exceptions/SubdivisionCode/ErSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ErSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ErSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Eritrea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Eritrea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EsSubdivisionCodeException.php index e5eb86af..7a476e39 100644 --- a/library/Exceptions/SubdivisionCode/EsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Spain', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Spain', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/EtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/EtSubdivisionCodeException.php index f7b3aaae..83be03cb 100644 --- a/library/Exceptions/SubdivisionCode/EtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/EtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class EtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ethiopia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ethiopia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FiSubdivisionCodeException.php index 9b80ecd8..c6908084 100644 --- a/library/Exceptions/SubdivisionCode/FiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Finland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Finland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FjSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FjSubdivisionCodeException.php index 2fe77b5c..3f0419e7 100644 --- a/library/Exceptions/SubdivisionCode/FjSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FjSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FjSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Fiji', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Fiji', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FkSubdivisionCodeException.php index 0c72ef88..77e40f09 100644 --- a/library/Exceptions/SubdivisionCode/FkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Falkland Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Falkland Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FmSubdivisionCodeException.php index 0a14aea6..ffa1083c 100644 --- a/library/Exceptions/SubdivisionCode/FmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Micronesia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Micronesia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FoSubdivisionCodeException.php index 3fb5e314..911d30d2 100644 --- a/library/Exceptions/SubdivisionCode/FoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Faroe Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Faroe Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/FrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/FrSubdivisionCodeException.php index 55c5ad0d..c489dfa1 100644 --- a/library/Exceptions/SubdivisionCode/FrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/FrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class FrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of France', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of France', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GaSubdivisionCodeException.php index 03776bab..610731db 100644 --- a/library/Exceptions/SubdivisionCode/GaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Gabon', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Gabon', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GbSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GbSubdivisionCodeException.php index 192c8a81..1c5afea1 100644 --- a/library/Exceptions/SubdivisionCode/GbSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GbSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GbSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of United Kingdom', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of United Kingdom', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GdSubdivisionCodeException.php index 589a6354..5a20caaa 100644 --- a/library/Exceptions/SubdivisionCode/GdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Grenada', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Grenada', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GeSubdivisionCodeException.php index 1d601e0a..93735e5d 100644 --- a/library/Exceptions/SubdivisionCode/GeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Georgia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Georgia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GfSubdivisionCodeException.php index 9b13321c..18fe33bd 100644 --- a/library/Exceptions/SubdivisionCode/GfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of French Guiana', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of French Guiana', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GgSubdivisionCodeException.php index 55656e96..7d679a50 100644 --- a/library/Exceptions/SubdivisionCode/GgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guernsey', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guernsey', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GhSubdivisionCodeException.php index 3e50bfc8..35b0eb5c 100644 --- a/library/Exceptions/SubdivisionCode/GhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ghana', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ghana', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GiSubdivisionCodeException.php index 3e27e05f..8118b89c 100644 --- a/library/Exceptions/SubdivisionCode/GiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Gibraltar', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Gibraltar', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GlSubdivisionCodeException.php index ac575d27..a2782f08 100644 --- a/library/Exceptions/SubdivisionCode/GlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Greenland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Greenland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GmSubdivisionCodeException.php index d707a513..c7027934 100644 --- a/library/Exceptions/SubdivisionCode/GmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Gambia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Gambia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GnSubdivisionCodeException.php index 31502316..ba3a75fd 100644 --- a/library/Exceptions/SubdivisionCode/GnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guinea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guinea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GpSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GpSubdivisionCodeException.php index 61fb318b..f1a23c15 100644 --- a/library/Exceptions/SubdivisionCode/GpSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GpSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GpSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guadeloupe', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guadeloupe', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GqSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GqSubdivisionCodeException.php index 562a50ed..c499922f 100644 --- a/library/Exceptions/SubdivisionCode/GqSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GqSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GqSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Equatorial Guinea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Equatorial Guinea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GrSubdivisionCodeException.php index b7f2b472..8bac708c 100644 --- a/library/Exceptions/SubdivisionCode/GrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Greece', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Greece', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GsSubdivisionCodeException.php index 26bdba00..3841cec8 100644 --- a/library/Exceptions/SubdivisionCode/GsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of South Georgia and the South Sandwich Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of South Georgia and the South Sandwich Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GtSubdivisionCodeException.php index 362364a5..932e1885 100644 --- a/library/Exceptions/SubdivisionCode/GtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guatemala', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guatemala', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GuSubdivisionCodeException.php index 8b5aa25f..a10200cb 100644 --- a/library/Exceptions/SubdivisionCode/GuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guam', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guam', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GwSubdivisionCodeException.php index 90396690..1263c99a 100644 --- a/library/Exceptions/SubdivisionCode/GwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guinea-Bissau', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guinea-Bissau', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/GySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/GySubdivisionCodeException.php index bd34f90e..0a9109c9 100644 --- a/library/Exceptions/SubdivisionCode/GySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/GySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class GySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Guyana', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Guyana', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HkSubdivisionCodeException.php index a5b1a8b2..b75e3a8c 100644 --- a/library/Exceptions/SubdivisionCode/HkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Hong Kong', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Hong Kong', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HmSubdivisionCodeException.php index e9ac89c8..b587407a 100644 --- a/library/Exceptions/SubdivisionCode/HmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Heard Island and McDonald Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Heard Island and McDonald Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HnSubdivisionCodeException.php index ee19f424..24a0a088 100644 --- a/library/Exceptions/SubdivisionCode/HnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Honduras', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Honduras', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HrSubdivisionCodeException.php index e852a6c3..df2070c8 100644 --- a/library/Exceptions/SubdivisionCode/HrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Croatia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Croatia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HtSubdivisionCodeException.php index 06f67195..e627b2b0 100644 --- a/library/Exceptions/SubdivisionCode/HtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Haiti', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Haiti', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/HuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/HuSubdivisionCodeException.php index ad4452a9..8dc112b9 100644 --- a/library/Exceptions/SubdivisionCode/HuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/HuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class HuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Hungary', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Hungary', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IdSubdivisionCodeException.php index 04df18ea..dc354588 100644 --- a/library/Exceptions/SubdivisionCode/IdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Indonesia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Indonesia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IeSubdivisionCodeException.php index 44a051d0..2ca8407f 100644 --- a/library/Exceptions/SubdivisionCode/IeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ireland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ireland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IlSubdivisionCodeException.php index c332c80b..bf40b447 100644 --- a/library/Exceptions/SubdivisionCode/IlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Israel', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Israel', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ImSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ImSubdivisionCodeException.php index 1529092d..f992adc0 100644 --- a/library/Exceptions/SubdivisionCode/ImSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ImSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ImSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Isle of Man', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Isle of Man', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/InSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/InSubdivisionCodeException.php index a1d29579..635950d1 100644 --- a/library/Exceptions/SubdivisionCode/InSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/InSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class InSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of India', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of India', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IoSubdivisionCodeException.php index 4f3c77dd..6c5f34e3 100644 --- a/library/Exceptions/SubdivisionCode/IoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of British Indian Ocean Territory', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of British Indian Ocean Territory', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IqSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IqSubdivisionCodeException.php index d8205bfa..f683729e 100644 --- a/library/Exceptions/SubdivisionCode/IqSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IqSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IqSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Iraq', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Iraq', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IrSubdivisionCodeException.php index e67bd0ba..a25a6c13 100644 --- a/library/Exceptions/SubdivisionCode/IrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Iran', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Iran', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/IsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/IsSubdivisionCodeException.php index c2350927..16649899 100644 --- a/library/Exceptions/SubdivisionCode/IsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/IsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class IsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Iceland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Iceland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ItSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ItSubdivisionCodeException.php index 17230180..09d010bf 100644 --- a/library/Exceptions/SubdivisionCode/ItSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ItSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ItSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Italy', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Italy', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/JeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/JeSubdivisionCodeException.php index 8e4aab0c..92a549f9 100644 --- a/library/Exceptions/SubdivisionCode/JeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/JeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class JeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Jersey', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Jersey', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/JmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/JmSubdivisionCodeException.php index 2a7fa58f..fe2812ee 100644 --- a/library/Exceptions/SubdivisionCode/JmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/JmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class JmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Jamaica', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Jamaica', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/JoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/JoSubdivisionCodeException.php index 8f558fe8..eeb995c9 100644 --- a/library/Exceptions/SubdivisionCode/JoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/JoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class JoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Jordan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Jordan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/JpSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/JpSubdivisionCodeException.php index 90436e07..6d6b3bec 100644 --- a/library/Exceptions/SubdivisionCode/JpSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/JpSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class JpSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Japan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Japan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KeSubdivisionCodeException.php index 93cd7626..367c3df3 100644 --- a/library/Exceptions/SubdivisionCode/KeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kenya', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kenya', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KgSubdivisionCodeException.php index 8864726e..af06b336 100644 --- a/library/Exceptions/SubdivisionCode/KgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kyrgyzstan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kyrgyzstan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KhSubdivisionCodeException.php index 8d7ee743..566fa01f 100644 --- a/library/Exceptions/SubdivisionCode/KhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cambodia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cambodia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KiSubdivisionCodeException.php index 919b3791..c2c73fac 100644 --- a/library/Exceptions/SubdivisionCode/KiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kiribati', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kiribati', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KmSubdivisionCodeException.php index cc1084f2..4adfe228 100644 --- a/library/Exceptions/SubdivisionCode/KmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Comoros', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Comoros', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KnSubdivisionCodeException.php index 2427301a..8e14fbe4 100644 --- a/library/Exceptions/SubdivisionCode/KnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Kitts and Nevis', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Kitts and Nevis', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KpSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KpSubdivisionCodeException.php index 61b8dfdf..19016e8b 100644 --- a/library/Exceptions/SubdivisionCode/KpSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KpSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KpSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of North Korea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of North Korea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KrSubdivisionCodeException.php index 7311a28b..2bf28c56 100644 --- a/library/Exceptions/SubdivisionCode/KrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of South Korea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of South Korea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KwSubdivisionCodeException.php index dc585e6f..3fcad03f 100644 --- a/library/Exceptions/SubdivisionCode/KwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kuwait', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kuwait', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KySubdivisionCodeException.php index 5bbef1df..5c232151 100644 --- a/library/Exceptions/SubdivisionCode/KySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Cayman Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Cayman Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/KzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/KzSubdivisionCodeException.php index ceffd32f..a2c28634 100644 --- a/library/Exceptions/SubdivisionCode/KzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/KzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class KzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kazakhstan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kazakhstan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LaSubdivisionCodeException.php index ea0d261b..4ed937e0 100644 --- a/library/Exceptions/SubdivisionCode/LaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Laos', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Laos', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LbSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LbSubdivisionCodeException.php index 727dea1a..803fc26b 100644 --- a/library/Exceptions/SubdivisionCode/LbSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LbSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LbSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Lebanon', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Lebanon', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LcSubdivisionCodeException.php index cd9b4f46..c9087630 100644 --- a/library/Exceptions/SubdivisionCode/LcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Lucia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Lucia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LiSubdivisionCodeException.php index 4d3caac7..be3da21a 100644 --- a/library/Exceptions/SubdivisionCode/LiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Liechtenstein', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Liechtenstein', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LkSubdivisionCodeException.php index a34d46de..587a98e1 100644 --- a/library/Exceptions/SubdivisionCode/LkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Sri Lanka', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Sri Lanka', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LrSubdivisionCodeException.php index 1d63a086..0e571cac 100644 --- a/library/Exceptions/SubdivisionCode/LrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Liberia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Liberia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LsSubdivisionCodeException.php index 6a5117ab..b7b2c4f4 100644 --- a/library/Exceptions/SubdivisionCode/LsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Lesotho', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Lesotho', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LtSubdivisionCodeException.php index 96c96d78..aa62d6f7 100644 --- a/library/Exceptions/SubdivisionCode/LtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Lithuania', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Lithuania', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LuSubdivisionCodeException.php index 31afb78c..5aafbe35 100644 --- a/library/Exceptions/SubdivisionCode/LuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Luxembourg', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Luxembourg', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LvSubdivisionCodeException.php index e94a9a51..c3658054 100644 --- a/library/Exceptions/SubdivisionCode/LvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Latvia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Latvia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/LySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/LySubdivisionCodeException.php index 0e20c569..93661c33 100644 --- a/library/Exceptions/SubdivisionCode/LySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/LySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class LySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Libya', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Libya', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MaSubdivisionCodeException.php index 61f8b571..1b27fe26 100644 --- a/library/Exceptions/SubdivisionCode/MaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Morocco', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Morocco', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/McSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/McSubdivisionCodeException.php index fdafac34..26535da2 100644 --- a/library/Exceptions/SubdivisionCode/McSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/McSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class McSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Monaco', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Monaco', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MdSubdivisionCodeException.php index 037467b2..47efbe3f 100644 --- a/library/Exceptions/SubdivisionCode/MdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Moldova', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Moldova', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MeSubdivisionCodeException.php index d0e058fe..69e382fb 100644 --- a/library/Exceptions/SubdivisionCode/MeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Montenegro', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Montenegro', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MfSubdivisionCodeException.php index 7f95585c..81bec5fb 100644 --- a/library/Exceptions/SubdivisionCode/MfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Martin', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Martin', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MgSubdivisionCodeException.php index fa794c0f..92038f46 100644 --- a/library/Exceptions/SubdivisionCode/MgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Madagascar', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Madagascar', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MhSubdivisionCodeException.php index 70792b39..c3a6048b 100644 --- a/library/Exceptions/SubdivisionCode/MhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Marshall Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Marshall Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MkSubdivisionCodeException.php index b968fabd..6aecab8a 100644 --- a/library/Exceptions/SubdivisionCode/MkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Macedonia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Macedonia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MlSubdivisionCodeException.php index 59f7854a..7df2606b 100644 --- a/library/Exceptions/SubdivisionCode/MlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mali', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mali', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MmSubdivisionCodeException.php index 90d54480..4fbb9b8f 100644 --- a/library/Exceptions/SubdivisionCode/MmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Myanmar [Burma]', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Myanmar [Burma]', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MnSubdivisionCodeException.php index e3401aa3..19a59d93 100644 --- a/library/Exceptions/SubdivisionCode/MnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mongolia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mongolia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MoSubdivisionCodeException.php index 182ae3e3..d4fddd52 100644 --- a/library/Exceptions/SubdivisionCode/MoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Macao', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Macao', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MpSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MpSubdivisionCodeException.php index 4006ce28..1b6c11e4 100644 --- a/library/Exceptions/SubdivisionCode/MpSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MpSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MpSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Northern Mariana Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Northern Mariana Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MqSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MqSubdivisionCodeException.php index 37cd967d..94c5d9a9 100644 --- a/library/Exceptions/SubdivisionCode/MqSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MqSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MqSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Martinique', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Martinique', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MrSubdivisionCodeException.php index 085f3070..fc683dd9 100644 --- a/library/Exceptions/SubdivisionCode/MrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mauritania', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mauritania', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MsSubdivisionCodeException.php index c8a44314..298d52a3 100644 --- a/library/Exceptions/SubdivisionCode/MsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Montserrat', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Montserrat', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MtSubdivisionCodeException.php index 7baf5b8b..1c9cbfef 100644 --- a/library/Exceptions/SubdivisionCode/MtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Malta', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Malta', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MuSubdivisionCodeException.php index eb9a45b8..ad424d47 100644 --- a/library/Exceptions/SubdivisionCode/MuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mauritius', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mauritius', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MvSubdivisionCodeException.php index af041386..647dc7a6 100644 --- a/library/Exceptions/SubdivisionCode/MvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Maldives', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Maldives', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MwSubdivisionCodeException.php index 70c8f0cf..c845f1a5 100644 --- a/library/Exceptions/SubdivisionCode/MwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Malawi', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Malawi', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MxSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MxSubdivisionCodeException.php index 0484aa81..ada122d5 100644 --- a/library/Exceptions/SubdivisionCode/MxSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MxSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MxSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mexico', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mexico', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MySubdivisionCodeException.php index 7fe991be..82200b58 100644 --- a/library/Exceptions/SubdivisionCode/MySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Malaysia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Malaysia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/MzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/MzSubdivisionCodeException.php index 009a6f1c..0ddfa1ac 100644 --- a/library/Exceptions/SubdivisionCode/MzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/MzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class MzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mozambique', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mozambique', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NaSubdivisionCodeException.php index 48caed32..917bd808 100644 --- a/library/Exceptions/SubdivisionCode/NaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Namibia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Namibia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NcSubdivisionCodeException.php index a1a901b5..c1420768 100644 --- a/library/Exceptions/SubdivisionCode/NcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of New Caledonia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of New Caledonia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NeSubdivisionCodeException.php index b6de4d74..d2aa93f6 100644 --- a/library/Exceptions/SubdivisionCode/NeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Niger', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Niger', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NfSubdivisionCodeException.php index 35fc32a3..c54a5347 100644 --- a/library/Exceptions/SubdivisionCode/NfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Norfolk Island', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Norfolk Island', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NgSubdivisionCodeException.php index 804fb497..2fb4bac3 100644 --- a/library/Exceptions/SubdivisionCode/NgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Nigeria', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Nigeria', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NiSubdivisionCodeException.php index 54fb77dd..1a890021 100644 --- a/library/Exceptions/SubdivisionCode/NiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Nicaragua', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Nicaragua', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NlSubdivisionCodeException.php index 53bb4814..658080a8 100644 --- a/library/Exceptions/SubdivisionCode/NlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Netherlands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Netherlands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NoSubdivisionCodeException.php index 6e6c3815..348d5ff7 100644 --- a/library/Exceptions/SubdivisionCode/NoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Norway', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Norway', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NpSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NpSubdivisionCodeException.php index f97dd92d..87df7a45 100644 --- a/library/Exceptions/SubdivisionCode/NpSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NpSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NpSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Nepal', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Nepal', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NrSubdivisionCodeException.php index c7faaf8e..e7beea16 100644 --- a/library/Exceptions/SubdivisionCode/NrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Nauru', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Nauru', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NuSubdivisionCodeException.php index 30c76489..f3dfe1ca 100644 --- a/library/Exceptions/SubdivisionCode/NuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Niue', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Niue', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/NzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/NzSubdivisionCodeException.php index a5deadfa..d2efc66f 100644 --- a/library/Exceptions/SubdivisionCode/NzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/NzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class NzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of New Zealand', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of New Zealand', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/OmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/OmSubdivisionCodeException.php index ac943f8c..95582588 100644 --- a/library/Exceptions/SubdivisionCode/OmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/OmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class OmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Oman', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Oman', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PaSubdivisionCodeException.php index 21845f9b..fc7e9568 100644 --- a/library/Exceptions/SubdivisionCode/PaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Panama', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Panama', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PeSubdivisionCodeException.php index 5773d01b..bf878bfb 100644 --- a/library/Exceptions/SubdivisionCode/PeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Peru', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Peru', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PfSubdivisionCodeException.php index 2b9c4a4c..b2cf036c 100644 --- a/library/Exceptions/SubdivisionCode/PfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of French Polynesia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of French Polynesia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PgSubdivisionCodeException.php index 80fc7885..76881a35 100644 --- a/library/Exceptions/SubdivisionCode/PgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Papua New Guinea', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Papua New Guinea', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PhSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PhSubdivisionCodeException.php index d3d1c0c1..2b9c6e8f 100644 --- a/library/Exceptions/SubdivisionCode/PhSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PhSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PhSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Philippines', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Philippines', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PkSubdivisionCodeException.php index 181a531d..2c90a49b 100644 --- a/library/Exceptions/SubdivisionCode/PkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Pakistan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Pakistan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PlSubdivisionCodeException.php index a63e8d3e..32e20334 100644 --- a/library/Exceptions/SubdivisionCode/PlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Poland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Poland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PmSubdivisionCodeException.php index 7dc3f78f..f0d2f1a0 100644 --- a/library/Exceptions/SubdivisionCode/PmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Pierre and Miquelon', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Pierre and Miquelon', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PnSubdivisionCodeException.php index 00b7ad2a..6f015f72 100644 --- a/library/Exceptions/SubdivisionCode/PnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Pitcairn Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Pitcairn Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PrSubdivisionCodeException.php index 5184d2b0..453cb5b6 100644 --- a/library/Exceptions/SubdivisionCode/PrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Puerto Rico', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Puerto Rico', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PsSubdivisionCodeException.php index 49347b32..49504cea 100644 --- a/library/Exceptions/SubdivisionCode/PsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Palestine', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Palestine', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PtSubdivisionCodeException.php index 116fa5fa..e1e84cb9 100644 --- a/library/Exceptions/SubdivisionCode/PtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Portugal', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Portugal', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PwSubdivisionCodeException.php index 9bf5d5ad..060542d1 100644 --- a/library/Exceptions/SubdivisionCode/PwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Palau', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Palau', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/PySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/PySubdivisionCodeException.php index be74bc76..3309c1c5 100644 --- a/library/Exceptions/SubdivisionCode/PySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/PySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class PySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Paraguay', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Paraguay', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/QaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/QaSubdivisionCodeException.php index 9f3b6dab..3d99d18d 100644 --- a/library/Exceptions/SubdivisionCode/QaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/QaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class QaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Qatar', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Qatar', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ReSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ReSubdivisionCodeException.php index e8e21b7f..ffaa2888 100644 --- a/library/Exceptions/SubdivisionCode/ReSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ReSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ReSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Réunion', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Réunion', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/RoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/RoSubdivisionCodeException.php index 83e98128..27a808db 100644 --- a/library/Exceptions/SubdivisionCode/RoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/RoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class RoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Romania', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Romania', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/RsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/RsSubdivisionCodeException.php index af255554..1d6e2edd 100644 --- a/library/Exceptions/SubdivisionCode/RsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/RsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class RsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Serbia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Serbia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/RuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/RuSubdivisionCodeException.php index 845102cc..98012603 100644 --- a/library/Exceptions/SubdivisionCode/RuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/RuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class RuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Russia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Russia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/RwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/RwSubdivisionCodeException.php index 0f6aff7a..927efa24 100644 --- a/library/Exceptions/SubdivisionCode/RwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/RwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class RwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Rwanda', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Rwanda', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SaSubdivisionCodeException.php index 00bc5a4d..26135275 100644 --- a/library/Exceptions/SubdivisionCode/SaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saudi Arabia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saudi Arabia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SbSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SbSubdivisionCodeException.php index e01afdf5..89f01f09 100644 --- a/library/Exceptions/SubdivisionCode/SbSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SbSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SbSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Solomon Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Solomon Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ScSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ScSubdivisionCodeException.php index e54c330d..c616e7a0 100644 --- a/library/Exceptions/SubdivisionCode/ScSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ScSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ScSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Seychelles', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Seychelles', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SdSubdivisionCodeException.php index 578a4b4e..74a78f69 100644 --- a/library/Exceptions/SubdivisionCode/SdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Sudan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Sudan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SeSubdivisionCodeException.php index f07ad870..cc247f5d 100644 --- a/library/Exceptions/SubdivisionCode/SeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Sweden', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Sweden', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SgSubdivisionCodeException.php index 36f33e9e..b73b5cd0 100644 --- a/library/Exceptions/SubdivisionCode/SgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Singapore', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Singapore', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ShSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ShSubdivisionCodeException.php index 3d8e9b29..84a031b9 100644 --- a/library/Exceptions/SubdivisionCode/ShSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ShSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ShSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Helena', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Helena', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SiSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SiSubdivisionCodeException.php index f7db20c5..9369b234 100644 --- a/library/Exceptions/SubdivisionCode/SiSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SiSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SiSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Slovenia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Slovenia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SjSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SjSubdivisionCodeException.php index 87c9b8ba..b782c8fb 100644 --- a/library/Exceptions/SubdivisionCode/SjSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SjSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SjSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Svalbard and Jan Mayen', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Svalbard and Jan Mayen', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SkSubdivisionCodeException.php index b2b0f15f..aa7f1bdb 100644 --- a/library/Exceptions/SubdivisionCode/SkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Slovakia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Slovakia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SlSubdivisionCodeException.php index 75d46f76..2279d3a0 100644 --- a/library/Exceptions/SubdivisionCode/SlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Sierra Leone', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Sierra Leone', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SmSubdivisionCodeException.php index 789c06bc..ac781665 100644 --- a/library/Exceptions/SubdivisionCode/SmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of San Marino', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of San Marino', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SnSubdivisionCodeException.php index be8fe0e8..99f6d9f6 100644 --- a/library/Exceptions/SubdivisionCode/SnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Senegal', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Senegal', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SoSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SoSubdivisionCodeException.php index af3de0ff..0c9f955c 100644 --- a/library/Exceptions/SubdivisionCode/SoSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SoSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SoSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Somalia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Somalia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SrSubdivisionCodeException.php index fb2a805d..e3de12fc 100644 --- a/library/Exceptions/SubdivisionCode/SrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Suriname', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Suriname', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SsSubdivisionCodeException.php index 9d5bbe24..ca6d34dc 100644 --- a/library/Exceptions/SubdivisionCode/SsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of South Sudan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of South Sudan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/StSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/StSubdivisionCodeException.php index e3d53f3b..2e8c30b0 100644 --- a/library/Exceptions/SubdivisionCode/StSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/StSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class StSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of São Tomé and Príncipe', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of São Tomé and Príncipe', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SvSubdivisionCodeException.php index a6445c5e..c38aa515 100644 --- a/library/Exceptions/SubdivisionCode/SvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of El Salvador', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of El Salvador', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SxSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SxSubdivisionCodeException.php index 0e39b890..02c14ed5 100644 --- a/library/Exceptions/SubdivisionCode/SxSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SxSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SxSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Sint Maarten', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Sint Maarten', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SySubdivisionCodeException.php index de3c47e3..3e0bd22d 100644 --- a/library/Exceptions/SubdivisionCode/SySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Syria', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Syria', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/SzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/SzSubdivisionCodeException.php index ee66a8ac..805af1fb 100644 --- a/library/Exceptions/SubdivisionCode/SzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/SzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class SzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Swaziland', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Swaziland', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TcSubdivisionCodeException.php index 2d01d6bd..1fec56df 100644 --- a/library/Exceptions/SubdivisionCode/TcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Turks and Caicos Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Turks and Caicos Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TdSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TdSubdivisionCodeException.php index fdd72558..a3851dfc 100644 --- a/library/Exceptions/SubdivisionCode/TdSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TdSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TdSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Chad', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Chad', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TfSubdivisionCodeException.php index 11c1a6f0..03c4c940 100644 --- a/library/Exceptions/SubdivisionCode/TfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of French Southern Territories', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of French Southern Territories', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TgSubdivisionCodeException.php index 724feab4..52d1b9b3 100644 --- a/library/Exceptions/SubdivisionCode/TgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Togo', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Togo', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ThSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ThSubdivisionCodeException.php index 33b1164b..5569bd7d 100644 --- a/library/Exceptions/SubdivisionCode/ThSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ThSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ThSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Thailand', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Thailand', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TjSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TjSubdivisionCodeException.php index e366a99a..6e2a2828 100644 --- a/library/Exceptions/SubdivisionCode/TjSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TjSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TjSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tajikistan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tajikistan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TkSubdivisionCodeException.php index f00c1940..92e04cdf 100644 --- a/library/Exceptions/SubdivisionCode/TkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tokelau', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tokelau', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TlSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TlSubdivisionCodeException.php index 49834196..42900e75 100644 --- a/library/Exceptions/SubdivisionCode/TlSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TlSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TlSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of East Timor', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of East Timor', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TmSubdivisionCodeException.php index b725d6ea..7103929a 100644 --- a/library/Exceptions/SubdivisionCode/TmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Turkmenistan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Turkmenistan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TnSubdivisionCodeException.php index 1fbe5ad7..f6104f34 100644 --- a/library/Exceptions/SubdivisionCode/TnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tunisia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tunisia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ToSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ToSubdivisionCodeException.php index e6771b70..b9e21725 100644 --- a/library/Exceptions/SubdivisionCode/ToSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ToSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ToSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tonga', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tonga', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TrSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TrSubdivisionCodeException.php index adc1ee16..df1475c7 100644 --- a/library/Exceptions/SubdivisionCode/TrSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TrSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TrSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Turkey', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Turkey', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TtSubdivisionCodeException.php index 81e38a5d..369eede3 100644 --- a/library/Exceptions/SubdivisionCode/TtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Trinidad and Tobago', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Trinidad and Tobago', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TvSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TvSubdivisionCodeException.php index 6dfce434..a9cdccf7 100644 --- a/library/Exceptions/SubdivisionCode/TvSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TvSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TvSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tuvalu', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tuvalu', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TwSubdivisionCodeException.php index 7beeaf86..d0bca773 100644 --- a/library/Exceptions/SubdivisionCode/TwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Taiwan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Taiwan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/TzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/TzSubdivisionCodeException.php index 153386b0..503ce5fb 100644 --- a/library/Exceptions/SubdivisionCode/TzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/TzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class TzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Tanzania', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Tanzania', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UaSubdivisionCodeException.php index d84060a6..2bfb562b 100644 --- a/library/Exceptions/SubdivisionCode/UaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Ukraine', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Ukraine', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UgSubdivisionCodeException.php index ac6bc882..11cfe253 100644 --- a/library/Exceptions/SubdivisionCode/UgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Uganda', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Uganda', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UmSubdivisionCodeException.php index cee43ba2..d9a044b6 100644 --- a/library/Exceptions/SubdivisionCode/UmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of U.S. Minor Outlying Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of U.S. Minor Outlying Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UsSubdivisionCodeException.php index 871b71a3..4bde83e5 100644 --- a/library/Exceptions/SubdivisionCode/UsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of United States', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of United States', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UySubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UySubdivisionCodeException.php index d23c2ac1..77f4b6a2 100644 --- a/library/Exceptions/SubdivisionCode/UySubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UySubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UySubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Uruguay', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Uruguay', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/UzSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/UzSubdivisionCodeException.php index 855f846b..40fa852d 100644 --- a/library/Exceptions/SubdivisionCode/UzSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/UzSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class UzSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Uzbekistan', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Uzbekistan', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VaSubdivisionCodeException.php index 4a5a4123..6c3e5f85 100644 --- a/library/Exceptions/SubdivisionCode/VaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Vatican City', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Vatican City', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VcSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VcSubdivisionCodeException.php index 830025c0..e31582a7 100644 --- a/library/Exceptions/SubdivisionCode/VcSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VcSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VcSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Saint Vincent and the Grenadines', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Saint Vincent and the Grenadines', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VeSubdivisionCodeException.php index 94f76d7c..d907712a 100644 --- a/library/Exceptions/SubdivisionCode/VeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Venezuela', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Venezuela', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VgSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VgSubdivisionCodeException.php index c8aac7db..ef5b9c7d 100644 --- a/library/Exceptions/SubdivisionCode/VgSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VgSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VgSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of British Virgin Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of British Virgin Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ViSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ViSubdivisionCodeException.php index 759c1f2e..f6e9464e 100644 --- a/library/Exceptions/SubdivisionCode/ViSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ViSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ViSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of U.S. Virgin Islands', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of U.S. Virgin Islands', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VnSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VnSubdivisionCodeException.php index a7fcc3a3..3562311e 100644 --- a/library/Exceptions/SubdivisionCode/VnSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VnSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VnSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Vietnam', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Vietnam', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/VuSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/VuSubdivisionCodeException.php index 7c3a2a7f..bb7e6382 100644 --- a/library/Exceptions/SubdivisionCode/VuSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/VuSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class VuSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Vanuatu', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Vanuatu', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/WfSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/WfSubdivisionCodeException.php index 02c047ff..27ae0498 100644 --- a/library/Exceptions/SubdivisionCode/WfSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/WfSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class WfSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Wallis and Futuna', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Wallis and Futuna', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/WsSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/WsSubdivisionCodeException.php index 787474ce..a6baa11a 100644 --- a/library/Exceptions/SubdivisionCode/WsSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/WsSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class WsSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Samoa', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Samoa', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/XkSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/XkSubdivisionCodeException.php index 9e3f7c84..4e99d595 100644 --- a/library/Exceptions/SubdivisionCode/XkSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/XkSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class XkSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Kosovo', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Kosovo', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/YeSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/YeSubdivisionCodeException.php index a86e3d08..bcc53447 100644 --- a/library/Exceptions/SubdivisionCode/YeSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/YeSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class YeSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Yemen', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Yemen', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/YtSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/YtSubdivisionCodeException.php index 2d5b8ec6..c97cc01b 100644 --- a/library/Exceptions/SubdivisionCode/YtSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/YtSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class YtSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Mayotte', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Mayotte', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ZaSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ZaSubdivisionCodeException.php index 50c6c075..5ac6b32e 100644 --- a/library/Exceptions/SubdivisionCode/ZaSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ZaSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ZaSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of South Africa', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of South Africa', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ZmSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ZmSubdivisionCodeException.php index c3d574a9..56a16e3e 100644 --- a/library/Exceptions/SubdivisionCode/ZmSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ZmSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ZmSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Zambia', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Zambia', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCode/ZwSubdivisionCodeException.php b/library/Exceptions/SubdivisionCode/ZwSubdivisionCodeException.php index dc329c0a..d8ce6c94 100644 --- a/library/Exceptions/SubdivisionCode/ZwSubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCode/ZwSubdivisionCodeException.php @@ -20,12 +20,12 @@ use Respect\Validation\Exceptions\SubdivisionCodeException; */ class ZwSubdivisionCodeException extends SubdivisionCodeException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a subdivision code of Zimbabwe', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a subdivision code of Zimbabwe', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SubdivisionCodeException.php b/library/Exceptions/SubdivisionCodeException.php index ee4c9306..e78a9b81 100644 --- a/library/Exceptions/SubdivisionCodeException.php +++ b/library/Exceptions/SubdivisionCodeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class SubdivisionCodeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid subdivision code for {{countryCode}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid subdivision code for {{countryCode}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/SymbolicLinkException.php b/library/Exceptions/SymbolicLinkException.php index 8e3903aa..6b92db13 100644 --- a/library/Exceptions/SymbolicLinkException.php +++ b/library/Exceptions/SymbolicLinkException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class SymbolicLinkException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a symbolic link', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a symbolic link', - ), - ); + ], + ]; } diff --git a/library/Exceptions/TldException.php b/library/Exceptions/TldException.php index 8dec5a4b..6d525cd6 100644 --- a/library/Exceptions/TldException.php +++ b/library/Exceptions/TldException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class TldException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid top-level domain name', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid top-level domain name', - ), - ); + ], + ]; } diff --git a/library/Exceptions/TrueValException.php b/library/Exceptions/TrueValException.php index 9a8d2ac3..c4bd88f1 100644 --- a/library/Exceptions/TrueValException.php +++ b/library/Exceptions/TrueValException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class TrueValException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is not considered as "True"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is considered as "True"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/TypeException.php b/library/Exceptions/TypeException.php index 5e775270..2023faf3 100644 --- a/library/Exceptions/TypeException.php +++ b/library/Exceptions/TypeException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class TypeException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be {{type}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be {{type}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/UploadedException.php b/library/Exceptions/UploadedException.php index 17ec48fd..37b1483c 100644 --- a/library/Exceptions/UploadedException.php +++ b/library/Exceptions/UploadedException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class UploadedException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an uploaded file', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an uploaded file', - ), - ); + ], + ]; } diff --git a/library/Exceptions/UppercaseException.php b/library/Exceptions/UppercaseException.php index 892834f1..67d3753a 100644 --- a/library/Exceptions/UppercaseException.php +++ b/library/Exceptions/UppercaseException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class UppercaseException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be uppercase', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be uppercase', - ), - ); + ], + ]; } diff --git a/library/Exceptions/UrlException.php b/library/Exceptions/UrlException.php index 1d0da6a1..b6dca86c 100644 --- a/library/Exceptions/UrlException.php +++ b/library/Exceptions/UrlException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class UrlException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be an URL', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be an URL', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ValidationException.php b/library/Exceptions/ValidationException.php index 8689dc36..c4a09a9e 100644 --- a/library/Exceptions/ValidationException.php +++ b/library/Exceptions/ValidationException.php @@ -21,14 +21,14 @@ class ValidationException extends InvalidArgumentException implements Validation const MODE_DEFAULT = 1; const MODE_NEGATIVE = 2; const STANDARD = 0; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'Data validation failed for %s', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'Data validation failed for %s', - ), - ); + ], + ]; /** * @var int @@ -49,10 +49,10 @@ class ValidationException extends InvalidArgumentException implements Validation protected $mode = self::MODE_DEFAULT; protected $name = ''; protected $template = ''; - protected $params = array(); + protected $params = []; private $customTemplate = false; - public static function format($template, array $vars = array()) + public static function format($template, array $vars = []) { return preg_replace_callback( '/{{(\w+)}}/', @@ -170,11 +170,11 @@ class ValidationException extends InvalidArgumentException implements Validation } if ($value instanceof Exception) { - $properties = array( + $properties = [ 'message' => $value->getMessage(), 'code' => $value->getCode(), 'file' => $value->getFile().':'.$value->getLine(), - ); + ]; return sprintf('`[exception] (%s: %s)`', $class, static::stringify($properties, $nextDepth)); } @@ -198,7 +198,7 @@ class ValidationException extends InvalidArgumentException implements Validation return key(static::$defaultTemplates[$this->mode]); } - public function configure($name, array $params = array()) + public function configure($name, array $params = []) { $this->setName($name); $this->setParams($params); diff --git a/library/Exceptions/VersionException.php b/library/Exceptions/VersionException.php index 4627489b..ae1f4a3f 100644 --- a/library/Exceptions/VersionException.php +++ b/library/Exceptions/VersionException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class VersionException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a version', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a version', - ), - ); + ], + ]; } diff --git a/library/Exceptions/VideoUrlException.php b/library/Exceptions/VideoUrlException.php index 7474c890..3486bc96 100644 --- a/library/Exceptions/VideoUrlException.php +++ b/library/Exceptions/VideoUrlException.php @@ -15,16 +15,16 @@ class VideoUrlException extends ValidationException { const SERVICE = 1; - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be a valid video URL', self::SERVICE => '{{name}} must be a valid {{service}} video URL', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be a valid video URL', self::SERVICE => '{{name}} must not be a valid {{service}} video URL', - ), - ); + ], + ]; /** * {@inheritdoc} diff --git a/library/Exceptions/VowelException.php b/library/Exceptions/VowelException.php index adb2edb7..5e8428f9 100644 --- a/library/Exceptions/VowelException.php +++ b/library/Exceptions/VowelException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class VowelException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must contain only vowels', self::EXTRA => '{{name}} must contain only vowels and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain vowels', self::EXTRA => '{{name}} must not contain vowels or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/WhenException.php b/library/Exceptions/WhenException.php index 86c2517a..68137c72 100644 --- a/library/Exceptions/WhenException.php +++ b/library/Exceptions/WhenException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class WhenException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => 'Data validation failed for {{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => 'Data validation failed for {{name}}', - ), - ); + ], + ]; } diff --git a/library/Exceptions/WritableException.php b/library/Exceptions/WritableException.php index 80162645..3e90531b 100644 --- a/library/Exceptions/WritableException.php +++ b/library/Exceptions/WritableException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class WritableException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} must be writable', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not be writable', - ), - ); + ], + ]; } diff --git a/library/Exceptions/XdigitException.php b/library/Exceptions/XdigitException.php index 91fc0d13..d240f9ee 100644 --- a/library/Exceptions/XdigitException.php +++ b/library/Exceptions/XdigitException.php @@ -13,14 +13,14 @@ namespace Respect\Validation\Exceptions; class XdigitException extends AlphaException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} contain only hexadecimal digits', self::EXTRA => '{{name}} contain only hexadecimal digits and "{{additionalChars}}"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} must not contain hexadecimal digits', self::EXTRA => '{{name}} must not contain hexadecimal digits or "{{additionalChars}}"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/YesException.php b/library/Exceptions/YesException.php index d7535879..1dc6c1fd 100644 --- a/library/Exceptions/YesException.php +++ b/library/Exceptions/YesException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class YesException extends ValidationException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}} is not considered as "Yes"', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}} is considered as "Yes"', - ), - ); + ], + ]; } diff --git a/library/Exceptions/ZendException.php b/library/Exceptions/ZendException.php index ca5eec03..f116475d 100644 --- a/library/Exceptions/ZendException.php +++ b/library/Exceptions/ZendException.php @@ -13,12 +13,12 @@ namespace Respect\Validation\Exceptions; class ZendException extends AbstractNestedException { - public static $defaultTemplates = array( - self::MODE_DEFAULT => array( + public static $defaultTemplates = [ + self::MODE_DEFAULT => [ self::STANDARD => '{{name}}', - ), - self::MODE_NEGATIVE => array( + ], + self::MODE_NEGATIVE => [ self::STANDARD => '{{name}}', - ), - ); + ], + ]; } diff --git a/library/Factory.php b/library/Factory.php index cfa1f976..4319c80b 100644 --- a/library/Factory.php +++ b/library/Factory.php @@ -16,7 +16,7 @@ use Respect\Validation\Exceptions\ComponentException; class Factory { - protected $rulePrefixes = array('Respect\\Validation\\Rules\\'); + protected $rulePrefixes = ['Respect\\Validation\\Rules\\']; public function getRulePrefixes() { @@ -33,7 +33,7 @@ class Factory array_unshift($this->rulePrefixes, $rulePrefix); } - public function rule($ruleName, array $arguments = array()) + public function rule($ruleName, array $arguments = []) { if ($ruleName instanceof Validatable) { return $ruleName; diff --git a/library/Rules/AbstractComposite.php b/library/Rules/AbstractComposite.php index 0d8f80de..daf577f0 100644 --- a/library/Rules/AbstractComposite.php +++ b/library/Rules/AbstractComposite.php @@ -17,7 +17,7 @@ use Respect\Validation\Validator; abstract class AbstractComposite extends AbstractRule { - protected $rules = array(); + protected $rules = []; public function __construct() { @@ -39,7 +39,7 @@ abstract class AbstractComposite extends AbstractRule return parent::setName($name); } - public function addRule($validator, $arguments = array()) + public function addRule($validator, $arguments = []) { if (!$validator instanceof Validatable) { $this->appendRule(Validator::buildRule($validator, $arguments)); @@ -52,7 +52,7 @@ abstract class AbstractComposite extends AbstractRule public function removeRules() { - $this->rules = array(); + $this->rules = []; } public function addRules(array $validators) @@ -110,7 +110,7 @@ abstract class AbstractComposite extends AbstractRule protected function validateRules($input) { $validators = $this->getRules(); - $exceptions = array(); + $exceptions = []; foreach ($validators as $v) { try { $v->assert($input); diff --git a/library/Rules/AbstractCountryInfo.php b/library/Rules/AbstractCountryInfo.php index 9f101180..6cc32375 100644 --- a/library/Rules/AbstractCountryInfo.php +++ b/library/Rules/AbstractCountryInfo.php @@ -13,7 +13,7 @@ namespace Respect\Validation\Rules; abstract class AbstractCountryInfo extends AbstractRule { - protected $tldList = array( + protected $tldList = [ //generic 'aero', 'asia', 'biz', 'cat', 'com', 'coop', 'edu', 'gov', 'info', 'int', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'pro', @@ -40,7 +40,7 @@ abstract class AbstractCountryInfo extends AbstractRule 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'ye', 'yt', 'za', 'zm', 'zw', - ); + ]; public function validate($input) { diff --git a/library/Rules/AbstractInterval.php b/library/Rules/AbstractInterval.php index b81e4369..5879d992 100644 --- a/library/Rules/AbstractInterval.php +++ b/library/Rules/AbstractInterval.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Exception; use DateTime; +use Exception; abstract class AbstractInterval extends AbstractRule { diff --git a/library/Rules/AbstractRelated.php b/library/Rules/AbstractRelated.php index b9ac3913..ed80263f 100644 --- a/library/Rules/AbstractRelated.php +++ b/library/Rules/AbstractRelated.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\ValidationException; +use Respect\Validation\Validatable; abstract class AbstractRelated extends AbstractRule { @@ -55,14 +55,14 @@ abstract class AbstractRelated extends AbstractRule { $hasReference = $this->hasReference($input); if ($this->mandatory && !$hasReference) { - throw $this->reportError($input, array('hasReference' => false)); + throw $this->reportError($input, ['hasReference' => false]); } try { return $this->decision('assert', $hasReference, $input); } catch (ValidationException $e) { throw $this - ->reportError($this->reference, array('hasReference' => true)) + ->reportError($this->reference, ['hasReference' => true]) ->addRelated($e); } } @@ -71,7 +71,7 @@ abstract class AbstractRelated extends AbstractRule { $hasReference = $this->hasReference($input); if ($this->mandatory && !$hasReference) { - throw $this->reportError($input, array('hasReference' => false)); + throw $this->reportError($input, ['hasReference' => false]); } return $this->decision('check', $hasReference, $input); diff --git a/library/Rules/AbstractRule.php b/library/Rules/AbstractRule.php index 270ca40e..3913ad3f 100644 --- a/library/Rules/AbstractRule.php +++ b/library/Rules/AbstractRule.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\ValidationException; +use Respect\Validation\Validatable; abstract class AbstractRule implements Validatable { @@ -49,7 +49,7 @@ abstract class AbstractRule implements Validatable return $this->name; } - public function reportError($input, array $extraParams = array()) + public function reportError($input, array $extraParams = []) { $exception = $this->createException(); $name = $this->name ?: ValidationException::stringify($input); diff --git a/library/Rules/AbstractWrapper.php b/library/Rules/AbstractWrapper.php index f521f168..dcaf50b0 100644 --- a/library/Rules/AbstractWrapper.php +++ b/library/Rules/AbstractWrapper.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\ComponentException; +use Respect\Validation\Validatable; abstract class AbstractWrapper extends AbstractRule { diff --git a/library/Rules/AllOf.php b/library/Rules/AllOf.php index 7a968419..f739f62c 100644 --- a/library/Rules/AllOf.php +++ b/library/Rules/AllOf.php @@ -18,11 +18,11 @@ class AllOf extends AbstractComposite $exceptions = $this->validateRules($input); $numRules = count($this->rules); $numExceptions = count($exceptions); - $summary = array( + $summary = [ 'total' => $numRules, 'failed' => $numExceptions, 'passed' => $numRules - $numExceptions, - ); + ]; if (!empty($exceptions)) { throw $this->reportError($input, $summary)->setRelated($exceptions); } diff --git a/library/Rules/Bsn.php b/library/Rules/Bsn.php index d6ff4d7c..145ea2f9 100644 --- a/library/Rules/Bsn.php +++ b/library/Rules/Bsn.php @@ -15,6 +15,7 @@ namespace Respect\Validation\Rules; * Validates a Dutch citizen service number (BSN) * * @author Ronald Drenth + * * @see https://nl.wikipedia.org/wiki/Burgerservicenummer */ class Bsn extends AbstractRule diff --git a/library/Rules/Call.php b/library/Rules/Call.php index e9c9b15c..b62dcca8 100644 --- a/library/Rules/Call.php +++ b/library/Rules/Call.php @@ -15,7 +15,7 @@ class Call extends AbstractRelated { public function getReferenceValue($input) { - return call_user_func_array($this->reference, array(&$input)); + return call_user_func_array($this->reference, [&$input]); } public function hasReference($input) diff --git a/library/Rules/Charset.php b/library/Rules/Charset.php index 4568e37e..bd82ec47 100644 --- a/library/Rules/Charset.php +++ b/library/Rules/Charset.php @@ -20,7 +20,7 @@ class Charset extends AbstractRule public function __construct($charset) { $available = mb_list_encodings(); - $charset = is_array($charset) ? $charset : array($charset); + $charset = is_array($charset) ? $charset : [$charset]; $charset = array_filter($charset, function ($c) use ($available) { return in_array($c, $available, true); }); diff --git a/library/Rules/Cnpj.php b/library/Rules/Cnpj.php index 232b42d9..27625253 100644 --- a/library/Rules/Cnpj.php +++ b/library/Rules/Cnpj.php @@ -17,7 +17,7 @@ class Cnpj extends AbstractRule { //Code ported from jsfromhell.com $c = preg_replace('/\D/', '', $input); - $b = array(6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2); + $b = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]; if (strlen($c) != 14) { return false; diff --git a/library/Rules/CountryCode.php b/library/Rules/CountryCode.php index e0b9344d..7611e092 100644 --- a/library/Rules/CountryCode.php +++ b/library/Rules/CountryCode.php @@ -27,261 +27,261 @@ class CountryCode extends AbstractSearcher * * @var array */ - protected $countryCodeList = array( - array('AD', 'AND', '020'), // Andorra - array('AE', 'ARE', '784'), // United Arab Emirates - array('AF', 'AFG', '004'), // Afghanistan - array('AG', 'ATG', '028'), // Antigua and Barbuda - array('AI', 'AIA', '660'), // Anguilla - array('AL', 'ALB', '008'), // Albania - array('AM', 'ARM', '051'), // Armenia - array('AN', 'ANT', '530'), // Netherlands Antilles - array('AO', 'AGO', '024'), // Angola - array('AQ', 'ATA', '010'), // Antarctica - array('AR', 'ARG', '032'), // Argentina - array('AS', 'ASM', '016'), // American Samoa - array('AT', 'AUT', '040'), // Austria - array('AU', 'AUS', '036'), // Australia - array('AW', 'ABW', '533'), // Aruba - array('AX', 'ALA', '248'), // Aland Islands - array('AZ', 'AZE', '031'), // Azerbaijan - array('BA', 'BIH', '070'), // Bosnia and Herzegovina - array('BB', 'BRB', '052'), // Barbados - array('BD', 'BGD', '050'), // Bangladesh - array('BE', 'BEL', '056'), // Belgium - array('BF', 'BFA', '854'), // Burkina Faso - array('BG', 'BGR', '100'), // Bulgaria - array('BH', 'BHR', '048'), // Bahrain - array('BI', 'BDI', '108'), // Burundi - array('BJ', 'BEN', '204'), // Benin - array('BL', 'BLM', '652'), // Saint Barthelemy - array('BM', 'BMU', '060'), // Bermuda - array('BN', 'BRN', '096'), // Brunei - array('BO', 'BOL', '068'), // Bolivia - array('BQ', 'BES', '535'), // Bonaire, Saint Eustatius and Saba - array('BR', 'BRA', '076'), // Brazil - array('BS', 'BHS', '044'), // Bahamas - array('BT', 'BTN', '064'), // Bhutan - array('BV', 'BVT', '074'), // Bouvet Island - array('BW', 'BWA', '072'), // Botswana - array('BY', 'BLR', '112'), // Belarus - array('BZ', 'BLZ', '084'), // Belize - array('CA', 'CAN', '124'), // Canada - array('CC', 'CCK', '166'), // Cocos Islands - array('CD', 'COD', '180'), // Democratic Republic of the Congo - array('CF', 'CAF', '140'), // Central African Republic - array('CG', 'COG', '178'), // Republic of the Congo - array('CH', 'CHE', '756'), // Switzerland - array('CI', 'CIV', '384'), // Ivory Coast - array('CK', 'COK', '184'), // Cook Islands - array('CL', 'CHL', '152'), // Chile - array('CM', 'CMR', '120'), // Cameroon - array('CN', 'CHN', '156'), // China - array('CO', 'COL', '170'), // Colombia - array('CR', 'CRI', '188'), // Costa Rica - array('CS', 'SCG', '891'), // Serbia and Montenegro - array('CU', 'CUB', '192'), // Cuba - array('CV', 'CPV', '132'), // Cape Verde - array('CW', 'CUW', '531'), // Curacao - array('CX', 'CXR', '162'), // Christmas Island - array('CY', 'CYP', '196'), // Cyprus - array('CZ', 'CZE', '203'), // Czech Republic - array('DE', 'DEU', '276'), // Germany - array('DJ', 'DJI', '262'), // Djibouti - array('DK', 'DNK', '208'), // Denmark - array('DM', 'DMA', '212'), // Dominica - array('DO', 'DOM', '214'), // Dominican Republic - array('DZ', 'DZA', '012'), // Algeria - array('EC', 'ECU', '218'), // Ecuador - array('EE', 'EST', '233'), // Estonia - array('EG', 'EGY', '818'), // Egypt - array('EH', 'ESH', '732'), // Western Sahara - array('ER', 'ERI', '232'), // Eritrea - array('ES', 'ESP', '724'), // Spain - array('ET', 'ETH', '231'), // Ethiopia - array('FI', 'FIN', '246'), // Finland - array('FJ', 'FJI', '242'), // Fiji - array('FK', 'FLK', '238'), // Falkland Islands - array('FM', 'FSM', '583'), // Micronesia - array('FO', 'FRO', '234'), // Faroe Islands - array('FR', 'FRA', '250'), // France - array('GA', 'GAB', '266'), // Gabon - array('GB', 'GBR', '826'), // United Kingdom - array('GD', 'GRD', '308'), // Grenada - array('GE', 'GEO', '268'), // Georgia - array('GF', 'GUF', '254'), // French Guiana - array('GG', 'GGY', '831'), // Guernsey - array('GH', 'GHA', '288'), // Ghana - array('GI', 'GIB', '292'), // Gibraltar - array('GL', 'GRL', '304'), // Greenland - array('GM', 'GMB', '270'), // Gambia - array('GN', 'GIN', '324'), // Guinea - array('GP', 'GLP', '312'), // Guadeloupe - array('GQ', 'GNQ', '226'), // Equatorial Guinea - array('GR', 'GRC', '300'), // Greece - array('GS', 'SGS', '239'), // South Georgia and the South Sandwich Islands - array('GT', 'GTM', '320'), // Guatemala - array('GU', 'GUM', '316'), // Guam - array('GW', 'GNB', '624'), // Guinea-Bissau - array('GY', 'GUY', '328'), // Guyana - array('HK', 'HKG', '344'), // Hong Kong - array('HM', 'HMD', '334'), // Heard Island and McDonald Islands - array('HN', 'HND', '340'), // Honduras - array('HR', 'HRV', '191'), // Croatia - array('HT', 'HTI', '332'), // Haiti - array('HU', 'HUN', '348'), // Hungary - array('ID', 'IDN', '360'), // Indonesia - array('IE', 'IRL', '372'), // Ireland - array('IL', 'ISR', '376'), // Israel - array('IM', 'IMN', '833'), // Isle of Man - array('IN', 'IND', '356'), // India - array('IO', 'IOT', '086'), // British Indian Ocean Territory - array('IQ', 'IRQ', '368'), // Iraq - array('IR', 'IRN', '364'), // Iran - array('IS', 'ISL', '352'), // Iceland - array('IT', 'ITA', '380'), // Italy - array('JE', 'JEY', '832'), // Jersey - array('JM', 'JAM', '388'), // Jamaica - array('JO', 'JOR', '400'), // Jordan - array('JP', 'JPN', '392'), // Japan - array('KE', 'KEN', '404'), // Kenya - array('KG', 'KGZ', '417'), // Kyrgyzstan - array('KH', 'KHM', '116'), // Cambodia - array('KI', 'KIR', '296'), // Kiribati - array('KM', 'COM', '174'), // Comoros - array('KN', 'KNA', '659'), // Saint Kitts and Nevis - array('KP', 'PRK', '408'), // North Korea - array('KR', 'KOR', '410'), // South Korea - array('KW', 'KWT', '414'), // Kuwait - array('KY', 'CYM', '136'), // Cayman Islands - array('KZ', 'KAZ', '398'), // Kazakhstan - array('LA', 'LAO', '418'), // Laos - array('LB', 'LBN', '422'), // Lebanon - array('LC', 'LCA', '662'), // Saint Lucia - array('LI', 'LIE', '438'), // Liechtenstein - array('LK', 'LKA', '144'), // Sri Lanka - array('LR', 'LBR', '430'), // Liberia - array('LS', 'LSO', '426'), // Lesotho - array('LT', 'LTU', '440'), // Lithuania - array('LU', 'LUX', '442'), // Luxembourg - array('LV', 'LVA', '428'), // Latvia - array('LY', 'LBY', '434'), // Libya - array('MA', 'MAR', '504'), // Morocco - array('MC', 'MCO', '492'), // Monaco - array('MD', 'MDA', '498'), // Moldova - array('ME', 'MNE', '499'), // Montenegro - array('MF', 'MAF', '663'), // Saint Martin - array('MG', 'MDG', '450'), // Madagascar - array('MH', 'MHL', '584'), // Marshall Islands - array('MK', 'MKD', '807'), // Macedonia - array('ML', 'MLI', '466'), // Mali - array('MM', 'MMR', '104'), // Myanmar - array('MN', 'MNG', '496'), // Mongolia - array('MO', 'MAC', '446'), // Macao - array('MP', 'MNP', '580'), // Northern Mariana Islands - array('MQ', 'MTQ', '474'), // Martinique - array('MR', 'MRT', '478'), // Mauritania - array('MS', 'MSR', '500'), // Montserrat - array('MT', 'MLT', '470'), // Malta - array('MU', 'MUS', '480'), // Mauritius - array('MV', 'MDV', '462'), // Maldives - array('MW', 'MWI', '454'), // Malawi - array('MX', 'MEX', '484'), // Mexico - array('MY', 'MYS', '458'), // Malaysia - array('MZ', 'MOZ', '508'), // Mozambique - array('NA', 'NAM', '516'), // Namibia - array('NC', 'NCL', '540'), // New Caledonia - array('NE', 'NER', '562'), // Niger - array('NF', 'NFK', '574'), // Norfolk Island - array('NG', 'NGA', '566'), // Nigeria - array('NI', 'NIC', '558'), // Nicaragua - array('NL', 'NLD', '528'), // Netherlands - array('NO', 'NOR', '578'), // Norway - array('NP', 'NPL', '524'), // Nepal - array('NR', 'NRU', '520'), // Nauru - array('NU', 'NIU', '570'), // Niue - array('NZ', 'NZL', '554'), // New Zealand - array('OM', 'OMN', '512'), // Oman - array('PA', 'PAN', '591'), // Panama - array('PE', 'PER', '604'), // Peru - array('PF', 'PYF', '258'), // French Polynesia - array('PG', 'PNG', '598'), // Papua New Guinea - array('PH', 'PHL', '608'), // Philippines - array('PK', 'PAK', '586'), // Pakistan - array('PL', 'POL', '616'), // Poland - array('PM', 'SPM', '666'), // Saint Pierre and Miquelon - array('PN', 'PCN', '612'), // Pitcairn - array('PR', 'PRI', '630'), // Puerto Rico - array('PS', 'PSE', '275'), // Palestinian Territory - array('PT', 'PRT', '620'), // Portugal - array('PW', 'PLW', '585'), // Palau - array('PY', 'PRY', '600'), // Paraguay - array('QA', 'QAT', '634'), // Qatar - array('RE', 'REU', '638'), // Reunion - array('RO', 'ROU', '642'), // Romania - array('RS', 'SRB', '688'), // Serbia - array('RU', 'RUS', '643'), // Russia - array('RW', 'RWA', '646'), // Rwanda - array('SA', 'SAU', '682'), // Saudi Arabia - array('SB', 'SLB', '090'), // Solomon Islands - array('SC', 'SYC', '690'), // Seychelles - array('SD', 'SDN', '729'), // Sudan - array('SE', 'SWE', '752'), // Sweden - array('SG', 'SGP', '702'), // Singapore - array('SH', 'SHN', '654'), // Saint Helena - array('SI', 'SVN', '705'), // Slovenia - array('SJ', 'SJM', '744'), // Svalbard and Jan Mayen - array('SK', 'SVK', '703'), // Slovakia - array('SL', 'SLE', '694'), // Sierra Leone - array('SM', 'SMR', '674'), // San Marino - array('SN', 'SEN', '686'), // Senegal - array('SO', 'SOM', '706'), // Somalia - array('SR', 'SUR', '740'), // Suriname - array('SS', 'SSD', '728'), // South Sudan - array('ST', 'STP', '678'), // Sao Tome and Principe - array('SV', 'SLV', '222'), // El Salvador - array('SX', 'SXM', '534'), // Sint Maarten - array('SY', 'SYR', '760'), // Syria - array('SZ', 'SWZ', '748'), // Swaziland - array('TC', 'TCA', '796'), // Turks and Caicos Islands - array('TD', 'TCD', '148'), // Chad - array('TF', 'ATF', '260'), // French Southern Territories - array('TG', 'TGO', '768'), // Togo - array('TH', 'THA', '764'), // Thailand - array('TJ', 'TJK', '762'), // Tajikistan - array('TK', 'TKL', '772'), // Tokelau - array('TL', 'TLS', '626'), // East Timor - array('TM', 'TKM', '795'), // Turkmenistan - array('TN', 'TUN', '788'), // Tunisia - array('TO', 'TON', '776'), // Tonga - array('TR', 'TUR', '792'), // Turkey - array('TT', 'TTO', '780'), // Trinidad and Tobago - array('TV', 'TUV', '798'), // Tuvalu - array('TW', 'TWN', '158'), // Taiwan - array('TZ', 'TZA', '834'), // Tanzania - array('UA', 'UKR', '804'), // Ukraine - array('UG', 'UGA', '800'), // Uganda - array('UM', 'UMI', '581'), // United States Minor Outlying Islands - array('US', 'USA', '840'), // United States - array('UY', 'URY', '858'), // Uruguay - array('UZ', 'UZB', '860'), // Uzbekistan - array('VA', 'VAT', '336'), // Vatican - array('VC', 'VCT', '670'), // Saint Vincent and the Grenadines - array('VE', 'VEN', '862'), // Venezuela - array('VG', 'VGB', '092'), // British Virgin Islands - array('VI', 'VIR', '850'), // U.S. Virgin Islands - array('VN', 'VNM', '704'), // Vietnam - array('VU', 'VUT', '548'), // Vanuatu - array('WF', 'WLF', '876'), // Wallis and Futuna - array('WS', 'WSM', '882'), // Samoa - array('XK', 'XKX', '0'), // Kosovo - array('YE', 'YEM', '887'), // Yemen - array('YT', 'MYT', '175'), // Mayotte - array('ZA', 'ZAF', '710'), // South Africa - array('ZM', 'ZMB', '894'), // Zambia - array('ZW', 'ZWE', '716'), // Zimbabwe + protected $countryCodeList = [ + ['AD', 'AND', '020'], // Andorra + ['AE', 'ARE', '784'], // United Arab Emirates + ['AF', 'AFG', '004'], // Afghanistan + ['AG', 'ATG', '028'], // Antigua and Barbuda + ['AI', 'AIA', '660'], // Anguilla + ['AL', 'ALB', '008'], // Albania + ['AM', 'ARM', '051'], // Armenia + ['AN', 'ANT', '530'], // Netherlands Antilles + ['AO', 'AGO', '024'], // Angola + ['AQ', 'ATA', '010'], // Antarctica + ['AR', 'ARG', '032'], // Argentina + ['AS', 'ASM', '016'], // American Samoa + ['AT', 'AUT', '040'], // Austria + ['AU', 'AUS', '036'], // Australia + ['AW', 'ABW', '533'], // Aruba + ['AX', 'ALA', '248'], // Aland Islands + ['AZ', 'AZE', '031'], // Azerbaijan + ['BA', 'BIH', '070'], // Bosnia and Herzegovina + ['BB', 'BRB', '052'], // Barbados + ['BD', 'BGD', '050'], // Bangladesh + ['BE', 'BEL', '056'], // Belgium + ['BF', 'BFA', '854'], // Burkina Faso + ['BG', 'BGR', '100'], // Bulgaria + ['BH', 'BHR', '048'], // Bahrain + ['BI', 'BDI', '108'], // Burundi + ['BJ', 'BEN', '204'], // Benin + ['BL', 'BLM', '652'], // Saint Barthelemy + ['BM', 'BMU', '060'], // Bermuda + ['BN', 'BRN', '096'], // Brunei + ['BO', 'BOL', '068'], // Bolivia + ['BQ', 'BES', '535'], // Bonaire, Saint Eustatius and Saba + ['BR', 'BRA', '076'], // Brazil + ['BS', 'BHS', '044'], // Bahamas + ['BT', 'BTN', '064'], // Bhutan + ['BV', 'BVT', '074'], // Bouvet Island + ['BW', 'BWA', '072'], // Botswana + ['BY', 'BLR', '112'], // Belarus + ['BZ', 'BLZ', '084'], // Belize + ['CA', 'CAN', '124'], // Canada + ['CC', 'CCK', '166'], // Cocos Islands + ['CD', 'COD', '180'], // Democratic Republic of the Congo + ['CF', 'CAF', '140'], // Central African Republic + ['CG', 'COG', '178'], // Republic of the Congo + ['CH', 'CHE', '756'], // Switzerland + ['CI', 'CIV', '384'], // Ivory Coast + ['CK', 'COK', '184'], // Cook Islands + ['CL', 'CHL', '152'], // Chile + ['CM', 'CMR', '120'], // Cameroon + ['CN', 'CHN', '156'], // China + ['CO', 'COL', '170'], // Colombia + ['CR', 'CRI', '188'], // Costa Rica + ['CS', 'SCG', '891'], // Serbia and Montenegro + ['CU', 'CUB', '192'], // Cuba + ['CV', 'CPV', '132'], // Cape Verde + ['CW', 'CUW', '531'], // Curacao + ['CX', 'CXR', '162'], // Christmas Island + ['CY', 'CYP', '196'], // Cyprus + ['CZ', 'CZE', '203'], // Czech Republic + ['DE', 'DEU', '276'], // Germany + ['DJ', 'DJI', '262'], // Djibouti + ['DK', 'DNK', '208'], // Denmark + ['DM', 'DMA', '212'], // Dominica + ['DO', 'DOM', '214'], // Dominican Republic + ['DZ', 'DZA', '012'], // Algeria + ['EC', 'ECU', '218'], // Ecuador + ['EE', 'EST', '233'], // Estonia + ['EG', 'EGY', '818'], // Egypt + ['EH', 'ESH', '732'], // Western Sahara + ['ER', 'ERI', '232'], // Eritrea + ['ES', 'ESP', '724'], // Spain + ['ET', 'ETH', '231'], // Ethiopia + ['FI', 'FIN', '246'], // Finland + ['FJ', 'FJI', '242'], // Fiji + ['FK', 'FLK', '238'], // Falkland Islands + ['FM', 'FSM', '583'], // Micronesia + ['FO', 'FRO', '234'], // Faroe Islands + ['FR', 'FRA', '250'], // France + ['GA', 'GAB', '266'], // Gabon + ['GB', 'GBR', '826'], // United Kingdom + ['GD', 'GRD', '308'], // Grenada + ['GE', 'GEO', '268'], // Georgia + ['GF', 'GUF', '254'], // French Guiana + ['GG', 'GGY', '831'], // Guernsey + ['GH', 'GHA', '288'], // Ghana + ['GI', 'GIB', '292'], // Gibraltar + ['GL', 'GRL', '304'], // Greenland + ['GM', 'GMB', '270'], // Gambia + ['GN', 'GIN', '324'], // Guinea + ['GP', 'GLP', '312'], // Guadeloupe + ['GQ', 'GNQ', '226'], // Equatorial Guinea + ['GR', 'GRC', '300'], // Greece + ['GS', 'SGS', '239'], // South Georgia and the South Sandwich Islands + ['GT', 'GTM', '320'], // Guatemala + ['GU', 'GUM', '316'], // Guam + ['GW', 'GNB', '624'], // Guinea-Bissau + ['GY', 'GUY', '328'], // Guyana + ['HK', 'HKG', '344'], // Hong Kong + ['HM', 'HMD', '334'], // Heard Island and McDonald Islands + ['HN', 'HND', '340'], // Honduras + ['HR', 'HRV', '191'], // Croatia + ['HT', 'HTI', '332'], // Haiti + ['HU', 'HUN', '348'], // Hungary + ['ID', 'IDN', '360'], // Indonesia + ['IE', 'IRL', '372'], // Ireland + ['IL', 'ISR', '376'], // Israel + ['IM', 'IMN', '833'], // Isle of Man + ['IN', 'IND', '356'], // India + ['IO', 'IOT', '086'], // British Indian Ocean Territory + ['IQ', 'IRQ', '368'], // Iraq + ['IR', 'IRN', '364'], // Iran + ['IS', 'ISL', '352'], // Iceland + ['IT', 'ITA', '380'], // Italy + ['JE', 'JEY', '832'], // Jersey + ['JM', 'JAM', '388'], // Jamaica + ['JO', 'JOR', '400'], // Jordan + ['JP', 'JPN', '392'], // Japan + ['KE', 'KEN', '404'], // Kenya + ['KG', 'KGZ', '417'], // Kyrgyzstan + ['KH', 'KHM', '116'], // Cambodia + ['KI', 'KIR', '296'], // Kiribati + ['KM', 'COM', '174'], // Comoros + ['KN', 'KNA', '659'], // Saint Kitts and Nevis + ['KP', 'PRK', '408'], // North Korea + ['KR', 'KOR', '410'], // South Korea + ['KW', 'KWT', '414'], // Kuwait + ['KY', 'CYM', '136'], // Cayman Islands + ['KZ', 'KAZ', '398'], // Kazakhstan + ['LA', 'LAO', '418'], // Laos + ['LB', 'LBN', '422'], // Lebanon + ['LC', 'LCA', '662'], // Saint Lucia + ['LI', 'LIE', '438'], // Liechtenstein + ['LK', 'LKA', '144'], // Sri Lanka + ['LR', 'LBR', '430'], // Liberia + ['LS', 'LSO', '426'], // Lesotho + ['LT', 'LTU', '440'], // Lithuania + ['LU', 'LUX', '442'], // Luxembourg + ['LV', 'LVA', '428'], // Latvia + ['LY', 'LBY', '434'], // Libya + ['MA', 'MAR', '504'], // Morocco + ['MC', 'MCO', '492'], // Monaco + ['MD', 'MDA', '498'], // Moldova + ['ME', 'MNE', '499'], // Montenegro + ['MF', 'MAF', '663'], // Saint Martin + ['MG', 'MDG', '450'], // Madagascar + ['MH', 'MHL', '584'], // Marshall Islands + ['MK', 'MKD', '807'], // Macedonia + ['ML', 'MLI', '466'], // Mali + ['MM', 'MMR', '104'], // Myanmar + ['MN', 'MNG', '496'], // Mongolia + ['MO', 'MAC', '446'], // Macao + ['MP', 'MNP', '580'], // Northern Mariana Islands + ['MQ', 'MTQ', '474'], // Martinique + ['MR', 'MRT', '478'], // Mauritania + ['MS', 'MSR', '500'], // Montserrat + ['MT', 'MLT', '470'], // Malta + ['MU', 'MUS', '480'], // Mauritius + ['MV', 'MDV', '462'], // Maldives + ['MW', 'MWI', '454'], // Malawi + ['MX', 'MEX', '484'], // Mexico + ['MY', 'MYS', '458'], // Malaysia + ['MZ', 'MOZ', '508'], // Mozambique + ['NA', 'NAM', '516'], // Namibia + ['NC', 'NCL', '540'], // New Caledonia + ['NE', 'NER', '562'], // Niger + ['NF', 'NFK', '574'], // Norfolk Island + ['NG', 'NGA', '566'], // Nigeria + ['NI', 'NIC', '558'], // Nicaragua + ['NL', 'NLD', '528'], // Netherlands + ['NO', 'NOR', '578'], // Norway + ['NP', 'NPL', '524'], // Nepal + ['NR', 'NRU', '520'], // Nauru + ['NU', 'NIU', '570'], // Niue + ['NZ', 'NZL', '554'], // New Zealand + ['OM', 'OMN', '512'], // Oman + ['PA', 'PAN', '591'], // Panama + ['PE', 'PER', '604'], // Peru + ['PF', 'PYF', '258'], // French Polynesia + ['PG', 'PNG', '598'], // Papua New Guinea + ['PH', 'PHL', '608'], // Philippines + ['PK', 'PAK', '586'], // Pakistan + ['PL', 'POL', '616'], // Poland + ['PM', 'SPM', '666'], // Saint Pierre and Miquelon + ['PN', 'PCN', '612'], // Pitcairn + ['PR', 'PRI', '630'], // Puerto Rico + ['PS', 'PSE', '275'], // Palestinian Territory + ['PT', 'PRT', '620'], // Portugal + ['PW', 'PLW', '585'], // Palau + ['PY', 'PRY', '600'], // Paraguay + ['QA', 'QAT', '634'], // Qatar + ['RE', 'REU', '638'], // Reunion + ['RO', 'ROU', '642'], // Romania + ['RS', 'SRB', '688'], // Serbia + ['RU', 'RUS', '643'], // Russia + ['RW', 'RWA', '646'], // Rwanda + ['SA', 'SAU', '682'], // Saudi Arabia + ['SB', 'SLB', '090'], // Solomon Islands + ['SC', 'SYC', '690'], // Seychelles + ['SD', 'SDN', '729'], // Sudan + ['SE', 'SWE', '752'], // Sweden + ['SG', 'SGP', '702'], // Singapore + ['SH', 'SHN', '654'], // Saint Helena + ['SI', 'SVN', '705'], // Slovenia + ['SJ', 'SJM', '744'], // Svalbard and Jan Mayen + ['SK', 'SVK', '703'], // Slovakia + ['SL', 'SLE', '694'], // Sierra Leone + ['SM', 'SMR', '674'], // San Marino + ['SN', 'SEN', '686'], // Senegal + ['SO', 'SOM', '706'], // Somalia + ['SR', 'SUR', '740'], // Suriname + ['SS', 'SSD', '728'], // South Sudan + ['ST', 'STP', '678'], // Sao Tome and Principe + ['SV', 'SLV', '222'], // El Salvador + ['SX', 'SXM', '534'], // Sint Maarten + ['SY', 'SYR', '760'], // Syria + ['SZ', 'SWZ', '748'], // Swaziland + ['TC', 'TCA', '796'], // Turks and Caicos Islands + ['TD', 'TCD', '148'], // Chad + ['TF', 'ATF', '260'], // French Southern Territories + ['TG', 'TGO', '768'], // Togo + ['TH', 'THA', '764'], // Thailand + ['TJ', 'TJK', '762'], // Tajikistan + ['TK', 'TKL', '772'], // Tokelau + ['TL', 'TLS', '626'], // East Timor + ['TM', 'TKM', '795'], // Turkmenistan + ['TN', 'TUN', '788'], // Tunisia + ['TO', 'TON', '776'], // Tonga + ['TR', 'TUR', '792'], // Turkey + ['TT', 'TTO', '780'], // Trinidad and Tobago + ['TV', 'TUV', '798'], // Tuvalu + ['TW', 'TWN', '158'], // Taiwan + ['TZ', 'TZA', '834'], // Tanzania + ['UA', 'UKR', '804'], // Ukraine + ['UG', 'UGA', '800'], // Uganda + ['UM', 'UMI', '581'], // United States Minor Outlying Islands + ['US', 'USA', '840'], // United States + ['UY', 'URY', '858'], // Uruguay + ['UZ', 'UZB', '860'], // Uzbekistan + ['VA', 'VAT', '336'], // Vatican + ['VC', 'VCT', '670'], // Saint Vincent and the Grenadines + ['VE', 'VEN', '862'], // Venezuela + ['VG', 'VGB', '092'], // British Virgin Islands + ['VI', 'VIR', '850'], // U.S. Virgin Islands + ['VN', 'VNM', '704'], // Vietnam + ['VU', 'VUT', '548'], // Vanuatu + ['WF', 'WLF', '876'], // Wallis and Futuna + ['WS', 'WSM', '882'], // Samoa + ['XK', 'XKX', '0'], // Kosovo + ['YE', 'YEM', '887'], // Yemen + ['YT', 'MYT', '175'], // Mayotte + ['ZA', 'ZAF', '710'], // South Africa + ['ZM', 'ZMB', '894'], // Zambia + ['ZW', 'ZWE', '716'], // Zimbabwe - ); + ]; public $set; public $index; @@ -299,16 +299,16 @@ class CountryCode extends AbstractSearcher public static function getAvailableSets() { - return array( + return [ self::ALPHA2, self::ALPHA3, self::NUMERIC, - ); + ]; } private function getCountryCodeList($index) { - $countryList = array(); + $countryList = []; foreach ($this->countryCodeList as $country) { $countryList[] = $country[$index]; } diff --git a/library/Rules/Date.php b/library/Rules/Date.php index 1ccc45cd..f958f7ec 100644 --- a/library/Rules/Date.php +++ b/library/Rules/Date.php @@ -32,10 +32,10 @@ class Date extends AbstractRule return false !== strtotime($input); } - $exceptionalFormats = array( + $exceptionalFormats = [ 'c' => 'Y-m-d\TH:i:sP', 'r' => 'D, d M Y H:i:s O', - ); + ]; if (in_array($this->format, array_keys($exceptionalFormats))) { $this->format = $exceptionalFormats[ $this->format ]; diff --git a/library/Rules/Domain.php b/library/Rules/Domain.php index 6a7dec48..b6a365ca 100644 --- a/library/Rules/Domain.php +++ b/library/Rules/Domain.php @@ -16,7 +16,7 @@ use Respect\Validation\Exceptions\ValidationException; class Domain extends AbstractComposite { protected $tld; - protected $checks = array(); + protected $checks = []; protected $otherParts; public function __construct($tldCheck = true) @@ -83,7 +83,7 @@ class Domain extends AbstractComposite public function assert($input) { - $e = array(); + $e = []; foreach ($this->checks as $chk) { $this->collectAssertException($e, $chk, $input); } diff --git a/library/Rules/Each.php b/library/Rules/Each.php index 41accd9c..6be22e3f 100644 --- a/library/Rules/Each.php +++ b/library/Rules/Each.php @@ -11,9 +11,9 @@ namespace Respect\Validation\Rules; -use Traversable; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\ValidationException; +use Respect\Validation\Validatable; +use Traversable; class Each extends AbstractRule { @@ -28,7 +28,7 @@ class Each extends AbstractRule public function assert($input) { - $exceptions = array(); + $exceptions = []; if (!is_array($input) || $input instanceof Traversable) { throw $this->reportError($input); diff --git a/library/Rules/Factor.php b/library/Rules/Factor.php index 0b2c0ce8..1641e053 100644 --- a/library/Rules/Factor.php +++ b/library/Rules/Factor.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Exceptions\ValidationException; use Respect\Validation\Exceptions\ComponentException; +use Respect\Validation\Exceptions\ValidationException; /** * @author David Meister diff --git a/library/Rules/FilterVar.php b/library/Rules/FilterVar.php index c159cdce..7122afb1 100644 --- a/library/Rules/FilterVar.php +++ b/library/Rules/FilterVar.php @@ -34,7 +34,7 @@ class FilterVar extends Callback { return in_array( $filter, - array( + [ FILTER_VALIDATE_BOOLEAN, FILTER_VALIDATE_EMAIL, FILTER_VALIDATE_FLOAT, @@ -42,7 +42,7 @@ class FilterVar extends Callback FILTER_VALIDATE_IP, FILTER_VALIDATE_REGEXP, FILTER_VALIDATE_URL, - ) + ] ); } } diff --git a/library/Rules/Instance.php b/library/Rules/Instance.php index a3dfc888..3eacc712 100644 --- a/library/Rules/Instance.php +++ b/library/Rules/Instance.php @@ -20,7 +20,7 @@ class Instance extends AbstractRule $this->instanceName = $instanceName; } - public function reportError($input, array $extraParams = array()) + public function reportError($input, array $extraParams = []) { return parent::reportError($input, $extraParams); } diff --git a/library/Rules/Ip.php b/library/Rules/Ip.php index 8919652b..802ff153 100644 --- a/library/Rules/Ip.php +++ b/library/Rules/Ip.php @@ -37,7 +37,7 @@ class Ip extends AbstractRule return; } - $range = array('min' => null, 'max' => null, 'mask' => null); + $range = ['min' => null, 'max' => null, 'mask' => null]; if (strpos($input, '-') !== false) { list($range['min'], $range['max']) = explode('-', $input); @@ -106,9 +106,9 @@ class Ip extends AbstractRule return (boolean) filter_var( $address, FILTER_VALIDATE_IP, - array( + [ 'flags' => $this->ipOptions, - ) + ] ); } diff --git a/library/Rules/KeyNested.php b/library/Rules/KeyNested.php index f91bc1c5..cd6a6317 100644 --- a/library/Rules/KeyNested.php +++ b/library/Rules/KeyNested.php @@ -13,7 +13,6 @@ namespace Respect\Validation\Rules; use ArrayAccess; use Respect\Validation\Exceptions\ComponentException; -use Respect\Validation\Validatable; class KeyNested extends AbstractRelated { diff --git a/library/Rules/KeySet.php b/library/Rules/KeySet.php index 1d421490..282ffe5f 100644 --- a/library/Rules/KeySet.php +++ b/library/Rules/KeySet.php @@ -40,7 +40,7 @@ class KeySet extends AllOf /** * {@inheritdoc} */ - public function addRule($rule, $arguments = array()) + public function addRule($rule, $arguments = []) { if ($rule instanceof AllOf) { $rule = $this->filterAllOf($rule); @@ -72,7 +72,7 @@ class KeySet extends AllOf */ public function getKeys() { - $keys = array(); + $keys = []; foreach ($this->getRules() as $keyRule) { $keys[] = $keyRule->reference; } @@ -104,7 +104,7 @@ class KeySet extends AllOf private function checkKeys($input) { if (!$this->hasValidStructure($input)) { - $params = array('keys' => $this->getKeys()); + $params = ['keys' => $this->getKeys()]; $exception = $this->reportError($input, $params); throw $exception; diff --git a/library/Rules/KeyValue.php b/library/Rules/KeyValue.php index e443145a..a1509183 100644 --- a/library/Rules/KeyValue.php +++ b/library/Rules/KeyValue.php @@ -39,10 +39,10 @@ class KeyValue extends AbstractRule } try { - $rule = Validator::__callStatic($this->ruleName, array($input[$this->baseKey])); + $rule = Validator::__callStatic($this->ruleName, [$input[$this->baseKey]]); $rule->setName($this->comparedKey); } catch (ComponentException $exception) { - throw $this->reportError($input, array('component' => true)); + throw $this->reportError($input, ['component' => true]); } return $rule; @@ -50,9 +50,9 @@ class KeyValue extends AbstractRule private function overwriteExceptionParams(ValidationException $exception) { - $params = array(); + $params = []; foreach ($exception->getParams() as $key => $value) { - if (in_array($key, array('template', 'translator'))) { + if (in_array($key, ['template', 'translator'])) { continue; } diff --git a/library/Rules/NfeAccessKey.php b/library/Rules/NfeAccessKey.php index fe2a09e4..cad013ac 100644 --- a/library/Rules/NfeAccessKey.php +++ b/library/Rules/NfeAccessKey.php @@ -32,7 +32,7 @@ class NfeAccessKey extends AbstractRule return false; } - $w = array(); + $w = []; for ($i = 0, $z = 5, $m = 43; $i <= $m; $i++) { $z = ($i < $m) ? ($z - 1) == 1 ? 9 : ($z - 1) : 0; $w[] = $z; diff --git a/library/Rules/Not.php b/library/Rules/Not.php index 8b97e184..bda4b55f 100644 --- a/library/Rules/Not.php +++ b/library/Rules/Not.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\ValidationException; +use Respect\Validation\Validatable; class Not extends AbstractRule { diff --git a/library/Rules/NotOptional.php b/library/Rules/NotOptional.php index 2f4bf053..4238758d 100644 --- a/library/Rules/NotOptional.php +++ b/library/Rules/NotOptional.php @@ -15,6 +15,6 @@ class NotOptional extends AbstractRule { public function validate($input) { - return (false === in_array($input, array(null, ''), true)); + return (false === in_array($input, [null, ''], true)); } } diff --git a/library/Rules/Optional.php b/library/Rules/Optional.php index 353402a1..1fd5592f 100644 --- a/library/Rules/Optional.php +++ b/library/Rules/Optional.php @@ -22,7 +22,7 @@ class Optional extends AbstractWrapper private function isOptional($input) { - return in_array($input, array(null, ''), true); + return in_array($input, [null, ''], true); } public function assert($input) diff --git a/library/Rules/PostalCode.php b/library/Rules/PostalCode.php index 7cc7bf14..a94e3fa5 100644 --- a/library/Rules/PostalCode.php +++ b/library/Rules/PostalCode.php @@ -20,7 +20,7 @@ class PostalCode extends Regex /** * @link http://download.geonames.org/export/dump/countryInfo.txt */ - public $postalCodes = array( + public $postalCodes = [ 'AD' => "/^(?:AD)*(\d{3})$/", 'AM' => "/^(\d{6})$/", 'AR' => "/^([A-Z]\d{4}[A-Z]{3})$/", @@ -172,7 +172,7 @@ class PostalCode extends Regex 'YT' => "/^(\d{5})$/", 'ZA' => "/^(\d{4})$/", 'ZM' => "/^(\d{5})$/", - ); + ]; public $countryCode; diff --git a/library/Rules/Sf.php b/library/Rules/Sf.php index e9ab5d15..8e867227 100644 --- a/library/Rules/Sf.php +++ b/library/Rules/Sf.php @@ -14,8 +14,8 @@ namespace Respect\Validation\Rules; use ReflectionClass; use ReflectionException; use Respect\Validation\Exceptions\ComponentException; -use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Validation; class Sf extends AbstractRule { @@ -23,13 +23,13 @@ class Sf extends AbstractRule public $name; private $constraint; - public function __construct($name, $params = array()) + public function __construct($name, $params = []) { $this->name = ucfirst($name); $this->constraint = $this->createSymfonyConstraint($this->name, $params); } - private function createSymfonyConstraint($constraintName, $constraintConstructorParameters = array()) + private function createSymfonyConstraint($constraintName, $constraintConstructorParameters = []) { $fullClassName = sprintf(self::SYMFONY_CONSTRAINT_NAMESPACE, $constraintName); try { diff --git a/library/Rules/Size.php b/library/Rules/Size.php index 7c131365..02c78236 100644 --- a/library/Rules/Size.php +++ b/library/Rules/Size.php @@ -63,7 +63,7 @@ class Size extends AbstractRule private function toBytes($size) { $value = $size; - $units = array('b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb'); + $units = ['b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'yb']; foreach ($units as $exponent => $unit) { if (!preg_match("/^(\d+(.\d+)?){$unit}$/i", $size, $matches)) { continue; diff --git a/library/Rules/SubdivisionCode/AdSubdivisionCode.php b/library/Rules/SubdivisionCode/AdSubdivisionCode.php index 9e5e9dc0..1b836dad 100644 --- a/library/Rules/SubdivisionCode/AdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '02', // Canillo '03', // Encamp '04', // La Massana @@ -30,7 +30,7 @@ class AdSubdivisionCode extends AbstractSearcher '06', // Sant Julia de Lòria '07', // Andorra la Vella '08', // Escaldes-Engordany - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AeSubdivisionCode.php b/library/Rules/SubdivisionCode/AeSubdivisionCode.php index fe1dc026..3a42ea17 100644 --- a/library/Rules/SubdivisionCode/AeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AJ', // 'Ajman 'AZ', // Abu Zaby 'DU', // Dubayy @@ -30,7 +30,7 @@ class AeSubdivisionCode extends AbstractSearcher 'RK', // R'as al Khaymah 'SH', // Ash Shariqah 'UQ', // Umm al Qaywayn - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AfSubdivisionCode.php b/library/Rules/SubdivisionCode/AfSubdivisionCode.php index 8a9e0136..1bec67bf 100644 --- a/library/Rules/SubdivisionCode/AfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AfSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BAL', // Balkh province 'BAM', // Bamian province 'BDG', // Badghis province @@ -57,7 +57,7 @@ class AfSubdivisionCode extends AbstractSearcher 'TAK', // Takhar province 'WAR', // Wardak province 'ZAB', // Zabol province - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AgSubdivisionCode.php b/library/Rules/SubdivisionCode/AgSubdivisionCode.php index cc218f19..73d379d9 100644 --- a/library/Rules/SubdivisionCode/AgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '03', // Saint George '04', // Saint John '05', // Saint Mary @@ -31,7 +31,7 @@ class AgSubdivisionCode extends AbstractSearcher '08', // Saint Philip '10', // Barbuda '11', // Redonda - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AiSubdivisionCode.php b/library/Rules/SubdivisionCode/AiSubdivisionCode.php index 6d6e4557..e2b23128 100644 --- a/library/Rules/SubdivisionCode/AiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AiSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AlSubdivisionCode.php b/library/Rules/SubdivisionCode/AlSubdivisionCode.php index 3ffb4434..97ac19fe 100644 --- a/library/Rules/SubdivisionCode/AlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Berat '02', // Durres '03', // Elbasan @@ -71,7 +71,7 @@ class AlSubdivisionCode extends AbstractSearcher 'TP', // Tropoje 'TR', // Tirane 'VL', // Vlore - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AmSubdivisionCode.php b/library/Rules/SubdivisionCode/AmSubdivisionCode.php index 4b6babe4..c8132c35 100644 --- a/library/Rules/SubdivisionCode/AmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AG', // Aragatsotn 'AR', // Ararat 'AV', // Armavir @@ -34,7 +34,7 @@ class AmSubdivisionCode extends AbstractSearcher 'SU', // Syunik' 'TV', // Tavush 'VD', // Vayots' Dzor - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AnSubdivisionCode.php b/library/Rules/SubdivisionCode/AnSubdivisionCode.php index afba5df8..cc755ec4 100644 --- a/library/Rules/SubdivisionCode/AnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AnSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AoSubdivisionCode.php b/library/Rules/SubdivisionCode/AoSubdivisionCode.php index fcd91e6d..5d589303 100644 --- a/library/Rules/SubdivisionCode/AoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BGO', // Bengo 'BGU', // Benguela province 'BIE', // Bie @@ -41,7 +41,7 @@ class AoSubdivisionCode extends AbstractSearcher 'NAM', // Namibe 'UIG', // Uige 'ZAI', // Zaire - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AqSubdivisionCode.php b/library/Rules/SubdivisionCode/AqSubdivisionCode.php index 8d0fdf99..2fe6a6db 100644 --- a/library/Rules/SubdivisionCode/AqSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AqSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AqSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ArSubdivisionCode.php b/library/Rules/SubdivisionCode/ArSubdivisionCode.php index 23f84b3e..204ce8af 100644 --- a/library/Rules/SubdivisionCode/ArSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ArSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ArSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Salta 'B', // Buenos Aires Province 'C', // Ciudad Autónoma de Buenos Aires @@ -47,7 +47,7 @@ class ArSubdivisionCode extends AbstractSearcher 'X', // Cordoba 'Y', // Jujuy 'Z', // Santa Cruz - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AsSubdivisionCode.php b/library/Rules/SubdivisionCode/AsSubdivisionCode.php index 7bbf5f92..a8dd9c85 100644 --- a/library/Rules/SubdivisionCode/AsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AsSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'E', // Eastern 'M', // Manu'a 'R', // Rose Island 'S', // Swains Island 'W', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AtSubdivisionCode.php b/library/Rules/SubdivisionCode/AtSubdivisionCode.php index e76f0355..77e64b27 100644 --- a/library/Rules/SubdivisionCode/AtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Burgenland '2', // Karnten '3', // Niederosterreich @@ -32,7 +32,7 @@ class AtSubdivisionCode extends AbstractSearcher '7', // Tirol '8', // Vorarlberg '9', // Wien - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AuSubdivisionCode.php b/library/Rules/SubdivisionCode/AuSubdivisionCode.php index 8f288a56..db52e371 100644 --- a/library/Rules/SubdivisionCode/AuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'ACT', // Australian Capital Territory 'NSW', // New South Wales 'NT', // Northern Territory @@ -31,7 +31,7 @@ class AuSubdivisionCode extends AbstractSearcher 'TAS', // Tasmania 'VIC', // Victoria 'WA', // Western Australia - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AwSubdivisionCode.php b/library/Rules/SubdivisionCode/AwSubdivisionCode.php index d50ac537..575424de 100644 --- a/library/Rules/SubdivisionCode/AwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AwSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AxSubdivisionCode.php b/library/Rules/SubdivisionCode/AxSubdivisionCode.php index e7b31272..0041a6c2 100644 --- a/library/Rules/SubdivisionCode/AxSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AxSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AxSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/AzSubdivisionCode.php b/library/Rules/SubdivisionCode/AzSubdivisionCode.php index 5c6885f7..05d6239f 100644 --- a/library/Rules/SubdivisionCode/AzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/AzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class AzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Şirvan 'ABS', // Abseron 'AGA', // Agstafa @@ -102,7 +102,7 @@ class AzSubdivisionCode extends AbstractSearcher 'SAD', // Sadarak 'SAH', // Sahbuz 'SAR', // Sarur - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BaSubdivisionCode.php b/library/Rules/SubdivisionCode/BaSubdivisionCode.php index 540fdacf..53e08a33 100644 --- a/library/Rules/SubdivisionCode/BaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BIH', // Federacija Bosna i Hercegovina 'BRC', // Brcko District 'SRP', // Republika Srpska @@ -36,7 +36,7 @@ class BaSubdivisionCode extends AbstractSearcher '08', // Zapadnohercegovački kanton '09', // Kanton Sarajevo '10', // Kanton br. 10 (Livanjski kanton) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BbSubdivisionCode.php b/library/Rules/SubdivisionCode/BbSubdivisionCode.php index 4b560cf3..2ab08369 100644 --- a/library/Rules/SubdivisionCode/BbSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BbSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BbSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Christ Church '02', // Saint Andrew '03', // Saint George @@ -34,7 +34,7 @@ class BbSubdivisionCode extends AbstractSearcher '09', // Saint Peter '10', // Saint Philip '11', // Saint Thomas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BdSubdivisionCode.php b/library/Rules/SubdivisionCode/BdSubdivisionCode.php index 4423d8db..270c9450 100644 --- a/library/Rules/SubdivisionCode/BdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Barisal 'B', // Chittagong 'C', // Dhaka @@ -94,7 +94,7 @@ class BdSubdivisionCode extends AbstractSearcher '62', // Shariatpur zila '63', // Tangail zila '64', // Thakurgaon zila - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BeSubdivisionCode.php b/library/Rules/SubdivisionCode/BeSubdivisionCode.php index 5d6f8798..f59582b2 100644 --- a/library/Rules/SubdivisionCode/BeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BRU', // Brussels 'VLG', // Flanders 'WAL', // Wallonia @@ -37,7 +37,7 @@ class BeSubdivisionCode extends AbstractSearcher 'WLG', // Liege 'WLX', // Luxembourg 'WNA', // Namur - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BfSubdivisionCode.php b/library/Rules/SubdivisionCode/BfSubdivisionCode.php index 9195f30d..a0a99e8a 100644 --- a/library/Rules/SubdivisionCode/BfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BfSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Boucle du Mouhoun '02', // Cascades '03', // Centre @@ -81,7 +81,7 @@ class BfSubdivisionCode extends AbstractSearcher 'ZIR', // Ziro 'ZON', // Zondoma 'ZOU', // Zoundweogo - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BgSubdivisionCode.php b/library/Rules/SubdivisionCode/BgSubdivisionCode.php index 09f8fc07..c484a23d 100644 --- a/library/Rules/SubdivisionCode/BgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Blagoevgrad '02', // Burgas '03', // Varna @@ -51,7 +51,7 @@ class BgSubdivisionCode extends AbstractSearcher '26', // Khaskovo '27', // Shumen '28', // Yambol - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BhSubdivisionCode.php b/library/Rules/SubdivisionCode/BhSubdivisionCode.php index da0e28d9..0e6b3201 100644 --- a/library/Rules/SubdivisionCode/BhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BhSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BhSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '13', // Capital '14', // Southern '15', // Muharraq '16', // Central '17', // Northern - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BiSubdivisionCode.php b/library/Rules/SubdivisionCode/BiSubdivisionCode.php index 36eb0553..b7f7c51e 100644 --- a/library/Rules/SubdivisionCode/BiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BB', // Bubanza 'BL', // Bujumbura Rural 'BM', // Bujumbura Mairie @@ -40,7 +40,7 @@ class BiSubdivisionCode extends AbstractSearcher 'NG', // Ngozi 'RT', // Rutana 'RY', // Ruyigi - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BjSubdivisionCode.php b/library/Rules/SubdivisionCode/BjSubdivisionCode.php index 3626c23f..8a7f4432 100644 --- a/library/Rules/SubdivisionCode/BjSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BjSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BjSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AK', // Atakora 'AL', // Alibori 'AQ', // Atlantique @@ -35,7 +35,7 @@ class BjSubdivisionCode extends AbstractSearcher 'OU', // Oueme 'PL', // Plateau 'ZO', // Zou - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BlSubdivisionCode.php b/library/Rules/SubdivisionCode/BlSubdivisionCode.php index f3df8c02..17e777d9 100644 --- a/library/Rules/SubdivisionCode/BlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BlSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BmSubdivisionCode.php b/library/Rules/SubdivisionCode/BmSubdivisionCode.php index cfae34a6..137ff33b 100644 --- a/library/Rules/SubdivisionCode/BmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DS', // Devonshire 'GC', // Saint George 'HA', // Hamilton @@ -34,7 +34,7 @@ class BmSubdivisionCode extends AbstractSearcher 'SH', // Southampton 'SM', // Smith's 'WA', // Warwick - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BnSubdivisionCode.php b/library/Rules/SubdivisionCode/BnSubdivisionCode.php index ae792bfe..776c92ba 100644 --- a/library/Rules/SubdivisionCode/BnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BnSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BE', // Belait 'BM', // Brunei and Muara 'TE', // Temburong 'TU', // Tutong - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BoSubdivisionCode.php b/library/Rules/SubdivisionCode/BoSubdivisionCode.php index 2a955694..ec6764a6 100644 --- a/library/Rules/SubdivisionCode/BoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'B', // Departmento Beni 'C', // Departmento Cochabamba 'H', // Departmento Chuquisaca @@ -32,7 +32,7 @@ class BoSubdivisionCode extends AbstractSearcher 'P', // Departmento Potosi 'S', // Departmento Santa Cruz 'T', // Departmento Tarija - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BqSubdivisionCode.php b/library/Rules/SubdivisionCode/BqSubdivisionCode.php index 318f906f..96aa5295 100644 --- a/library/Rules/SubdivisionCode/BqSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BqSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BqSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BO', // Bonaire 'SA', // Saba 'SE', // Sint Eustatius - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BrSubdivisionCode.php b/library/Rules/SubdivisionCode/BrSubdivisionCode.php index 802ceb09..6cab6a5c 100644 --- a/library/Rules/SubdivisionCode/BrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AC', // Acre 'AL', // Alagoas 'AM', // Amazonas @@ -50,7 +50,7 @@ class BrSubdivisionCode extends AbstractSearcher 'SE', // Sergipe 'SP', // Sao Paulo 'TO', // Tocantins - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BsSubdivisionCode.php b/library/Rules/SubdivisionCode/BsSubdivisionCode.php index 9f1763a3..62505430 100644 --- a/library/Rules/SubdivisionCode/BsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AK', // Acklins Islands 'BI', // Bimini and Cat Cay 'BP', // Black Point @@ -63,7 +63,7 @@ class BsSubdivisionCode extends AbstractSearcher 'MH', // Marsh Harbour District 'RS', // Rock Sound 'SP', // Sandy Point - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BtSubdivisionCode.php b/library/Rules/SubdivisionCode/BtSubdivisionCode.php index f7354307..b32a3f6d 100644 --- a/library/Rules/SubdivisionCode/BtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '11', // Paro '12', // Chukha '13', // Haa @@ -43,7 +43,7 @@ class BtSubdivisionCode extends AbstractSearcher '45', // Samdrup Jongkhar 'GA', // Gasa 'TY', // Trashi Yangste - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BvSubdivisionCode.php b/library/Rules/SubdivisionCode/BvSubdivisionCode.php index 6c0e44af..9ef3f1cd 100644 --- a/library/Rules/SubdivisionCode/BvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BvSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BwSubdivisionCode.php b/library/Rules/SubdivisionCode/BwSubdivisionCode.php index 0b800e94..7dffd731 100644 --- a/library/Rules/SubdivisionCode/BwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CE', // Central 'GH', // Ghanzi 'KG', // Kgalagadi @@ -32,7 +32,7 @@ class BwSubdivisionCode extends AbstractSearcher 'NW', // North West 'SE', // South East 'SO', // Southern - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BySubdivisionCode.php b/library/Rules/SubdivisionCode/BySubdivisionCode.php index 8715272c..042e5372 100644 --- a/library/Rules/SubdivisionCode/BySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BR', // Brest voblast 'HM', // Horad Minsk 'HO', // Homyel voblast @@ -30,7 +30,7 @@ class BySubdivisionCode extends AbstractSearcher 'MA', // Mahilyow voblast 'MI', // Minsk voblast 'VI', // Vitsebsk voblast - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/BzSubdivisionCode.php b/library/Rules/SubdivisionCode/BzSubdivisionCode.php index 4ad698fa..0b982806 100644 --- a/library/Rules/SubdivisionCode/BzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/BzSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class BzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BZ', // Belize District 'CY', // Cayo District 'CZL', // Corozal District 'OW', // Orange Walk District 'SC', // Stann Creek District 'TOL', // Toledo District - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CaSubdivisionCode.php b/library/Rules/SubdivisionCode/CaSubdivisionCode.php index 8ea3a0bd..c6129355 100644 --- a/library/Rules/SubdivisionCode/CaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Alberta 'BC', // British Columbia 'MB', // Manitoba @@ -36,7 +36,7 @@ class CaSubdivisionCode extends AbstractSearcher 'QC', // Quebec 'SK', // Saskatchewan 'YT', // Yukon Territory - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CcSubdivisionCode.php b/library/Rules/SubdivisionCode/CcSubdivisionCode.php index 0fd6fb4c..aa6bdcfa 100644 --- a/library/Rules/SubdivisionCode/CcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CcSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'D', // Direction Island 'H', // Home Island 'O', // Horsburgh Island 'S', // South Island 'W', // West Island - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CdSubdivisionCode.php b/library/Rules/SubdivisionCode/CdSubdivisionCode.php index cf66541b..868ce764 100644 --- a/library/Rules/SubdivisionCode/CdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BC', // Bas-Congo 'BN', // Bandundu 'EQ', // Equateur @@ -34,7 +34,7 @@ class CdSubdivisionCode extends AbstractSearcher 'NK', // Nord-Kivu 'OR', // Orientale 'SK', // Sud-Kivu - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CfSubdivisionCode.php b/library/Rules/SubdivisionCode/CfSubdivisionCode.php index b6ce0339..caf54eab 100644 --- a/library/Rules/SubdivisionCode/CfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CfSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AC', // Ouham 'BB', // Bamingui-Bangoran 'BGF', // Bangui @@ -40,7 +40,7 @@ class CfSubdivisionCode extends AbstractSearcher 'SE', // Sangha-Mbaere 'UK', // Ouaka 'VK', // Vakaga - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CgSubdivisionCode.php b/library/Rules/SubdivisionCode/CgSubdivisionCode.php index be62c7a0..f2793aa5 100644 --- a/library/Rules/SubdivisionCode/CgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '11', // Bouenza '12', // Pool '13', // Sangha @@ -35,7 +35,7 @@ class CgSubdivisionCode extends AbstractSearcher '8', // Cuvette '9', // Niari 'BZV', // Brazzaville - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ChSubdivisionCode.php b/library/Rules/SubdivisionCode/ChSubdivisionCode.php index b02c5108..dac06496 100644 --- a/library/Rules/SubdivisionCode/ChSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ChSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ChSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AG', // Aargau 'AI', // Appenzell Innerhoden 'AR', // Appenzell Ausserrhoden @@ -49,7 +49,7 @@ class ChSubdivisionCode extends AbstractSearcher 'VS', // Valais 'ZG', // Zug 'ZH', // Zurich - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CiSubdivisionCode.php b/library/Rules/SubdivisionCode/CiSubdivisionCode.php index 92c92347..592cdab7 100644 --- a/library/Rules/SubdivisionCode/CiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Lagunes (Région des) '02', // Haut-Sassandra (Région du) '03', // Savanes (Région des) @@ -42,7 +42,7 @@ class CiSubdivisionCode extends AbstractSearcher '17', // Bafing (Région du) '18', // Fromager (Région du) '19', // Moyen-Cavally (Région du) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CkSubdivisionCode.php b/library/Rules/SubdivisionCode/CkSubdivisionCode.php index 2dc2c64d..aa0d1bfc 100644 --- a/library/Rules/SubdivisionCode/CkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AI', // Aitutaki 'AT', // Atiu 'MA', // Manuae @@ -38,7 +38,7 @@ class CkSubdivisionCode extends AbstractSearcher 'RR', // Rarotonga 'SU', // Surwarrow 'TA', // Takutea - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ClSubdivisionCode.php b/library/Rules/SubdivisionCode/ClSubdivisionCode.php index cdea33e5..b8c85b10 100644 --- a/library/Rules/SubdivisionCode/ClSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ClSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ClSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AI', // Aisen del General Carlos Ibanez del Campo (XI) 'AN', // Antofagasta (II) 'AP', // Arica y Parinacota @@ -38,7 +38,7 @@ class ClSubdivisionCode extends AbstractSearcher 'RM', // Region Metropolitana (RM) 'TA', // Tarapaca (I) 'VS', // Valparaiso (V) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CmSubdivisionCode.php b/library/Rules/SubdivisionCode/CmSubdivisionCode.php index ed5f4578..b20169a2 100644 --- a/library/Rules/SubdivisionCode/CmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AD', // Adamawa Province (Adamaoua) 'CE', // Centre Province 'EN', // Extreme North Province (Extrême-Nord) @@ -33,7 +33,7 @@ class CmSubdivisionCode extends AbstractSearcher 'OU', // West Province (Ouest) 'SU', // South Province (Sud) 'SW', // Southwest Province (Sud-Ouest). - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CnSubdivisionCode.php b/library/Rules/SubdivisionCode/CnSubdivisionCode.php index f804cfaa..723c4e8c 100644 --- a/library/Rules/SubdivisionCode/CnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '11', // Beijing '12', // Tianjin '13', // Hebei @@ -57,7 +57,7 @@ class CnSubdivisionCode extends AbstractSearcher '71', // Taiwan '91', // Xianggang '92', // Aomen - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CoSubdivisionCode.php b/library/Rules/SubdivisionCode/CoSubdivisionCode.php index afcb9a9e..3577ee4f 100644 --- a/library/Rules/SubdivisionCode/CoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AMA', // Amazonas 'ANT', // Antioquia 'ARA', // Arauca @@ -56,7 +56,7 @@ class CoSubdivisionCode extends AbstractSearcher 'VAC', // Valle del Cauca 'VAU', // Vaupes 'VID', // Vichada - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CrSubdivisionCode.php b/library/Rules/SubdivisionCode/CrSubdivisionCode.php index d4cc54f5..0fad16d5 100644 --- a/library/Rules/SubdivisionCode/CrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Alajuela 'C', // Cartago 'G', // Guanacaste @@ -30,7 +30,7 @@ class CrSubdivisionCode extends AbstractSearcher 'L', // Limon 'P', // Puntarenas 'SJ', // San Jose - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CsSubdivisionCode.php b/library/Rules/SubdivisionCode/CsSubdivisionCode.php index 6df2b327..24d7eaa5 100644 --- a/library/Rules/SubdivisionCode/CsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CsSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'KOS', // Kosovo 'MON', // Montenegro 'SER', // Serbia 'VOJ', // Vojvodina - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CuSubdivisionCode.php b/library/Rules/SubdivisionCode/CuSubdivisionCode.php index 001d991c..eb8d7aab 100644 --- a/library/Rules/SubdivisionCode/CuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Pinar del Rio '03', // La Habana '04', // Matanzas @@ -38,7 +38,7 @@ class CuSubdivisionCode extends AbstractSearcher '14', // Guantanamo '99', // Isla de la Juventud '02', // La Habana - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CvSubdivisionCode.php b/library/Rules/SubdivisionCode/CvSubdivisionCode.php index aea204cd..83288ff0 100644 --- a/library/Rules/SubdivisionCode/CvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CvSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'B', // Ilhas de Barlavento 'S', // Ilhas de Sotavento 'BR', // Brava @@ -47,7 +47,7 @@ class CvSubdivisionCode extends AbstractSearcher 'SV', // Sao Vicente 'TA', // Tarrafal 'TS', // Tarrafal de São Nicolau - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CwSubdivisionCode.php b/library/Rules/SubdivisionCode/CwSubdivisionCode.php index 04711230..883a0832 100644 --- a/library/Rules/SubdivisionCode/CwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CwSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CxSubdivisionCode.php b/library/Rules/SubdivisionCode/CxSubdivisionCode.php index 7a0ebab2..d1536e29 100644 --- a/library/Rules/SubdivisionCode/CxSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CxSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CxSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CySubdivisionCode.php b/library/Rules/SubdivisionCode/CySubdivisionCode.php index 0dac2748..679a8fac 100644 --- a/library/Rules/SubdivisionCode/CySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CySubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Lefkosía '02', // Lemesós '03', // Lárnaka '04', // Ammóchostos '05', // Páfos '06', // Kerýneia - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/CzSubdivisionCode.php b/library/Rules/SubdivisionCode/CzSubdivisionCode.php index f9b9a105..da343832 100644 --- a/library/Rules/SubdivisionCode/CzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/CzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class CzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'JC', // South Bohemian Region (Jihocesky kraj) 'JM', // South Moravian Region (Jihomoravsky kraj) 'KA', // Carlsbad Region (Karlovarsky kraj) @@ -128,7 +128,7 @@ class CzSubdivisionCode extends AbstractSearcher '804', // Nový Jičín '805', // Opava '806', // Ostrava - město - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DeSubdivisionCode.php b/library/Rules/SubdivisionCode/DeSubdivisionCode.php index ecff5930..f800ad9e 100644 --- a/library/Rules/SubdivisionCode/DeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BB', // Brandenburg 'BE', // Berlin 'BW', // Baden-Württemberg @@ -39,7 +39,7 @@ class DeSubdivisionCode extends AbstractSearcher 'SN', // Sachsen 'ST', // Sachsen-Anhalt 'TH', // Thüringen - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DjSubdivisionCode.php b/library/Rules/SubdivisionCode/DjSubdivisionCode.php index 36d48d2b..6d489fd7 100644 --- a/library/Rules/SubdivisionCode/DjSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DjSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DjSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AR', // Arta 'AS', // 'Ali Sabih 'DI', // Dikhil 'DJ', // Djibouti 'OB', // Obock 'TA', // Tadjoura - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DkSubdivisionCode.php b/library/Rules/SubdivisionCode/DkSubdivisionCode.php index 8b20cdfe..0a1fd377 100644 --- a/library/Rules/SubdivisionCode/DkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DkSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '81', // Region Nordjylland '82', // Region Midtjylland '83', // Region Syddanmark '84', // Region Hovedstaden '85', // Region Sjæland - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DmSubdivisionCode.php b/library/Rules/SubdivisionCode/DmSubdivisionCode.php index 8caec994..df4ca22b 100644 --- a/library/Rules/SubdivisionCode/DmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '02', // Saint Andrew Parish '03', // Saint David Parish '04', // Saint George Parish @@ -33,7 +33,7 @@ class DmSubdivisionCode extends AbstractSearcher '09', // Saint Patrick Parish '10', // Saint Paul Parish '11', // Saint Peter Parish - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DoSubdivisionCode.php b/library/Rules/SubdivisionCode/DoSubdivisionCode.php index 2202133a..437f5dec 100644 --- a/library/Rules/SubdivisionCode/DoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Distrito Nacional '02', // Azua '03', // Baoruco @@ -53,7 +53,7 @@ class DoSubdivisionCode extends AbstractSearcher '28', // Monsenor Nouel '29', // Monte Plata '30', // Hato Mayor - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/DzSubdivisionCode.php b/library/Rules/SubdivisionCode/DzSubdivisionCode.php index 39978e3e..2d5d9f88 100644 --- a/library/Rules/SubdivisionCode/DzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/DzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class DzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Adrar '02', // Chlef '03', // Laghouat @@ -71,7 +71,7 @@ class DzSubdivisionCode extends AbstractSearcher '46', // Ain Temouchent '47', // Ghardaia '48', // Relizane - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EcSubdivisionCode.php b/library/Rules/SubdivisionCode/EcSubdivisionCode.php index e56a7497..b38a65cc 100644 --- a/library/Rules/SubdivisionCode/EcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EcSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Azuay 'B', // Bolivar 'C', // Carchi @@ -47,7 +47,7 @@ class EcSubdivisionCode extends AbstractSearcher 'X', // Cotopaxi 'Y', // Pastaza 'Z', // Zamora-Chinchipe - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EeSubdivisionCode.php b/library/Rules/SubdivisionCode/EeSubdivisionCode.php index 99342625..1e4177db 100644 --- a/library/Rules/SubdivisionCode/EeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '37', // Harju County '39', // Hiiu County '44', // Ida-Viru County @@ -38,7 +38,7 @@ class EeSubdivisionCode extends AbstractSearcher '82', // Valga County '84', // Viljandi County '86', // Võru County - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EgSubdivisionCode.php b/library/Rules/SubdivisionCode/EgSubdivisionCode.php index ffd7a51b..452b1da9 100644 --- a/library/Rules/SubdivisionCode/EgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'ALX', // Al Iskandariyah 'ASN', // Aswan 'AST', // Asyut @@ -52,7 +52,7 @@ class EgSubdivisionCode extends AbstractSearcher 'WAD', // Al Wadi al Jadid 'HU', // Helwan 'SU', // As Sādis min Uktūbar - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EhSubdivisionCode.php b/library/Rules/SubdivisionCode/EhSubdivisionCode.php index 785b33a0..fb0f7cd7 100644 --- a/library/Rules/SubdivisionCode/EhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EhSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EhSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ErSubdivisionCode.php b/library/Rules/SubdivisionCode/ErSubdivisionCode.php index 83f17748..20a5b952 100644 --- a/library/Rules/SubdivisionCode/ErSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ErSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ErSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Anseba (Keren) 'DK', // Southern Red Sea (Debub-Keih-Bahri) 'DU', // Southern (Debub) 'GB', // Gash-Barka (Barentu) 'MA', // Central (Maekel) 'SK', // Northern Red Sea (Semien-Keih-Bahri) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EsSubdivisionCode.php b/library/Rules/SubdivisionCode/EsSubdivisionCode.php index f2b71f12..8f5f03ee 100644 --- a/library/Rules/SubdivisionCode/EsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Comunidad Autónoma de Andalucía 'AR', // Comunidad Autónoma de Aragón 'AS', // Comunidad Autónoma del Principado de Asturias @@ -92,7 +92,7 @@ class EsSubdivisionCode extends AbstractSearcher 'VI', // Álava 'Z', // Zaragoza 'ZA', // Zamora - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/EtSubdivisionCode.php b/library/Rules/SubdivisionCode/EtSubdivisionCode.php index 0aa41827..e8679677 100644 --- a/library/Rules/SubdivisionCode/EtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/EtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class EtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AA', // Addis Ababa 'AF', // Afar 'AM', // Amhara @@ -34,7 +34,7 @@ class EtSubdivisionCode extends AbstractSearcher 'SN', // Southern Nations - Nationalities and Peoples Region 'SO', // Somali 'TI', // Tigray - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FiSubdivisionCode.php b/library/Rules/SubdivisionCode/FiSubdivisionCode.php index dee9e037..87655533 100644 --- a/library/Rules/SubdivisionCode/FiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Ahvenanmaa [Finnish] / Åland [Swedish] '02', // Etelä-Karjala [Finnish] / Södra Karelen [Swedish] '03', // Etelä-Pohjanmaa [Finnish] / Södra Österbotten [Swedish] @@ -48,7 +48,7 @@ class FiSubdivisionCode extends AbstractSearcher 'LL', // Lapin laani 'LS', // Lansi-Suomen laani 'OL', // Oulun laani - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FjSubdivisionCode.php b/library/Rules/SubdivisionCode/FjSubdivisionCode.php index ed02cfdb..4fd9a6bf 100644 --- a/library/Rules/SubdivisionCode/FjSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FjSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FjSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Central Division 'E', // Eastern Division 'N', // Northern Division 'R', // Rotuma 'W', // Western Division - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FkSubdivisionCode.php b/library/Rules/SubdivisionCode/FkSubdivisionCode.php index fee1aa20..4cd525d4 100644 --- a/library/Rules/SubdivisionCode/FkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FkSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FmSubdivisionCode.php b/library/Rules/SubdivisionCode/FmSubdivisionCode.php index a4292e79..6bb26367 100644 --- a/library/Rules/SubdivisionCode/FmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FmSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'KSA', // Kosrae 'PNI', // Pohnpei 'TRK', // Chuuk 'YAP', // Yap - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FoSubdivisionCode.php b/library/Rules/SubdivisionCode/FoSubdivisionCode.php index 97f70864..8fe6df18 100644 --- a/library/Rules/SubdivisionCode/FoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FoSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/FrSubdivisionCode.php b/library/Rules/SubdivisionCode/FrSubdivisionCode.php index c8e9c4ff..7a34946c 100644 --- a/library/Rules/SubdivisionCode/FrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/FrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class FrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Alsace 'B', // Aquitaine 'C', // Auvergne @@ -150,7 +150,7 @@ class FrSubdivisionCode extends AbstractSearcher 'TF', // Terres Australes Françaises (see also separate ISO 3166-1 entry under TF) 'WF', // Wallis et Futuna (see also separate ISO 3166-1 entry under WF) 'YT', // Mayotte (see also separate ISO 3166-1 entry under YT) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GaSubdivisionCode.php b/library/Rules/SubdivisionCode/GaSubdivisionCode.php index 6687817c..9eddfc47 100644 --- a/library/Rules/SubdivisionCode/GaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Estuaire '2', // Haut-Ogooue '3', // Moyen-Ogooue @@ -32,7 +32,7 @@ class GaSubdivisionCode extends AbstractSearcher '7', // Ogooue-Lolo '8', // Ogooue-Maritime '9', // Woleu-Ntem - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GbSubdivisionCode.php b/library/Rules/SubdivisionCode/GbSubdivisionCode.php index 02785dcd..1ef0bad6 100644 --- a/library/Rules/SubdivisionCode/GbSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GbSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GbSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'ENG', // England 'NIR', // Northern Ireland 'SCT', // Scotland @@ -260,7 +260,7 @@ class GbSubdivisionCode extends AbstractSearcher 'ZET', // Shetland Islands 'BDF', // Bedfordshire 'CHS', // Cheshire - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GdSubdivisionCode.php b/library/Rules/SubdivisionCode/GdSubdivisionCode.php index c8cc6376..e8272a81 100644 --- a/library/Rules/SubdivisionCode/GdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Saint Andrew '02', // Saint David '03', // Saint George @@ -30,7 +30,7 @@ class GdSubdivisionCode extends AbstractSearcher '05', // Saint Mark '06', // Saint Patrick '10', // Southern Grenadine Islands - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GeSubdivisionCode.php b/library/Rules/SubdivisionCode/GeSubdivisionCode.php index 50c0d07b..6ab737fc 100644 --- a/library/Rules/SubdivisionCode/GeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Abkhazia 'AJ', // Ajaria 'GU', // Guria @@ -35,7 +35,7 @@ class GeSubdivisionCode extends AbstractSearcher 'SK', // Shida Kartli 'SZ', // Samegrelo-Zemo Svaneti 'TB', // Tbilisi - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GfSubdivisionCode.php b/library/Rules/SubdivisionCode/GfSubdivisionCode.php index 42b602f8..4e0ea666 100644 --- a/library/Rules/SubdivisionCode/GfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GfSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GgSubdivisionCode.php b/library/Rules/SubdivisionCode/GgSubdivisionCode.php index 2b15839e..5d9e8d5c 100644 --- a/library/Rules/SubdivisionCode/GgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GgSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GhSubdivisionCode.php b/library/Rules/SubdivisionCode/GhSubdivisionCode.php index ca1fe296..d6a06d88 100644 --- a/library/Rules/SubdivisionCode/GhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GhSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GhSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AA', // Greater Accra Region 'AH', // Ashanti Region 'BA', // Brong-Ahafo Region @@ -33,7 +33,7 @@ class GhSubdivisionCode extends AbstractSearcher 'UE', // Upper East Region 'UW', // Upper West Region 'WP', // Western Region - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GiSubdivisionCode.php b/library/Rules/SubdivisionCode/GiSubdivisionCode.php index 909a7bf8..5d7d877c 100644 --- a/library/Rules/SubdivisionCode/GiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GiSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GlSubdivisionCode.php b/library/Rules/SubdivisionCode/GlSubdivisionCode.php index 3cdcc134..71f96585 100644 --- a/library/Rules/SubdivisionCode/GlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GlSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'KU', // Kujalleq 'QA', // Qaasuitsup 'QE', // Qeqqata 'SM', // Sermersooq - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GmSubdivisionCode.php b/library/Rules/SubdivisionCode/GmSubdivisionCode.php index 941db36c..318959e9 100644 --- a/library/Rules/SubdivisionCode/GmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GmSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'B', // Banjul 'L', // Lower River 'M', // Central River 'N', // North Bank 'U', // Upper River 'W', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GnSubdivisionCode.php b/library/Rules/SubdivisionCode/GnSubdivisionCode.php index e4d0f33e..42a197c7 100644 --- a/library/Rules/SubdivisionCode/GnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'B', // Boké 'C', // Conakry 'D', // Kindia @@ -64,7 +64,7 @@ class GnSubdivisionCode extends AbstractSearcher 'TE', // Telimele 'TO', // Tougue 'YO', // Yomou - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GpSubdivisionCode.php b/library/Rules/SubdivisionCode/GpSubdivisionCode.php index 60b01fa1..16c15e00 100644 --- a/library/Rules/SubdivisionCode/GpSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GpSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GpSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GqSubdivisionCode.php b/library/Rules/SubdivisionCode/GqSubdivisionCode.php index d2d170a5..452bb732 100644 --- a/library/Rules/SubdivisionCode/GqSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GqSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GqSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Región Continental 'I', // Región Insular 'AN', // Provincia Annobon @@ -32,7 +32,7 @@ class GqSubdivisionCode extends AbstractSearcher 'KN', // Provincia Kie-Ntem 'LI', // Provincia Litoral 'WN', // Provincia Wele-Nzas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GrSubdivisionCode.php b/library/Rules/SubdivisionCode/GrSubdivisionCode.php index f639d990..cf4ac022 100644 --- a/library/Rules/SubdivisionCode/GrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '69', // Agio Oros 'A', // Anatoliki Makedonia kai Thraki 'B', // Kentriki Makedonia @@ -88,7 +88,7 @@ class GrSubdivisionCode extends AbstractSearcher '93', // Nomós Rethýmnis '94', // Nomós Chaniás 'A1', // Nomós Attikís - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GsSubdivisionCode.php b/library/Rules/SubdivisionCode/GsSubdivisionCode.php index 2c8d99a8..d2f4c68f 100644 --- a/library/Rules/SubdivisionCode/GsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GsSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GtSubdivisionCode.php b/library/Rules/SubdivisionCode/GtSubdivisionCode.php index b17a9d14..1507027a 100644 --- a/library/Rules/SubdivisionCode/GtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AV', // Alta Verapaz 'BV', // Baja Verapaz 'CM', // Chimaltenango @@ -45,7 +45,7 @@ class GtSubdivisionCode extends AbstractSearcher 'SU', // Suchitepequez 'TO', // Totonicapan 'ZA', // Zacapa - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GuSubdivisionCode.php b/library/Rules/SubdivisionCode/GuSubdivisionCode.php index 37acab2c..ecf777e1 100644 --- a/library/Rules/SubdivisionCode/GuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GuSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GwSubdivisionCode.php b/library/Rules/SubdivisionCode/GwSubdivisionCode.php index ce066ad3..146900d9 100644 --- a/library/Rules/SubdivisionCode/GwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'L', // Leste 'N', // Norte 'S', // Sul @@ -35,7 +35,7 @@ class GwSubdivisionCode extends AbstractSearcher 'OI', // Oio Region 'QU', // Quinara Region 'TO', // Tombali Region - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/GySubdivisionCode.php b/library/Rules/SubdivisionCode/GySubdivisionCode.php index 6b5bb3c2..2ce6929f 100644 --- a/library/Rules/SubdivisionCode/GySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/GySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class GySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Barima-Waini 'CU', // Cuyuni-Mazaruni 'DE', // Demerara-Mahaica @@ -33,7 +33,7 @@ class GySubdivisionCode extends AbstractSearcher 'PT', // Potaro-Siparuni 'UD', // Upper Demerara-Berbice 'UT', // Upper Takutu-Upper Essequibo - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HkSubdivisionCode.php b/library/Rules/SubdivisionCode/HkSubdivisionCode.php index 5ae0f553..41830d4c 100644 --- a/library/Rules/SubdivisionCode/HkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'HCW', // Central and Western Hong Kong Island 'HEA', // Eastern Hong Kong Island 'HSO', // Southern Hong Kong Island @@ -41,7 +41,7 @@ class HkSubdivisionCode extends AbstractSearcher 'NTP', // Tai Po New Territories 'NTW', // Tsuen Wan New Territories 'NYL', // Yuen Long New Territories - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HmSubdivisionCode.php b/library/Rules/SubdivisionCode/HmSubdivisionCode.php index 392cc361..d29c7e16 100644 --- a/library/Rules/SubdivisionCode/HmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HmSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'F', // Flat Island 'H', // Heard Island 'M', // McDonald Island 'S', // Shag Island - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HnSubdivisionCode.php b/library/Rules/SubdivisionCode/HnSubdivisionCode.php index 766e36eb..d714a493 100644 --- a/library/Rules/SubdivisionCode/HnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AT', // Atlantida 'CH', // Choluteca 'CL', // Colon @@ -41,7 +41,7 @@ class HnSubdivisionCode extends AbstractSearcher 'SB', // Santa Barbara 'VA', // Valle 'YO', // Yoro - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HrSubdivisionCode.php b/library/Rules/SubdivisionCode/HrSubdivisionCode.php index 711b08f6..884768ac 100644 --- a/library/Rules/SubdivisionCode/HrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Zagreb county '02', // Krapina-Zagorje county '03', // Sisak-Moslavina county @@ -44,7 +44,7 @@ class HrSubdivisionCode extends AbstractSearcher '19', // Dubrovnik-Neretva county '20', // Medjimurje county '21', // Zagreb (city) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HtSubdivisionCode.php b/library/Rules/SubdivisionCode/HtSubdivisionCode.php index b4eb389a..b4ceed79 100644 --- a/library/Rules/SubdivisionCode/HtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AR', // Artibonite 'CE', // Centre 'GA', // Grand'Anse @@ -32,7 +32,7 @@ class HtSubdivisionCode extends AbstractSearcher 'OU', // Ouest 'SD', // Sud 'SE', // Sud-Est - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/HuSubdivisionCode.php b/library/Rules/SubdivisionCode/HuSubdivisionCode.php index f4c60a98..f3909546 100644 --- a/library/Rules/SubdivisionCode/HuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/HuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class HuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Baranya megye 'BC', // Békéscsaba 'BE', // Békés megye @@ -66,7 +66,7 @@ class HuSubdivisionCode extends AbstractSearcher 'VM', // Veszprém 'ZA', // Zala megye 'ZE', // Zalaegerszeg - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IdSubdivisionCode.php b/library/Rules/SubdivisionCode/IdSubdivisionCode.php index 9a13cefd..a3e29c9e 100644 --- a/library/Rules/SubdivisionCode/IdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'IJ', // Papua 'JW', // Java 'KA', // Kalimantan @@ -64,7 +64,7 @@ class IdSubdivisionCode extends AbstractSearcher 'ST', // Sulawesi Tengah 'SU', // Sumatera Utara 'YO', // Yogyakarta - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IeSubdivisionCode.php b/library/Rules/SubdivisionCode/IeSubdivisionCode.php index 79d7a2eb..7043dabe 100644 --- a/library/Rules/SubdivisionCode/IeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Connaught 'L', // Leinster 'M', // Munster @@ -53,7 +53,7 @@ class IeSubdivisionCode extends AbstractSearcher 'WH', // Westmeath 'WW', // Wicklow 'WX', // Wexford - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IlSubdivisionCode.php b/library/Rules/SubdivisionCode/IlSubdivisionCode.php index f86d745d..4728f948 100644 --- a/library/Rules/SubdivisionCode/IlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IlSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'D', // Southern 'HA', // Haifa 'JM', // Jerusalem 'M', // Central 'TA', // Tel Aviv 'Z', // Northern - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ImSubdivisionCode.php b/library/Rules/SubdivisionCode/ImSubdivisionCode.php index 614ee36a..1530f887 100644 --- a/library/Rules/SubdivisionCode/ImSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ImSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ImSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/InSubdivisionCode.php b/library/Rules/SubdivisionCode/InSubdivisionCode.php index 7600bd1b..60ae3400 100644 --- a/library/Rules/SubdivisionCode/InSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/InSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class InSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Andaman and Nicobar Islands 'AP', // Andhra Pradesh 'AR', // Arunachal Pradesh @@ -58,7 +58,7 @@ class InSubdivisionCode extends AbstractSearcher 'UL', // Uttaranchal 'UP', // Uttar Pradesh 'WB', // West Bengal - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IoSubdivisionCode.php b/library/Rules/SubdivisionCode/IoSubdivisionCode.php index bdf14277..2530c4dd 100644 --- a/library/Rules/SubdivisionCode/IoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DG', // Diego Garcia 'DI', // Danger Island 'EA', // Eagle Islands @@ -31,7 +31,7 @@ class IoSubdivisionCode extends AbstractSearcher 'PB', // Peros Banhos 'SI', // Salomon Islands 'TB', // Three Brothers - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IqSubdivisionCode.php b/library/Rules/SubdivisionCode/IqSubdivisionCode.php index 8d560452..ef2cc193 100644 --- a/library/Rules/SubdivisionCode/IqSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IqSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IqSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Al Anbar 'AR', // Arbīl 'BA', // Al Basrah @@ -41,7 +41,7 @@ class IqSubdivisionCode extends AbstractSearcher 'SU', // As Sulaymānīyah 'TS', // Kirkūk 'WA', // Wasit - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IrSubdivisionCode.php b/library/Rules/SubdivisionCode/IrSubdivisionCode.php index a16eb796..bee26aff 100644 --- a/library/Rules/SubdivisionCode/IrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // East Azarbaijan '02', // West Azarbaijan '03', // Ardabil @@ -54,7 +54,7 @@ class IrSubdivisionCode extends AbstractSearcher '30', // Razavi Khorasan '31', // North Khorasan '09', // Khorāsān - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/IsSubdivisionCode.php b/library/Rules/SubdivisionCode/IsSubdivisionCode.php index 29f733d3..7c736c0b 100644 --- a/library/Rules/SubdivisionCode/IsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/IsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class IsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Höfuðborgarsvæði '2', // Suðurnes '3', // Vesturland @@ -31,7 +31,7 @@ class IsSubdivisionCode extends AbstractSearcher '6', // Norðurland Eystra '7', // Austurland '8', // Suðurland - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ItSubdivisionCode.php b/library/Rules/SubdivisionCode/ItSubdivisionCode.php index 5f004d48..fa624a5f 100644 --- a/library/Rules/SubdivisionCode/ItSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ItSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ItSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '21', // Piedmont '23', // Regione Autonoma Valle d'Aosta '25', // Lombardy @@ -153,7 +153,7 @@ class ItSubdivisionCode extends AbstractSearcher 'VS', // Medio Campidano 'VT', // Viterbo 'VV', // Vibo Valentia - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/JeSubdivisionCode.php b/library/Rules/SubdivisionCode/JeSubdivisionCode.php index c85881d2..a18d79cf 100644 --- a/library/Rules/SubdivisionCode/JeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/JeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class JeSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/JmSubdivisionCode.php b/library/Rules/SubdivisionCode/JmSubdivisionCode.php index 5f53aacf..806e54ab 100644 --- a/library/Rules/SubdivisionCode/JmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/JmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class JmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Kingston Parish '02', // Saint Andrew Parish '03', // Saint Thomas Parish @@ -37,7 +37,7 @@ class JmSubdivisionCode extends AbstractSearcher '12', // Manchester Parish '13', // Clarendon Parish '14', // Saint Catherine Parish - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/JoSubdivisionCode.php b/library/Rules/SubdivisionCode/JoSubdivisionCode.php index 78b4e74a..76147cfb 100644 --- a/library/Rules/SubdivisionCode/JoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/JoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class JoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AJ', // Ajlun 'AM', // 'Amman 'AQ', // Al 'Aqabah @@ -35,7 +35,7 @@ class JoSubdivisionCode extends AbstractSearcher 'MA', // Al Mafraq 'MD', // Madaba 'MN', // Ma'an - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/JpSubdivisionCode.php b/library/Rules/SubdivisionCode/JpSubdivisionCode.php index 0b6bbd24..75c65629 100644 --- a/library/Rules/SubdivisionCode/JpSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/JpSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class JpSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Hokkaidō '02', // Aomori '03', // Iwate @@ -70,7 +70,7 @@ class JpSubdivisionCode extends AbstractSearcher '45', // Miyazaki '46', // Kagosima (Kagoshima) '47', // Okinawa - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KeSubdivisionCode.php b/library/Rules/SubdivisionCode/KeSubdivisionCode.php index 1c854354..418f8c1e 100644 --- a/library/Rules/SubdivisionCode/KeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '110', // Nairobi Area '200', // Central '300', // Coast @@ -31,7 +31,7 @@ class KeSubdivisionCode extends AbstractSearcher '600', // Nyanza '700', // Rift Valley '800', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KgSubdivisionCode.php b/library/Rules/SubdivisionCode/KgSubdivisionCode.php index 0d2ba007..aaf78704 100644 --- a/library/Rules/SubdivisionCode/KgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'B', // Batken 'C', // Chu 'GB', // Bishkek @@ -32,7 +32,7 @@ class KgSubdivisionCode extends AbstractSearcher 'O', // Osh 'T', // Talas 'Y', // Ysyk-Kol - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KhSubdivisionCode.php b/library/Rules/SubdivisionCode/KhSubdivisionCode.php index a48ebd60..22b20496 100644 --- a/library/Rules/SubdivisionCode/KhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KhSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KhSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Banteay Mean Choay '10', // Kratie '11', // Mondul Kiri @@ -47,7 +47,7 @@ class KhSubdivisionCode extends AbstractSearcher '7', // Kampot '8', // Kandal '9', // Kaoh Kong - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KiSubdivisionCode.php b/library/Rules/SubdivisionCode/KiSubdivisionCode.php index ccdfa463..85fe0dd5 100644 --- a/library/Rules/SubdivisionCode/KiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KiSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'G', // Gilbert Islands 'L', // Line Islands 'P', // Phoenix Islands - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KmSubdivisionCode.php b/library/Rules/SubdivisionCode/KmSubdivisionCode.php index a89ba5e4..f3303aff 100644 --- a/library/Rules/SubdivisionCode/KmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KmSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Anjouan 'G', // Grande Comore 'M', // Moheli - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KnSubdivisionCode.php b/library/Rules/SubdivisionCode/KnSubdivisionCode.php index 45382cc9..de4be2da 100644 --- a/library/Rules/SubdivisionCode/KnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'K', // Saint Kitts 'N', // Nevis '01', // Christ Church Nichola Town @@ -39,7 +39,7 @@ class KnSubdivisionCode extends AbstractSearcher '12', // Saint Thomas Lowland '13', // Saint Thomas Middle Island '15', // Trinity Palmetto Point - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KpSubdivisionCode.php b/library/Rules/SubdivisionCode/KpSubdivisionCode.php index 9077ea3c..0338b902 100644 --- a/library/Rules/SubdivisionCode/KpSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KpSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KpSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // P'yongyang Special City '02', // P'yongan-namdo '03', // P'yongan-bukto @@ -34,7 +34,7 @@ class KpSubdivisionCode extends AbstractSearcher '09', // Hamgyong-bukto '10', // Ryanggang-do (Yanggang-do) '13', // Nasŏn (Najin-Sŏnbong) - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KrSubdivisionCode.php b/library/Rules/SubdivisionCode/KrSubdivisionCode.php index 94edc146..d76cf623 100644 --- a/library/Rules/SubdivisionCode/KrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '11', // Seoul Special City '26', // Busan Metropolitan City '27', // Daegu Metropolitan City @@ -39,7 +39,7 @@ class KrSubdivisionCode extends AbstractSearcher '47', // Gyeongsangbuk-do '48', // Gyeongsangnam-do '49', // Jeju-do - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KwSubdivisionCode.php b/library/Rules/SubdivisionCode/KwSubdivisionCode.php index 64b21784..cd68bb91 100644 --- a/library/Rules/SubdivisionCode/KwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KwSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AH', // Al Ahmadi 'FA', // Al Farwaniyah 'HA', // Hawalli 'JA', // Al Jahra 'KU', // Al Asimah 'MU', // Mubārak al Kabīr - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KySubdivisionCode.php b/library/Rules/SubdivisionCode/KySubdivisionCode.php index 8b28a776..998d3b2f 100644 --- a/library/Rules/SubdivisionCode/KySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CR', // Creek 'EA', // Eastern 'ML', // Midland @@ -31,7 +31,7 @@ class KySubdivisionCode extends AbstractSearcher 'ST', // South Town 'WD', // West End 'WN', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/KzSubdivisionCode.php b/library/Rules/SubdivisionCode/KzSubdivisionCode.php index b168796c..6f1daacc 100644 --- a/library/Rules/SubdivisionCode/KzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/KzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class KzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AKM', // Aqmola 'AKT', // Aqtobe 'ALA', // Almaty @@ -40,7 +40,7 @@ class KzSubdivisionCode extends AbstractSearcher 'YUZ', // Ongtustik Qazaqstan 'ZAP', // Baty Qazaqstan 'ZHA', // Zhambyl - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LaSubdivisionCode.php b/library/Rules/SubdivisionCode/LaSubdivisionCode.php index 51af30e9..7f875bae 100644 --- a/library/Rules/SubdivisionCode/LaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AT', // Attapu 'BK', // Bokeo 'BL', // Bolikhamxai @@ -41,7 +41,7 @@ class LaSubdivisionCode extends AbstractSearcher 'XE', // Xekong 'XI', // Xiangkhoang 'XN', // Xaisomboun - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LbSubdivisionCode.php b/library/Rules/SubdivisionCode/LbSubdivisionCode.php index 9e466692..59cc3c4b 100644 --- a/library/Rules/SubdivisionCode/LbSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LbSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LbSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AK', // Aakkâr 'AS', // Liban-Nord 'BA', // Beyrouth @@ -31,7 +31,7 @@ class LbSubdivisionCode extends AbstractSearcher 'JA', // Liban-Sud 'JL', // Mont-Liban 'NA', // Nabatîyé - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LcSubdivisionCode.php b/library/Rules/SubdivisionCode/LcSubdivisionCode.php index 3de67237..9204c525 100644 --- a/library/Rules/SubdivisionCode/LcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LcSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AR', // Anse-la-Raye 'CA', // Castries 'CH', // Choiseul @@ -34,7 +34,7 @@ class LcSubdivisionCode extends AbstractSearcher 'PR', // Praslin 'SO', // Soufriere 'VF', // Vieux-Fort - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LiSubdivisionCode.php b/library/Rules/SubdivisionCode/LiSubdivisionCode.php index 283505fa..b8109914 100644 --- a/library/Rules/SubdivisionCode/LiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Balzers '02', // Eschen '03', // Gamprin @@ -34,7 +34,7 @@ class LiSubdivisionCode extends AbstractSearcher '09', // Triesen '10', // Triesenberg '11', // Vaduz - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LkSubdivisionCode.php b/library/Rules/SubdivisionCode/LkSubdivisionCode.php index a83ef99c..dfedf890 100644 --- a/library/Rules/SubdivisionCode/LkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Western '2', // Central '3', // Southern @@ -57,7 +57,7 @@ class LkSubdivisionCode extends AbstractSearcher '82', // Mŏṇarāgala '91', // Ratnapura '92', // Kægalla - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LrSubdivisionCode.php b/library/Rules/SubdivisionCode/LrSubdivisionCode.php index ec381a58..530cd096 100644 --- a/library/Rules/SubdivisionCode/LrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BG', // Bong 'BM', // Bomi 'CM', // Grand Cape Mount @@ -36,7 +36,7 @@ class LrSubdivisionCode extends AbstractSearcher 'NI', // Nimba 'RI', // River Cess 'SI', // Sinoe - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LsSubdivisionCode.php b/library/Rules/SubdivisionCode/LsSubdivisionCode.php index 384abf50..23f5a2af 100644 --- a/library/Rules/SubdivisionCode/LsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Maseru 'B', // Butha-Buthe 'C', // Leribe @@ -33,7 +33,7 @@ class LsSubdivisionCode extends AbstractSearcher 'H', // Qacha's Nek 'J', // Mokhotlong 'K', // Thaba-Tseka - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LtSubdivisionCode.php b/library/Rules/SubdivisionCode/LtSubdivisionCode.php index 6e4cede9..21a2e2b5 100644 --- a/library/Rules/SubdivisionCode/LtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AL', // Alytus 'KL', // Klaipeda 'KU', // Kaunas @@ -33,7 +33,7 @@ class LtSubdivisionCode extends AbstractSearcher 'TE', // Telsiai 'UT', // Utena 'VL', // Vilnius - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LuSubdivisionCode.php b/library/Rules/SubdivisionCode/LuSubdivisionCode.php index 326a0f2d..86b18b78 100644 --- a/library/Rules/SubdivisionCode/LuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LuSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'D', // Diekirch 'G', // Grevenmacher 'L', // Luxembourg - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LvSubdivisionCode.php b/library/Rules/SubdivisionCode/LvSubdivisionCode.php index 74bc685b..16b413c0 100644 --- a/library/Rules/SubdivisionCode/LvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LvSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '001', // Aglonas Novads '002', // Aizkraukles Novads '003', // Aizputes Novads @@ -142,7 +142,7 @@ class LvSubdivisionCode extends AbstractSearcher 'RIX', // Riga 'VEN', // Ventspils 'VMR', // Valmiera - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/LySubdivisionCode.php b/library/Rules/SubdivisionCode/LySubdivisionCode.php index 41224ee8..ab5951dd 100644 --- a/library/Rules/SubdivisionCode/LySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/LySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class LySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Banghazi 'BU', // Al Buţnān 'DR', // Darnah @@ -45,7 +45,7 @@ class LySubdivisionCode extends AbstractSearcher 'WD', // Wādī al Ḩayāt 'WS', // Wādī ash Shāţi´ 'ZA', // Az Zawiyah - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MaSubdivisionCode.php b/library/Rules/SubdivisionCode/MaSubdivisionCode.php index e37955d1..28155d07 100644 --- a/library/Rules/SubdivisionCode/MaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Tanger-Tétouan '02', // Gharb-Chrarda-Beni Hssen '03', // Taza-Al Hoceima-Taounate @@ -102,7 +102,7 @@ class MaSubdivisionCode extends AbstractSearcher 'TNG', // Tanger-Assilah 'TNT', // Tan-Tan 'ZAG', // Zagora - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/McSubdivisionCode.php b/library/Rules/SubdivisionCode/McSubdivisionCode.php index d4dd031e..98ae794a 100644 --- a/library/Rules/SubdivisionCode/McSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/McSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class McSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CL', // La Colle 'CO', // La Condamine 'FO', // Fontvieille @@ -40,7 +40,7 @@ class McSubdivisionCode extends AbstractSearcher 'SP', // Spélugues 'SR', // Saint-Roman 'VR', // Vallon de la Rousse - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MdSubdivisionCode.php b/library/Rules/SubdivisionCode/MdSubdivisionCode.php index 305369bc..8bb28f1b 100644 --- a/library/Rules/SubdivisionCode/MdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Raionul Anenii Noi 'BA', // Municipiul Bălţi 'BD', // Tighina @@ -60,7 +60,7 @@ class MdSubdivisionCode extends AbstractSearcher 'TA', // Raionul Taraclia 'TE', // Teleneşti 'UN', // Raionul Ungheni - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MeSubdivisionCode.php b/library/Rules/SubdivisionCode/MeSubdivisionCode.php index 6ef648b0..e08a495a 100644 --- a/library/Rules/SubdivisionCode/MeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Opština Andrijevica '02', // Opština Bar '03', // Opština Berane @@ -44,7 +44,7 @@ class MeSubdivisionCode extends AbstractSearcher '19', // Opština Tivat '20', // Opština Ulcinj '21', // Opština Žabljak - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MfSubdivisionCode.php b/library/Rules/SubdivisionCode/MfSubdivisionCode.php index ea9d5bd4..af014edf 100644 --- a/library/Rules/SubdivisionCode/MfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MfSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MgSubdivisionCode.php b/library/Rules/SubdivisionCode/MgSubdivisionCode.php index c25338b5..7c51c073 100644 --- a/library/Rules/SubdivisionCode/MgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MgSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Toamasina province 'D', // Antsiranana province 'F', // Fianarantsoa province 'M', // Mahajanga province 'T', // Antananarivo province 'U', // Toliara province - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MhSubdivisionCode.php b/library/Rules/SubdivisionCode/MhSubdivisionCode.php index 208f8707..07c55061 100644 --- a/library/Rules/SubdivisionCode/MhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MhSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MhSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'L', // Ralik chain 'T', // Ratak chain 'ALK', // Ailuk @@ -49,7 +49,7 @@ class MhSubdivisionCode extends AbstractSearcher 'UTI', // Utirik 'WTH', // Wotho 'WTJ', // Wotje - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MkSubdivisionCode.php b/library/Rules/SubdivisionCode/MkSubdivisionCode.php index 48bc9fb4..d365d60b 100644 --- a/library/Rules/SubdivisionCode/MkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Aerodrom † '02', // Aračinovo '03', // Berovo @@ -107,7 +107,7 @@ class MkSubdivisionCode extends AbstractSearcher '82', // Čučer Sandevo '83', // Sopište '84', // Staro Nagoričane - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MlSubdivisionCode.php b/library/Rules/SubdivisionCode/MlSubdivisionCode.php index ac06d4c2..598ec4f5 100644 --- a/library/Rules/SubdivisionCode/MlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Kayes '2', // Koulikoro '3', // Sikasso @@ -32,7 +32,7 @@ class MlSubdivisionCode extends AbstractSearcher '7', // Gao '8', // Kidal 'BKO', // Bamako Capital District - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MmSubdivisionCode.php b/library/Rules/SubdivisionCode/MmSubdivisionCode.php index 5319f9b2..276daa37 100644 --- a/library/Rules/SubdivisionCode/MmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Sagaing '02', // Bago '03', // Magway @@ -37,7 +37,7 @@ class MmSubdivisionCode extends AbstractSearcher '15', // Mon State '16', // Rakhine State '17', // Shan State - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MnSubdivisionCode.php b/library/Rules/SubdivisionCode/MnSubdivisionCode.php index 12c54c5e..c0cf304b 100644 --- a/library/Rules/SubdivisionCode/MnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '035', // Orhon '037', // Darhan uul '039', // Hentiy @@ -45,7 +45,7 @@ class MnSubdivisionCode extends AbstractSearcher '071', // Bayan-Olgiy '073', // Arhangay '1', // Ulanbaatar - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MoSubdivisionCode.php b/library/Rules/SubdivisionCode/MoSubdivisionCode.php index 92b743eb..898be4e9 100644 --- a/library/Rules/SubdivisionCode/MoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MoSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MpSubdivisionCode.php b/library/Rules/SubdivisionCode/MpSubdivisionCode.php index 13dff905..a25ea148 100644 --- a/library/Rules/SubdivisionCode/MpSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MpSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MpSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'N', // Northern Islands 'R', // Rota 'S', // Saipan 'T', // Tinian - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MqSubdivisionCode.php b/library/Rules/SubdivisionCode/MqSubdivisionCode.php index 6499c8c3..6ae5f098 100644 --- a/library/Rules/SubdivisionCode/MqSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MqSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MqSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MrSubdivisionCode.php b/library/Rules/SubdivisionCode/MrSubdivisionCode.php index b13b6b86..d93e5594 100644 --- a/library/Rules/SubdivisionCode/MrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Hodh Ech Chargui '02', // Hodh El Gharbi '03', // Assaba @@ -36,7 +36,7 @@ class MrSubdivisionCode extends AbstractSearcher '11', // Tiris Zemmour '12', // Inchiri 'NKC', // Nouakchott - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MsSubdivisionCode.php b/library/Rules/SubdivisionCode/MsSubdivisionCode.php index 8b72027d..ec34111b 100644 --- a/library/Rules/SubdivisionCode/MsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MsSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MtSubdivisionCode.php b/library/Rules/SubdivisionCode/MtSubdivisionCode.php index 41479321..75037b84 100644 --- a/library/Rules/SubdivisionCode/MtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Attard '02', // Balzan '03', // Birgu @@ -91,7 +91,7 @@ class MtSubdivisionCode extends AbstractSearcher '66', // Żebbuġ Malta '67', // Zejtun '68', // Zurrieq - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MuSubdivisionCode.php b/library/Rules/SubdivisionCode/MuSubdivisionCode.php index 6080e101..1aec7191 100644 --- a/library/Rules/SubdivisionCode/MuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AG', // Agalega Islands 'BL', // Black River 'BR', // Beau Bassin-Rose Hill @@ -40,7 +40,7 @@ class MuSubdivisionCode extends AbstractSearcher 'RR', // Riviere du Rempart 'SA', // Savanne 'VP', // Vacoas-Phoenix - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MvSubdivisionCode.php b/library/Rules/SubdivisionCode/MvSubdivisionCode.php index e73e2349..4a9b6b2b 100644 --- a/library/Rules/SubdivisionCode/MvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MvSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CE', // Medhu 'MLE', // Male 'NC', // Medhu Uthuru @@ -51,7 +51,7 @@ class MvSubdivisionCode extends AbstractSearcher '27', // Gaafu Alifu / Huvadhu Atholhu Uthuruburi '28', // Gaafu Dhaalu / Huvadhu Atholhu Dhekunuburi '29', // Gnaviyani / Fuvammulah - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MwSubdivisionCode.php b/library/Rules/SubdivisionCode/MwSubdivisionCode.php index 80e78cfc..bcb1d211 100644 --- a/library/Rules/SubdivisionCode/MwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Central 'N', // Northern 'S', // Southern @@ -54,7 +54,7 @@ class MwSubdivisionCode extends AbstractSearcher 'SA', // Salima 'TH', // Thyolo 'ZO', // Zomba - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MxSubdivisionCode.php b/library/Rules/SubdivisionCode/MxSubdivisionCode.php index 28884563..a2bfc47c 100644 --- a/library/Rules/SubdivisionCode/MxSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MxSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MxSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AGU', // Aguascalientes 'BCN', // Baja California 'BCS', // Baja California Sur @@ -55,7 +55,7 @@ class MxSubdivisionCode extends AbstractSearcher 'VER', // Veracruz 'YUC', // Yucatan 'ZAC', // Zacatecas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MySubdivisionCode.php b/library/Rules/SubdivisionCode/MySubdivisionCode.php index b5eb5da3..e37d1d74 100644 --- a/library/Rules/SubdivisionCode/MySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Johor '02', // Kedah '03', // Kelantan @@ -39,7 +39,7 @@ class MySubdivisionCode extends AbstractSearcher '14', // Kuala Lumpur '15', // Labuan '16', // Putrajaya - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/MzSubdivisionCode.php b/library/Rules/SubdivisionCode/MzSubdivisionCode.php index 90be0d44..dfbbcefb 100644 --- a/library/Rules/SubdivisionCode/MzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/MzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class MzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Niassa 'B', // Manica 'G', // Gaza @@ -34,7 +34,7 @@ class MzSubdivisionCode extends AbstractSearcher 'Q', // Zambezia 'S', // Sofala 'T', // Tete - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NaSubdivisionCode.php b/library/Rules/SubdivisionCode/NaSubdivisionCode.php index f2e62a91..fcbf4d84 100644 --- a/library/Rules/SubdivisionCode/NaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CA', // Caprivi 'ER', // Erongo 'HA', // Hardap @@ -36,7 +36,7 @@ class NaSubdivisionCode extends AbstractSearcher 'OT', // Oshikoto 'OW', // Ohangwena 'OK', // Kavango - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NcSubdivisionCode.php b/library/Rules/SubdivisionCode/NcSubdivisionCode.php index 7535a2b7..c52b9b7e 100644 --- a/library/Rules/SubdivisionCode/NcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NcSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'L', // Iles Loyaute 'N', // Nord 'S', // Sud - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NeSubdivisionCode.php b/library/Rules/SubdivisionCode/NeSubdivisionCode.php index 368fe3d2..2186b02d 100644 --- a/library/Rules/SubdivisionCode/NeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Agadez '2', // Diffa '3', // Dosso @@ -31,7 +31,7 @@ class NeSubdivisionCode extends AbstractSearcher '6', // Tillabéri '7', // Zinder '8', // Niamey - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NfSubdivisionCode.php b/library/Rules/SubdivisionCode/NfSubdivisionCode.php index 92b9cb1a..67275e50 100644 --- a/library/Rules/SubdivisionCode/NfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NfSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NgSubdivisionCode.php b/library/Rules/SubdivisionCode/NgSubdivisionCode.php index dcad91ec..dac3b9f7 100644 --- a/library/Rules/SubdivisionCode/NgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Abia 'AD', // Adamawa 'AK', // Akwa Ibom @@ -60,7 +60,7 @@ class NgSubdivisionCode extends AbstractSearcher 'TA', // Taraba 'YO', // Yobe 'ZA', // Zamfara - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NiSubdivisionCode.php b/library/Rules/SubdivisionCode/NiSubdivisionCode.php index 8f80fe2d..040c9b6b 100644 --- a/library/Rules/SubdivisionCode/NiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Region Autonoma del Atlantico Norte 'AS', // Region Autonoma del Atlantico Sur 'BO', // Boaco @@ -40,7 +40,7 @@ class NiSubdivisionCode extends AbstractSearcher 'NS', // Nueva Segovia 'RI', // Rivas 'SJ', // Rio San Juan - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NlSubdivisionCode.php b/library/Rules/SubdivisionCode/NlSubdivisionCode.php index 3da9a494..0979bab7 100644 --- a/library/Rules/SubdivisionCode/NlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DR', // Drenthe 'FL', // Flevoland 'FR', // Friesland @@ -35,7 +35,7 @@ class NlSubdivisionCode extends AbstractSearcher 'UT', // Utrecht 'ZE', // Zeeland 'ZH', // Zuid Holland - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NoSubdivisionCode.php b/library/Rules/SubdivisionCode/NoSubdivisionCode.php index 60b685de..1fb6bcc1 100644 --- a/library/Rules/SubdivisionCode/NoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Ostfold '02', // Akershus '03', // Oslo @@ -44,7 +44,7 @@ class NoSubdivisionCode extends AbstractSearcher '20', // Finnmark '21', // Svalbard '22', // Jan Mayen - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NpSubdivisionCode.php b/library/Rules/SubdivisionCode/NpSubdivisionCode.php index 465f597e..a0519e75 100644 --- a/library/Rules/SubdivisionCode/NpSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NpSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NpSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Madhyamanchal '2', // Madhya Pashchimanchal '3', // Pashchimanchal @@ -42,7 +42,7 @@ class NpSubdivisionCode extends AbstractSearcher 'RA', // Rapti 'SA', // Sagarmatha 'SE', // Seti - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NrSubdivisionCode.php b/library/Rules/SubdivisionCode/NrSubdivisionCode.php index 969ecd9f..652058a0 100644 --- a/library/Rules/SubdivisionCode/NrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Aiwo '02', // Anabar '03', // Anetan @@ -37,7 +37,7 @@ class NrSubdivisionCode extends AbstractSearcher '12', // Nibok '13', // Uaboe '14', // Yaren - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NuSubdivisionCode.php b/library/Rules/SubdivisionCode/NuSubdivisionCode.php index 58ed5196..e9572150 100644 --- a/library/Rules/SubdivisionCode/NuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NuSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/NzSubdivisionCode.php b/library/Rules/SubdivisionCode/NzSubdivisionCode.php index a26d1c2b..fe4912c1 100644 --- a/library/Rules/SubdivisionCode/NzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/NzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class NzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'N', // North Island 'S', // South Island 'AUK', // Auckland @@ -42,7 +42,7 @@ class NzSubdivisionCode extends AbstractSearcher 'WGN', // Wellington 'WKO', // Waikato 'WTC', // West Coast - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/OmSubdivisionCode.php b/library/Rules/SubdivisionCode/OmSubdivisionCode.php index 01fe1560..e859e2e0 100644 --- a/library/Rules/SubdivisionCode/OmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/OmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class OmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Al Batinah South 'BU', // Al Buraymī 'DA', // Ad Dakhiliyah @@ -32,7 +32,7 @@ class OmSubdivisionCode extends AbstractSearcher 'WU', // Al Wusta 'ZA', // Az Zahirah 'ZU', // Zufar - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PaSubdivisionCode.php b/library/Rules/SubdivisionCode/PaSubdivisionCode.php index 7212e09e..d6763112 100644 --- a/library/Rules/SubdivisionCode/PaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Bocas del Toro '2', // Cocle '3', // Colon @@ -35,7 +35,7 @@ class PaSubdivisionCode extends AbstractSearcher 'EM', // Comarca Emberá-Wounaan 'KY', // Comarca de Kuna Yala 'NB', // Ngöbe-Buglé - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PeSubdivisionCode.php b/library/Rules/SubdivisionCode/PeSubdivisionCode.php index b6528350..6618584a 100644 --- a/library/Rules/SubdivisionCode/PeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AMA', // Amazonas 'ANC', // Ancash 'APU', // Apurimac @@ -49,7 +49,7 @@ class PeSubdivisionCode extends AbstractSearcher 'TAC', // Tacna 'TUM', // Tumbes 'UCA', // Ucayali - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PfSubdivisionCode.php b/library/Rules/SubdivisionCode/PfSubdivisionCode.php index df11cc4a..6f8ed8f9 100644 --- a/library/Rules/SubdivisionCode/PfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PfSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PfSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'I', // Austral Islands 'M', // Marquesas Islands 'S', // Iles Sous-le-Vent 'T', // Tuamotu-Gambier 'V', // Iles du Vent - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PgSubdivisionCode.php b/library/Rules/SubdivisionCode/PgSubdivisionCode.php index 273a3c42..efdd1165 100644 --- a/library/Rules/SubdivisionCode/PgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CPK', // Chimbu 'CPM', // Central 'EBR', // East New Britain @@ -43,7 +43,7 @@ class PgSubdivisionCode extends AbstractSearcher 'WBK', // West New Britain 'WHM', // Western Highlands 'WPD', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PhSubdivisionCode.php b/library/Rules/SubdivisionCode/PhSubdivisionCode.php index e5ae930f..c8554afb 100644 --- a/library/Rules/SubdivisionCode/PhSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PhSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PhSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '00', // National Capital Region '01', // Ilocos '02', // Cagayan Valley @@ -120,7 +120,7 @@ class PhSubdivisionCode extends AbstractSearcher 'ZAS', // Zamboanga del Sur 'ZMB', // Zambales 'ZSI', // Zamboanga Sibugay - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PkSubdivisionCode.php b/library/Rules/SubdivisionCode/PkSubdivisionCode.php index 809d5454..c6812e4d 100644 --- a/library/Rules/SubdivisionCode/PkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Balochistan 'IS', // Islamabad Capital Territory 'JK', // Azad Kashmir @@ -31,7 +31,7 @@ class PkSubdivisionCode extends AbstractSearcher 'PB', // Punjab 'SD', // Sindh 'TA', // Federally Administered Tribal Areas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PlSubdivisionCode.php b/library/Rules/SubdivisionCode/PlSubdivisionCode.php index f53a33fa..b2b0b1b6 100644 --- a/library/Rules/SubdivisionCode/PlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DS', // Dolnoslaskie 'KP', // Kujawsko-Pomorskie 'LB', // Lubuskie @@ -39,7 +39,7 @@ class PlSubdivisionCode extends AbstractSearcher 'WN', // Warminsko-Mazurskie 'WP', // Wielkopolskie 'ZP', // Zachodniopomorskie - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PmSubdivisionCode.php b/library/Rules/SubdivisionCode/PmSubdivisionCode.php index 1f2a8c53..d5f3d427 100644 --- a/library/Rules/SubdivisionCode/PmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PmSubdivisionCode.php @@ -22,10 +22,10 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'M', // Miquelon 'P', // Saint Pierre - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PnSubdivisionCode.php b/library/Rules/SubdivisionCode/PnSubdivisionCode.php index 155cee56..08365351 100644 --- a/library/Rules/SubdivisionCode/PnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PnSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PrSubdivisionCode.php b/library/Rules/SubdivisionCode/PrSubdivisionCode.php index 5adbb16e..c6180569 100644 --- a/library/Rules/SubdivisionCode/PrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PrSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PsSubdivisionCode.php b/library/Rules/SubdivisionCode/PsSubdivisionCode.php index 6599ed1d..3690303f 100644 --- a/library/Rules/SubdivisionCode/PsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DEB', // Bethlehem [conventional] / Bayt Laḩm [Arabic] 'DEB', // Deir El Balah [conventional] /Dayr al Balaḩ[Arabic] 'GZA', // Gaza [conventional] / Ghazzah[Arabic] @@ -39,7 +39,7 @@ class PsSubdivisionCode extends AbstractSearcher 'SLT', // Salfit [conventional] / Salfīt [Arabic] 'TBS', // Tubas [conventional] / Ţūbās [Arabic] 'TKM', // Tulkarm [conventional] /Ţūlkarm [Arabic] - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PtSubdivisionCode.php b/library/Rules/SubdivisionCode/PtSubdivisionCode.php index 97d00761..e16e822b 100644 --- a/library/Rules/SubdivisionCode/PtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Aveiro '02', // Beja '03', // Braga @@ -43,7 +43,7 @@ class PtSubdivisionCode extends AbstractSearcher '18', // Viseu '20', // Acores (Azores) '30', // Madeira - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PwSubdivisionCode.php b/library/Rules/SubdivisionCode/PwSubdivisionCode.php index 67a43b97..fd127700 100644 --- a/library/Rules/SubdivisionCode/PwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '002', // Aimeliik '004', // Airai '010', // Angaur @@ -39,7 +39,7 @@ class PwSubdivisionCode extends AbstractSearcher '228', // Ngiwal '350', // Peleliu '370', // Sonsorol - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/PySubdivisionCode.php b/library/Rules/SubdivisionCode/PySubdivisionCode.php index ab825cda..f96d92aa 100644 --- a/library/Rules/SubdivisionCode/PySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/PySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class PySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '1', // Concepcion '10', // Alto Parana '11', // Central @@ -41,7 +41,7 @@ class PySubdivisionCode extends AbstractSearcher '8', // Misiones '9', // Paraguari 'ASU', // Asuncion - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/QaSubdivisionCode.php b/library/Rules/SubdivisionCode/QaSubdivisionCode.php index 84bf6488..22357d48 100644 --- a/library/Rules/SubdivisionCode/QaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/QaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class QaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DA', // Ad Dawhah 'KH', // Al Khawr wa adh Dhakhīrah 'MS', // Ash Shamāl @@ -30,7 +30,7 @@ class QaSubdivisionCode extends AbstractSearcher 'US', // Umm Salal 'WA', // Al Wakrah 'ZA', // Az Z a‘āyin - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ReSubdivisionCode.php b/library/Rules/SubdivisionCode/ReSubdivisionCode.php index 6a197530..df1f9a10 100644 --- a/library/Rules/SubdivisionCode/ReSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ReSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ReSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/RoSubdivisionCode.php b/library/Rules/SubdivisionCode/RoSubdivisionCode.php index 604b7c9c..cc6865e1 100644 --- a/library/Rules/SubdivisionCode/RoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/RoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class RoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Alba 'AG', // Arges 'AR', // Arad @@ -65,7 +65,7 @@ class RoSubdivisionCode extends AbstractSearcher 'VL', // Vilcea 'VN', // Vrancea 'VS', // Vaslui - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/RsSubdivisionCode.php b/library/Rules/SubdivisionCode/RsSubdivisionCode.php index 39af7714..27b0c96a 100644 --- a/library/Rules/SubdivisionCode/RsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/RsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class RsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'KM', // Kosovo 'VO', // Vojvodina '00', // Beograd @@ -55,7 +55,7 @@ class RsSubdivisionCode extends AbstractSearcher '27', // Prizrenski okrug '28', // Kosovsko-Mitrovački okrug '29', // Kosovsko-Pomoravski okrug - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/RuSubdivisionCode.php b/library/Rules/SubdivisionCode/RuSubdivisionCode.php index 5b62983b..c13bbe12 100644 --- a/library/Rules/SubdivisionCode/RuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/RuSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class RuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AD', // Adygeya 'AL', // Altai Republic 'ALT', // Altai Krai @@ -106,7 +106,7 @@ class RuSubdivisionCode extends AbstractSearcher 'YAR', // Yaroslavl 'YEV', // Jewish Oblast 'ZAB', // Zabaykal'skiy kray - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/RwSubdivisionCode.php b/library/Rules/SubdivisionCode/RwSubdivisionCode.php index 2845c9e1..020fce73 100644 --- a/library/Rules/SubdivisionCode/RwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/RwSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class RwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Kigali '02', // Est '03', // Nord '04', // Ouest '05', // Sud - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SaSubdivisionCode.php b/library/Rules/SubdivisionCode/SaSubdivisionCode.php index e01fddf3..6b05f359 100644 --- a/library/Rules/SubdivisionCode/SaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Ar Riyad '02', // Makkah '03', // Al Madinah @@ -36,7 +36,7 @@ class SaSubdivisionCode extends AbstractSearcher '11', // Al Bahah '12', // Al Jawf '14', // 'Asir - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SbSubdivisionCode.php b/library/Rules/SubdivisionCode/SbSubdivisionCode.php index 21f7a915..daeaedc4 100644 --- a/library/Rules/SubdivisionCode/SbSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SbSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SbSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CE', // Central 'CH', // Choiseul 'CT', // Capital Territory @@ -33,7 +33,7 @@ class SbSubdivisionCode extends AbstractSearcher 'RB', // Rennell and Bellona 'TE', // Temotu 'WE', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ScSubdivisionCode.php b/library/Rules/SubdivisionCode/ScSubdivisionCode.php index 819db3a8..9f0dfe21 100644 --- a/library/Rules/SubdivisionCode/ScSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ScSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ScSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Anse aux Pins '02', // Anse Boileau '03', // Anse Etoile @@ -48,7 +48,7 @@ class ScSubdivisionCode extends AbstractSearcher '23', // Takamaka '24', // Les Mamelles '25', // Roche Caïman - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SdSubdivisionCode.php b/library/Rules/SubdivisionCode/SdSubdivisionCode.php index eff26c73..89c9574c 100644 --- a/library/Rules/SubdivisionCode/SdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DC', // Wasaţ Dārfūr 'DE', // Sharq Dārfūr 'DN', // Shamāl Dārfūr @@ -40,7 +40,7 @@ class SdSubdivisionCode extends AbstractSearcher 'NW', // An Nīl al Abyaḑ 'RS', // Al Baḩr al Aḩmar 'SI', // Sinnār - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SeSubdivisionCode.php b/library/Rules/SubdivisionCode/SeSubdivisionCode.php index a8383f50..273cf470 100644 --- a/library/Rules/SubdivisionCode/SeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Stockholms 'AC', // Vasterbottens 'BD', // Norrbottens @@ -44,7 +44,7 @@ class SeSubdivisionCode extends AbstractSearcher 'X', // Gavleborgs 'Y', // Vasternorrlands 'Z', // Jamtlands - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SgSubdivisionCode.php b/library/Rules/SubdivisionCode/SgSubdivisionCode.php index cfef596d..7cad35e5 100644 --- a/library/Rules/SubdivisionCode/SgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SgSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Central Singapore '02', // North East '03', // North West '04', // South East '05', // South West - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ShSubdivisionCode.php b/library/Rules/SubdivisionCode/ShSubdivisionCode.php index 6fd3d581..c2189a64 100644 --- a/library/Rules/SubdivisionCode/ShSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ShSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ShSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AC', // Ascension 'HL', // Saint Helena 'TA', // Tristan da Cunha - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SiSubdivisionCode.php b/library/Rules/SubdivisionCode/SiSubdivisionCode.php index 022bd162..b5584631 100644 --- a/library/Rules/SubdivisionCode/SiSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SiSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SiSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '001', // Ajdovščina '002', // Beltinci '003', // Bled @@ -233,7 +233,7 @@ class SiSubdivisionCode extends AbstractSearcher '210', // Sveti Jurij v Slovenskih Goricah '211', // Šentrupert '215', // Starše - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SjSubdivisionCode.php b/library/Rules/SubdivisionCode/SjSubdivisionCode.php index 00c7eded..d66c2e80 100644 --- a/library/Rules/SubdivisionCode/SjSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SjSubdivisionCode.php @@ -22,10 +22,10 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SjSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '21', // Svalbard '22', // Jan Mayen - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SkSubdivisionCode.php b/library/Rules/SubdivisionCode/SkSubdivisionCode.php index 6982771d..620d5d10 100644 --- a/library/Rules/SubdivisionCode/SkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BC', // Banskobystricky 'BL', // Bratislavsky 'KI', // Kosicky @@ -31,7 +31,7 @@ class SkSubdivisionCode extends AbstractSearcher 'TA', // Trnavsky 'TC', // Trenciansky 'ZI', // Zilinsky - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SlSubdivisionCode.php b/library/Rules/SubdivisionCode/SlSubdivisionCode.php index d4a49b94..ac6fb83c 100644 --- a/library/Rules/SubdivisionCode/SlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SlSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'E', // Eastern 'N', // Northern 'S', // Southern 'W', // Western - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SmSubdivisionCode.php b/library/Rules/SubdivisionCode/SmSubdivisionCode.php index 6d7f171b..d81be92b 100644 --- a/library/Rules/SubdivisionCode/SmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Acquaviva '02', // Chiesanuova '03', // Domagnano @@ -32,7 +32,7 @@ class SmSubdivisionCode extends AbstractSearcher '07', // Citta di San Marino '08', // Montegiardino '09', // Serravalle - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SnSubdivisionCode.php b/library/Rules/SubdivisionCode/SnSubdivisionCode.php index cff7a51b..09edb611 100644 --- a/library/Rules/SubdivisionCode/SnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DB', // Diourbel 'DK', // Dakar 'FK', // Fatick @@ -37,7 +37,7 @@ class SnSubdivisionCode extends AbstractSearcher 'TC', // Tambacounda 'TH', // Thies 'ZG', // Ziguinchor - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SoSubdivisionCode.php b/library/Rules/SubdivisionCode/SoSubdivisionCode.php index ed200808..d0fe1b57 100644 --- a/library/Rules/SubdivisionCode/SoSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SoSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SoSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AW', // Awdal 'BK', // Bakool 'BN', // Banaadir @@ -41,7 +41,7 @@ class SoSubdivisionCode extends AbstractSearcher 'SO', // Sool 'TO', // Togdheer 'WO', // Woqooyi Galbeed - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SrSubdivisionCode.php b/library/Rules/SubdivisionCode/SrSubdivisionCode.php index 346f3ed2..d560c2d1 100644 --- a/library/Rules/SubdivisionCode/SrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BR', // Brokopondo 'CM', // Commewijne 'CR', // Coronie @@ -33,7 +33,7 @@ class SrSubdivisionCode extends AbstractSearcher 'SA', // Saramacca 'SI', // Sipaliwini 'WA', // Wanica - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SsSubdivisionCode.php b/library/Rules/SubdivisionCode/SsSubdivisionCode.php index 209c1fb7..b2ed2833 100644 --- a/library/Rules/SubdivisionCode/SsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BN', // Northern Bahr el Ghazal 'BW', // Western Bahr el Ghazal 'EC', // Central Equatoria @@ -33,7 +33,7 @@ class SsSubdivisionCode extends AbstractSearcher 'NU', // Upper Nile 'UY', // Unity 'WR', // Warrap - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/StSubdivisionCode.php b/library/Rules/SubdivisionCode/StSubdivisionCode.php index afbf793c..5f08b04e 100644 --- a/library/Rules/SubdivisionCode/StSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/StSubdivisionCode.php @@ -22,10 +22,10 @@ use Respect\Validation\Rules\AbstractSearcher; */ class StSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'P', // Principe 'S', // Sao Tome - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SvSubdivisionCode.php b/library/Rules/SubdivisionCode/SvSubdivisionCode.php index 374ab59b..f30e7c3f 100644 --- a/library/Rules/SubdivisionCode/SvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SvSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AH', // Ahuachapan 'CA', // Cabanas 'CH', // Chalatenango @@ -37,7 +37,7 @@ class SvSubdivisionCode extends AbstractSearcher 'SV', // San Vicente 'UN', // La Union 'US', // Usulutan - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SxSubdivisionCode.php b/library/Rules/SubdivisionCode/SxSubdivisionCode.php index 714a2ef9..f89823a4 100644 --- a/library/Rules/SubdivisionCode/SxSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SxSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SxSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SySubdivisionCode.php b/library/Rules/SubdivisionCode/SySubdivisionCode.php index 8571819f..8bc62428 100644 --- a/library/Rules/SubdivisionCode/SySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'DI', // Dimashq 'DR', // Dara 'DY', // Dayr az Zawr @@ -37,7 +37,7 @@ class SySubdivisionCode extends AbstractSearcher 'RD', // Rif Dimashq 'SU', // As Suwayda 'TA', // Tartus - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/SzSubdivisionCode.php b/library/Rules/SubdivisionCode/SzSubdivisionCode.php index 135575df..94f64e7e 100644 --- a/library/Rules/SubdivisionCode/SzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/SzSubdivisionCode.php @@ -22,12 +22,12 @@ use Respect\Validation\Rules\AbstractSearcher; */ class SzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'HH', // Hhohho 'LU', // Lubombo 'MA', // Manzini 'SH', // Shishelweni - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TcSubdivisionCode.php b/library/Rules/SubdivisionCode/TcSubdivisionCode.php index 2e903459..dfea0c09 100644 --- a/library/Rules/SubdivisionCode/TcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TcSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AC', // Ambergris Cays 'DC', // Dellis Cay 'EC', // East Caicos @@ -37,7 +37,7 @@ class TcSubdivisionCode extends AbstractSearcher 'SC', // South Caicos 'SL', // Salt Cay 'WC', // West Caicos - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TdSubdivisionCode.php b/library/Rules/SubdivisionCode/TdSubdivisionCode.php index fb918f1b..aac3c028 100644 --- a/library/Rules/SubdivisionCode/TdSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TdSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TdSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BA', // Batha 'BG', // Barh el Ghazel 'BO', // Borkou @@ -47,7 +47,7 @@ class TdSubdivisionCode extends AbstractSearcher 'TI', // Tibesti 'WF', // Wadi Fira 'EN', // Ennedi - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TfSubdivisionCode.php b/library/Rules/SubdivisionCode/TfSubdivisionCode.php index 0e4f5a8e..2cee3515 100644 --- a/library/Rules/SubdivisionCode/TfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TfSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TfSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TgSubdivisionCode.php b/library/Rules/SubdivisionCode/TgSubdivisionCode.php index 99b8f260..dd87ff02 100644 --- a/library/Rules/SubdivisionCode/TgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TgSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Centrale 'K', // Kara 'M', // Maritime 'P', // Plateaux 'S', // Savanes - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ThSubdivisionCode.php b/library/Rules/SubdivisionCode/ThSubdivisionCode.php index f6489e08..1e5fbe55 100644 --- a/library/Rules/SubdivisionCode/ThSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ThSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ThSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '10', // Bangkok '11', // Samut Prakan '12', // Nonthaburi @@ -100,7 +100,7 @@ class ThSubdivisionCode extends AbstractSearcher '94', // Pattani '95', // Yala '96', // Narathiwat - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TjSubdivisionCode.php b/library/Rules/SubdivisionCode/TjSubdivisionCode.php index bcff0651..f07d46b0 100644 --- a/library/Rules/SubdivisionCode/TjSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TjSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TjSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'GB', // Gorno-Badakhstan 'KT', // Khatlon 'SU', // Sughd - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TkSubdivisionCode.php b/library/Rules/SubdivisionCode/TkSubdivisionCode.php index 86bb6af2..13ce7c8b 100644 --- a/library/Rules/SubdivisionCode/TkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TkSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TkSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Atafu 'F', // Fakaofo 'N', // Nukunonu - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TlSubdivisionCode.php b/library/Rules/SubdivisionCode/TlSubdivisionCode.php index 8a97d0c4..b803a9a6 100644 --- a/library/Rules/SubdivisionCode/TlSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TlSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TlSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AL', // Aileu 'AN', // Ainaro 'BA', // Baucau @@ -36,7 +36,7 @@ class TlSubdivisionCode extends AbstractSearcher 'MT', // Manatuto 'OE', // Oecussi 'VI', // Viqueque - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TmSubdivisionCode.php b/library/Rules/SubdivisionCode/TmSubdivisionCode.php index 6f04de6f..b9a4540b 100644 --- a/library/Rules/SubdivisionCode/TmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TmSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Ahal Welayaty 'B', // Balkan Welayaty 'D', // Dashhowuz Welayaty 'L', // Lebap Welayaty 'M', // Mary Welayaty 'S', // Aşgabat - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TnSubdivisionCode.php b/library/Rules/SubdivisionCode/TnSubdivisionCode.php index 503d26bc..90c621cf 100644 --- a/library/Rules/SubdivisionCode/TnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '11', // Tunis '12', // L'Ariana '13', // Ben Arous @@ -47,7 +47,7 @@ class TnSubdivisionCode extends AbstractSearcher '81', // Gabès '82', // Medenine '83', // Tataouine - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ToSubdivisionCode.php b/library/Rules/SubdivisionCode/ToSubdivisionCode.php index 8127b6c3..2d895e6d 100644 --- a/library/Rules/SubdivisionCode/ToSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ToSubdivisionCode.php @@ -22,13 +22,13 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ToSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Eua '02', // Ha'apai '03', // Niuas '04', // Tongatapu '05', // Vava'u - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TrSubdivisionCode.php b/library/Rules/SubdivisionCode/TrSubdivisionCode.php index b787c276..88605bae 100644 --- a/library/Rules/SubdivisionCode/TrSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TrSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TrSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Adana '02', // Adiyaman '03', // Afyonkarahisar @@ -104,7 +104,7 @@ class TrSubdivisionCode extends AbstractSearcher '79', // Kilis '80', // Osmaniye '81', // Duzce - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TtSubdivisionCode.php b/library/Rules/SubdivisionCode/TtSubdivisionCode.php index b34d60b9..c93c9603 100644 --- a/library/Rules/SubdivisionCode/TtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TtSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'ARI', // Arima 'CHA', // Chaguanas 'CTT', // Couva/Tabaquite/Talparo @@ -39,7 +39,7 @@ class TtSubdivisionCode extends AbstractSearcher 'SJL', // San Juan/Laventille 'TUP', // Tunapuna/Piarco 'WTO', // Tobago - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TvSubdivisionCode.php b/library/Rules/SubdivisionCode/TvSubdivisionCode.php index 074f418c..5757e7eb 100644 --- a/library/Rules/SubdivisionCode/TvSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TvSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TvSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'FUN', // Funafuti 'NIT', // Niutao 'NKF', // Nukufetau @@ -31,7 +31,7 @@ class TvSubdivisionCode extends AbstractSearcher 'NMG', // Nanumanga 'NUI', // Nui 'VAI', // Vaitupu - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TwSubdivisionCode.php b/library/Rules/SubdivisionCode/TwSubdivisionCode.php index d6ba0b6d..8cddb494 100644 --- a/library/Rules/SubdivisionCode/TwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'CHA', // Changhua 'CYI', // Chiayi 'CYQ', // Chiayi @@ -44,7 +44,7 @@ class TwSubdivisionCode extends AbstractSearcher 'TXG', // Taichung 'YUN', // Yunlin 'TXQ', // Taichung County - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/TzSubdivisionCode.php b/library/Rules/SubdivisionCode/TzSubdivisionCode.php index 6629e996..04678b17 100644 --- a/library/Rules/SubdivisionCode/TzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/TzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class TzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Arusha '02', // Dar es Salaam '03', // Dodoma @@ -49,7 +49,7 @@ class TzSubdivisionCode extends AbstractSearcher '24', // Tabora '25', // Tanga '26', // Manyara - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UaSubdivisionCode.php b/library/Rules/SubdivisionCode/UaSubdivisionCode.php index c1dce5ff..8b4c9337 100644 --- a/library/Rules/SubdivisionCode/UaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '05', // Vinnytsya '07', // Volyn' '09', // Luhans'k @@ -50,7 +50,7 @@ class UaSubdivisionCode extends AbstractSearcher '71', // Cherkasy '74', // Chernihiv '77', // Chernivtsi - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UgSubdivisionCode.php b/library/Rules/SubdivisionCode/UgSubdivisionCode.php index aa60b67f..63b4596c 100644 --- a/library/Rules/SubdivisionCode/UgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UgSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Central 'E', // Eastern 'N', // Northern @@ -107,7 +107,7 @@ class UgSubdivisionCode extends AbstractSearcher '417', // Isingiro '418', // Kiruhura '419', // Buliisa - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UmSubdivisionCode.php b/library/Rules/SubdivisionCode/UmSubdivisionCode.php index 0eadf64d..64a5fa2f 100644 --- a/library/Rules/SubdivisionCode/UmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '67', // Johnston Atoll '71', // Midway Atoll '76', // Navassa Island @@ -32,7 +32,7 @@ class UmSubdivisionCode extends AbstractSearcher '86', // Jarvis Island '89', // Kingman Reef '95', // Palmyra Atoll - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UsSubdivisionCode.php b/library/Rules/SubdivisionCode/UsSubdivisionCode.php index af6c90dd..b9c86b35 100644 --- a/library/Rules/SubdivisionCode/UsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AK', // Alaska 'AL', // Alabama 'AR', // Arkansas @@ -80,7 +80,7 @@ class UsSubdivisionCode extends AbstractSearcher 'WI', // Wisconsin 'WV', // West Virginia 'WY', // Wyoming - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UySubdivisionCode.php b/library/Rules/SubdivisionCode/UySubdivisionCode.php index 6b7f34e4..8692cb58 100644 --- a/library/Rules/SubdivisionCode/UySubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UySubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UySubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AR', // Artigas 'CA', // Canelones 'CL', // Cerro Largo @@ -42,7 +42,7 @@ class UySubdivisionCode extends AbstractSearcher 'SO', // Soriano 'TA', // Tacuarembó 'TT', // Treinta y Tres - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/UzSubdivisionCode.php b/library/Rules/SubdivisionCode/UzSubdivisionCode.php index ec055b9f..fc7e9c9f 100644 --- a/library/Rules/SubdivisionCode/UzSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/UzSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class UzSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AN', // Andijon 'BU', // Buxoro 'FA', // Farg'ona @@ -37,7 +37,7 @@ class UzSubdivisionCode extends AbstractSearcher 'TK', // Toshkent city 'TO', // Toshkent region 'XO', // Xorazm - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VaSubdivisionCode.php b/library/Rules/SubdivisionCode/VaSubdivisionCode.php index 5d9a924e..2e128b54 100644 --- a/library/Rules/SubdivisionCode/VaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VaSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VcSubdivisionCode.php b/library/Rules/SubdivisionCode/VcSubdivisionCode.php index 85412906..33912616 100644 --- a/library/Rules/SubdivisionCode/VcSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VcSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VcSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Charlotte '02', // Saint Andrew '03', // Saint David '04', // Saint George '05', // Saint Patrick '06', // Grenadines - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VeSubdivisionCode.php b/library/Rules/SubdivisionCode/VeSubdivisionCode.php index 2780884f..7ec212fc 100644 --- a/library/Rules/SubdivisionCode/VeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Federal Capital 'B', // Anzoategui 'C', // Apure @@ -48,7 +48,7 @@ class VeSubdivisionCode extends AbstractSearcher 'X', // Vargas 'Y', // Delta Amacuro 'Z', // Amazonas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VgSubdivisionCode.php b/library/Rules/SubdivisionCode/VgSubdivisionCode.php index d9750d83..29240aca 100644 --- a/library/Rules/SubdivisionCode/VgSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VgSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VgSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ViSubdivisionCode.php b/library/Rules/SubdivisionCode/ViSubdivisionCode.php index 61461a20..684f8e6d 100644 --- a/library/Rules/SubdivisionCode/ViSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ViSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ViSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'C', // Saint Croix 'J', // Saint John 'T', // Saint Thomas - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VnSubdivisionCode.php b/library/Rules/SubdivisionCode/VnSubdivisionCode.php index a1616be1..d219db88 100644 --- a/library/Rules/SubdivisionCode/VnSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VnSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VnSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Lai Chau '02', // Lao Cai '03', // Ha Giang @@ -87,7 +87,7 @@ class VnSubdivisionCode extends AbstractSearcher '72', // Dak Nong '73', // Hau Giang '15', // Ha Tay - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/VuSubdivisionCode.php b/library/Rules/SubdivisionCode/VuSubdivisionCode.php index 1f60bedc..8657749b 100644 --- a/library/Rules/SubdivisionCode/VuSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/VuSubdivisionCode.php @@ -22,14 +22,14 @@ use Respect\Validation\Rules\AbstractSearcher; */ class VuSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'MAP', // Malampa 'PAM', // Penama 'SAM', // Sanma 'SEE', // Shefa 'TAE', // Tafea 'TOB', // Torba - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/WfSubdivisionCode.php b/library/Rules/SubdivisionCode/WfSubdivisionCode.php index 76f9c81f..1497d3dc 100644 --- a/library/Rules/SubdivisionCode/WfSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/WfSubdivisionCode.php @@ -22,11 +22,11 @@ use Respect\Validation\Rules\AbstractSearcher; */ class WfSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'A', // Alo 'S', // Sigave 'W', // ʻUvea - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/WsSubdivisionCode.php b/library/Rules/SubdivisionCode/WsSubdivisionCode.php index 54bb1ffd..9d1ab9ef 100644 --- a/library/Rules/SubdivisionCode/WsSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/WsSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class WsSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AA', // A'ana 'AL', // Aiga-i-le-Tai 'AT', // Atua @@ -34,7 +34,7 @@ class WsSubdivisionCode extends AbstractSearcher 'TU', // Tuamasaga 'VF', // Va'a-o-Fonoti 'VS', // Vaisigano - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/XkSubdivisionCode.php b/library/Rules/SubdivisionCode/XkSubdivisionCode.php index e0d6e603..98c039eb 100644 --- a/library/Rules/SubdivisionCode/XkSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/XkSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class XkSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/YeSubdivisionCode.php b/library/Rules/SubdivisionCode/YeSubdivisionCode.php index 33273be6..0c5049f6 100644 --- a/library/Rules/SubdivisionCode/YeSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/YeSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class YeSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'AB', // Abyan 'AD', // Adan 'AM', // Amran @@ -44,7 +44,7 @@ class YeSubdivisionCode extends AbstractSearcher 'SH', // Shabwah 'SN', // San'a 'TA', // Ta'izz - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/YtSubdivisionCode.php b/library/Rules/SubdivisionCode/YtSubdivisionCode.php index a63b984f..a3ae34f0 100644 --- a/library/Rules/SubdivisionCode/YtSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/YtSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class YtSubdivisionCode extends AbstractSearcher { - public $haystack = array(null, ''); + public $haystack = [null, '']; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ZaSubdivisionCode.php b/library/Rules/SubdivisionCode/ZaSubdivisionCode.php index 86fffbbf..cb124411 100644 --- a/library/Rules/SubdivisionCode/ZaSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ZaSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ZaSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'EC', // Eastern Cape 'FS', // Free State 'GP', // Gauteng @@ -32,7 +32,7 @@ class ZaSubdivisionCode extends AbstractSearcher 'NW', // North West 'WC', // Western Cape 'ZN', // KwaZulu-Natal - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ZmSubdivisionCode.php b/library/Rules/SubdivisionCode/ZmSubdivisionCode.php index 000f4bd5..6ae85256 100644 --- a/library/Rules/SubdivisionCode/ZmSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ZmSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ZmSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ '01', // Western Province '02', // Central Province '03', // Eastern Province @@ -32,7 +32,7 @@ class ZmSubdivisionCode extends AbstractSearcher '07', // Southern Province '08', // Copperbelt Province '09', // Lusaka Province - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/SubdivisionCode/ZwSubdivisionCode.php b/library/Rules/SubdivisionCode/ZwSubdivisionCode.php index 8a4cb537..9b873b5b 100644 --- a/library/Rules/SubdivisionCode/ZwSubdivisionCode.php +++ b/library/Rules/SubdivisionCode/ZwSubdivisionCode.php @@ -22,7 +22,7 @@ use Respect\Validation\Rules\AbstractSearcher; */ class ZwSubdivisionCode extends AbstractSearcher { - public $haystack = array( + public $haystack = [ 'BU', // Bulawayo (city) 'HA', // Harare (city) 'MA', // Manicaland @@ -33,7 +33,7 @@ class ZwSubdivisionCode extends AbstractSearcher 'MS', // Matabeleland South 'MV', // Masvingo 'MW', // Mashonaland West - ); + ]; public $compareIdentical = true; } diff --git a/library/Rules/Tld.php b/library/Rules/Tld.php index bac35e58..692b11a0 100644 --- a/library/Rules/Tld.php +++ b/library/Rules/Tld.php @@ -13,7 +13,7 @@ namespace Respect\Validation\Rules; class Tld extends AbstractRule { - protected $tldList = array( + protected $tldList = [ //generic - http://en.wikipedia.org/wiki/Generic_top-level_domain 'aero', 'asia', 'biz', 'cat', 'com', 'coop', 'edu', 'gov', 'info', 'int', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'post', 'pro', @@ -117,7 +117,7 @@ class Tld extends AbstractRule 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'ye', 'yt', 'za', 'zm', 'zw', - ); + ]; public function validate($input) { diff --git a/library/Rules/Type.php b/library/Rules/Type.php index 5748e722..803ac5a2 100644 --- a/library/Rules/Type.php +++ b/library/Rules/Type.php @@ -16,7 +16,7 @@ use Respect\Validation\Exceptions\ComponentException; class Type extends AbstractRule { public $type; - public $availableTypes = array( + public $availableTypes = [ 'array' => 'array', 'bool' => 'boolean', 'boolean' => 'boolean', @@ -29,7 +29,7 @@ class Type extends AbstractRule 'object' => 'object', 'resource' => 'resource', 'string' => 'string', - ); + ]; public function __construct($type) { diff --git a/library/Rules/VideoUrl.php b/library/Rules/VideoUrl.php index 81f4c62e..7004633f 100644 --- a/library/Rules/VideoUrl.php +++ b/library/Rules/VideoUrl.php @@ -28,10 +28,10 @@ class VideoUrl extends AbstractRule /** * @var array */ - private $services = array( + private $services = [ 'youtube' => '@^https?://(www\.)?(?:youtube\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^\"&?/]{11})@i', 'vimeo' => '@^https?://(www\.)?(player\.)?(vimeo\.com/)((channels/[A-z]+/)|(groups/[A-z]+/videos/)|(video/))?([0-9]+)@i', - ); + ]; /** * Create a new instance VideoUrl diff --git a/library/Rules/When.php b/library/Rules/When.php index e55c3a00..25afce46 100644 --- a/library/Rules/When.php +++ b/library/Rules/When.php @@ -11,8 +11,8 @@ namespace Respect\Validation\Rules; -use Respect\Validation\Validatable; use Respect\Validation\Exceptions\AlwaysInvalidException; +use Respect\Validation\Validatable; class When extends AbstractRule { diff --git a/library/Rules/Zend.php b/library/Rules/Zend.php index a6675603..a65aaad4 100644 --- a/library/Rules/Zend.php +++ b/library/Rules/Zend.php @@ -16,10 +16,10 @@ use Respect\Validation\Exceptions\ComponentException; class Zend extends AbstractRule { - protected $messages = array(); + protected $messages = []; protected $zendValidator; - public function __construct($validator, $params = array()) + public function __construct($validator, $params = []) { if (is_object($validator)) { return $this->zendValidator = $validator; @@ -52,7 +52,7 @@ class Zend extends AbstractRule return true; } - $exceptions = array(); + $exceptions = []; foreach ($validator->getMessages() as $m) { $exceptions[] = $this->reportError($m, get_object_vars($this)); } diff --git a/library/Validatable.php b/library/Validatable.php index 1309df87..ad53ecf8 100644 --- a/library/Validatable.php +++ b/library/Validatable.php @@ -20,7 +20,7 @@ interface Validatable public function getName(); - public function reportError($input, array $relatedExceptions = array()); + public function reportError($input, array $relatedExceptions = []); public function setName($name); diff --git a/library/Validator.php b/library/Validator.php index 5e0a89e2..16bb3886 100644 --- a/library/Validator.php +++ b/library/Validator.php @@ -194,7 +194,7 @@ class Validator extends AllOf * * @return Validatable */ - public static function buildRule($ruleSpec, $arguments = array()) + public static function buildRule($ruleSpec, $arguments = []) { try { return static::getFactory()->rule($ruleSpec, $arguments); diff --git a/tests/integration/alnum_2.phpt b/tests/integration/alnum_2.phpt index d9d161ef..ea484ca2 100644 --- a/tests/integration/alnum_2.phpt +++ b/tests/integration/alnum_2.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AlnumException; +use Respect\Validation\Validator as v; try { - v::alnum()->check('Bla %123'); + v::alnum()->check('Bla %123'); } catch (AlnumException $exception) { - echo $exception->getMainMessage(); + echo $exception->getMainMessage(); } ?> diff --git a/tests/integration/alnum_3.phpt b/tests/integration/alnum_3.phpt index 412923b0..a91f378b 100644 --- a/tests/integration/alnum_3.phpt +++ b/tests/integration/alnum_3.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { - v::alnum()->noWhitespace()->assert('Bla %1#%&23'); + v::alnum()->noWhitespace()->assert('Bla %1#%&23'); } catch (AllOfException $exception) { - echo $exception->getFullMessage(); + echo $exception->getFullMessage(); } ?> diff --git a/tests/integration/alnum_4.phpt b/tests/integration/alnum_4.phpt index f226c4ea..960f228e 100644 --- a/tests/integration/alnum_4.phpt +++ b/tests/integration/alnum_4.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AlnumException; +use Respect\Validation\Validator as v; try { v::not(v::alnum())->check('adsfASDF123'); diff --git a/tests/integration/alnum_5.phpt b/tests/integration/alnum_5.phpt index 7cfb585a..12a571d3 100644 --- a/tests/integration/alnum_5.phpt +++ b/tests/integration/alnum_5.phpt @@ -2,8 +2,8 @@ assert('asd124SF'); diff --git a/tests/integration/alnum_6_expected_char.phpt b/tests/integration/alnum_6_expected_char.phpt index 1935020f..f6e78b95 100644 --- a/tests/integration/alnum_6_expected_char.phpt +++ b/tests/integration/alnum_6_expected_char.phpt @@ -3,10 +3,10 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -use Respect\Validation\Exceptions\AllOfException; -if (!v::alnum('-')->validate('bla - bla')) - echo 'ok'; +if (!v::alnum('-')->validate('bla - bla')) { + echo 'ok'; +} ?> --EXPECTF-- \ No newline at end of file diff --git a/tests/integration/alnum_7_not_empty.phpt b/tests/integration/alnum_7_not_empty.phpt index df01a71f..40154189 100644 --- a/tests/integration/alnum_7_not_empty.phpt +++ b/tests/integration/alnum_7_not_empty.phpt @@ -3,10 +3,10 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -use Respect\Validation\Exceptions\AllOfException; -if (v::alnum()->notEmpty()->validate('')) - echo 'error'; +if (v::alnum()->notEmpty()->validate('')) { + echo 'error'; +} ?> --EXPECTF-- \ No newline at end of file diff --git a/tests/integration/alnum_8_uppercase.phpt b/tests/integration/alnum_8_uppercase.phpt index 0bd831e2..39a36ae8 100644 --- a/tests/integration/alnum_8_uppercase.phpt +++ b/tests/integration/alnum_8_uppercase.phpt @@ -3,10 +3,10 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -use Respect\Validation\Exceptions\AllOfException; -if (!v::alnum()->uppercase()->validate('ASDF')) - echo 'ok'; +if (!v::alnum()->uppercase()->validate('ASDF')) { + echo 'ok'; +} ?> --EXPECTF-- \ No newline at end of file diff --git a/tests/integration/alpha_2.phpt b/tests/integration/alpha_2.phpt index f537b745..df51173c 100644 --- a/tests/integration/alpha_2.phpt +++ b/tests/integration/alpha_2.phpt @@ -2,9 +2,9 @@ check(1); diff --git a/tests/integration/alpha_3.phpt b/tests/integration/alpha_3.phpt index 4f188c3e..9097d886 100644 --- a/tests/integration/alpha_3.phpt +++ b/tests/integration/alpha_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(null); diff --git a/tests/integration/alpha_4.phpt b/tests/integration/alpha_4.phpt index a746a13d..d1d69790 100644 --- a/tests/integration/alpha_4.phpt +++ b/tests/integration/alpha_4.phpt @@ -2,9 +2,9 @@ check('a'); diff --git a/tests/integration/assert-with-keys.phpt b/tests/integration/assert-with-keys.phpt index 06724e09..84e8b8b5 100644 --- a/tests/integration/assert-with-keys.phpt +++ b/tests/integration/assert-with-keys.phpt @@ -25,16 +25,16 @@ try { true ) ->setName('the given data') - ->assert(array( - 'mysql' => array( + ->assert([ + 'mysql' => [ 'host' => 42, 'schema' => 42, - ), - 'postgresql' => array( + ], + 'postgresql' => [ 'user' => 42, 'password' => 42, - ), - )); + ], + ]); } catch (NestedValidationExceptionInterface $exception) { echo $exception->getFullMessage().PHP_EOL; } diff --git a/tests/integration/boolType_2.phpt b/tests/integration/boolType_2.phpt index f204c050..712bab9d 100644 --- a/tests/integration/boolType_2.phpt +++ b/tests/integration/boolType_2.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\BoolTypeException; +use Respect\Validation\Validator as v; try { - v::boolType()->check('12345'); + v::boolType()->check('12345'); } catch (BoolTypeException $e) { - echo $e->getMainMessage(); + echo $e->getMainMessage(); } ?> --EXPECTF-- diff --git a/tests/integration/boolType_3.phpt b/tests/integration/boolType_3.phpt index fc013b9c..f0aac77a 100644 --- a/tests/integration/boolType_3.phpt +++ b/tests/integration/boolType_3.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { - v::boolType()->assert('12345'); + v::boolType()->assert('12345'); } catch (AllOfException $e) { - echo $e->getFullMessage(); + echo $e->getFullMessage(); } ?> --EXPECTF-- diff --git a/tests/integration/boolType_4.phpt b/tests/integration/boolType_4.phpt index 5f052da2..b3f0474e 100644 --- a/tests/integration/boolType_4.phpt +++ b/tests/integration/boolType_4.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\BoolTypeException; +use Respect\Validation\Validator as v; try { - v::not(v::boolType())->check(true); + v::not(v::boolType())->check(true); } catch (BoolTypeException $e) { - echo $e->getMainMessage(); + echo $e->getMainMessage(); } ?> --EXPECTF-- diff --git a/tests/integration/boolType_5.phpt b/tests/integration/boolType_5.phpt index 2cbfaa10..c2a7d8f6 100644 --- a/tests/integration/boolType_5.phpt +++ b/tests/integration/boolType_5.phpt @@ -3,13 +3,13 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { - v::not(v::boolType())->assert(true); + v::not(v::boolType())->assert(true); } catch (AllOfException $e) { - echo $e->getFullMessage(); + echo $e->getFullMessage(); } ?> --EXPECTF-- diff --git a/tests/integration/bsn_2.phpt b/tests/integration/bsn_2.phpt index 9c95fb01..a7ae2777 100644 --- a/tests/integration/bsn_2.phpt +++ b/tests/integration/bsn_2.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\BsnException; +use Respect\Validation\Validator as v; try { v::bsn()->check('acb'); diff --git a/tests/integration/bsn_3.phpt b/tests/integration/bsn_3.phpt index dae6022a..ce13e36b 100644 --- a/tests/integration/bsn_3.phpt +++ b/tests/integration/bsn_3.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::bsn()->assert('abc'); diff --git a/tests/integration/callableType_2.phpt b/tests/integration/callableType_2.phpt index c98ee334..9ef4fe23 100644 --- a/tests/integration/callableType_2.phpt +++ b/tests/integration/callableType_2.phpt @@ -2,38 +2,37 @@ check(array()); -} catch (CallableTypeException $exception) { - echo $exception->getMainMessage().PHP_EOL; + v::callableType()->check([]); +} catch (CallableTypeException $exception) { + echo $exception->getMainMessage().PHP_EOL; } try { - v::callableType()->check('oneInexistentFunction'); -} catch (CallableTypeException $exception) { - echo $exception->getMainMessage().PHP_EOL; + v::callableType()->check('oneInexistentFunction'); +} catch (CallableTypeException $exception) { + echo $exception->getMainMessage().PHP_EOL; } try { - v::callableType()->check(100); -} catch (CallableTypeException $exception) { - echo $exception->getMainMessage().PHP_EOL; + v::callableType()->check(100); +} catch (CallableTypeException $exception) { + echo $exception->getMainMessage().PHP_EOL; } try { - v::callableType()->check(null); -} catch (CallableTypeException $exception) { - echo $exception->getMainMessage().PHP_EOL; + v::callableType()->check(null); +} catch (CallableTypeException $exception) { + echo $exception->getMainMessage().PHP_EOL; } - try { - v::callableType()->check(''); -} catch (CallableTypeException $exception) { - echo $exception->getMainMessage().PHP_EOL; + v::callableType()->check(''); +} catch (CallableTypeException $exception) { + echo $exception->getMainMessage().PHP_EOL; } ?> diff --git a/tests/integration/callableType_3.phpt b/tests/integration/callableType_3.phpt index 5023ec28..ad1a06b5 100644 --- a/tests/integration/callableType_3.phpt +++ b/tests/integration/callableType_3.phpt @@ -2,37 +2,37 @@ check(array()); -} catch (CallableTypeException $exception) { - echo $exception->getFullMessage(); + v::not(v::callableType())->check([]); +} catch (CallableTypeException $exception) { + echo $exception->getFullMessage(); } try { - v::not(v::callableType())->check('oneInexistentFunction'); -} catch (CallableTypeException $exception) { - echo $exception->getFullMessage(); + v::not(v::callableType())->check('oneInexistentFunction'); +} catch (CallableTypeException $exception) { + echo $exception->getFullMessage(); } try { - v::not(v::callableType())->check(100); -} catch (CallableTypeException $exception) { - echo $exception->getFullMessage(); + v::not(v::callableType())->check(100); +} catch (CallableTypeException $exception) { + echo $exception->getFullMessage(); } try { - v::not(v::callableType())->check(null); -} catch (CallableTypeException $exception) { - echo $exception->getFullMessage(); + v::not(v::callableType())->check(null); +} catch (CallableTypeException $exception) { + echo $exception->getFullMessage(); } try { - v::not(v::callableType())->check(''); -} catch (CallableTypeException $exception) { - echo $exception->getFullMessage(); + v::not(v::callableType())->check(''); +} catch (CallableTypeException $exception) { + echo $exception->getFullMessage(); } ?> --EXPECTF-- \ No newline at end of file diff --git a/tests/integration/callableType_4.phpt b/tests/integration/callableType_4.phpt index f5df4736..954ff668 100644 --- a/tests/integration/callableType_4.phpt +++ b/tests/integration/callableType_4.phpt @@ -1,33 +1,33 @@ --SKIPIF-- --FILE-- check($x); + $x = function () {}; + v::not(v::callableType())->check($x); } catch (CallableTypeException $e) { - echo $e->getMainMessage().PHP_EOL; + echo $e->getMainMessage().PHP_EOL; } try { - v::not(v::callableType())->check('trim'); + v::not(v::callableType())->check('trim'); } catch (CallableTypeException $e) { - echo $e->getMainMessage().PHP_EOL; + echo $e->getMainMessage().PHP_EOL; } try { - v::not(v::callableType())->check(v::callableType(), 'validate'); + v::not(v::callableType())->check(v::callableType(), 'validate'); } catch (CallableTypeException $e) { - echo $e->getMainMessage().PHP_EOL; + echo $e->getMainMessage().PHP_EOL; } ?> diff --git a/tests/integration/countryCode_alpha-2_3.phpt b/tests/integration/countryCode_alpha-2_3.phpt index 52eaf87d..ffb26656 100644 --- a/tests/integration/countryCode_alpha-2_3.phpt +++ b/tests/integration/countryCode_alpha-2_3.phpt @@ -2,8 +2,8 @@ check('1'); diff --git a/tests/integration/countryCode_alpha-2_4.phpt b/tests/integration/countryCode_alpha-2_4.phpt index 39057cee..5d1fbd91 100644 --- a/tests/integration/countryCode_alpha-2_4.phpt +++ b/tests/integration/countryCode_alpha-2_4.phpt @@ -2,8 +2,8 @@ assert('1'); diff --git a/tests/integration/countryCode_alpha-2_5.phpt b/tests/integration/countryCode_alpha-2_5.phpt index ebb3e0dd..08e060ea 100644 --- a/tests/integration/countryCode_alpha-2_5.phpt +++ b/tests/integration/countryCode_alpha-2_5.phpt @@ -2,8 +2,8 @@ check('BR'); diff --git a/tests/integration/countryCode_alpha-2_6.phpt b/tests/integration/countryCode_alpha-2_6.phpt index 2a7d9bb1..91c4b93c 100644 --- a/tests/integration/countryCode_alpha-2_6.phpt +++ b/tests/integration/countryCode_alpha-2_6.phpt @@ -2,8 +2,8 @@ assert('BR'); diff --git a/tests/integration/countryCode_alpha-3_1.phpt b/tests/integration/countryCode_alpha-3_1.phpt index 0ae843a8..197ed12b 100644 --- a/tests/integration/countryCode_alpha-3_1.phpt +++ b/tests/integration/countryCode_alpha-3_1.phpt @@ -4,8 +4,8 @@ countryCode() validate('BRA')); ?> diff --git a/tests/integration/countryCode_alpha-3_2.phpt b/tests/integration/countryCode_alpha-3_2.phpt index 7337eba2..c2bb79c2 100644 --- a/tests/integration/countryCode_alpha-3_2.phpt +++ b/tests/integration/countryCode_alpha-3_2.phpt @@ -2,8 +2,8 @@ assert('BRA'); v::countryCode(CountryCode::ALPHA3)->assert('DEU'); diff --git a/tests/integration/countryCode_alpha-3_3.phpt b/tests/integration/countryCode_alpha-3_3.phpt index 31cf095b..1f5ef1a0 100644 --- a/tests/integration/countryCode_alpha-3_3.phpt +++ b/tests/integration/countryCode_alpha-3_3.phpt @@ -2,9 +2,9 @@ check('1'); diff --git a/tests/integration/countryCode_alpha-3_4.phpt b/tests/integration/countryCode_alpha-3_4.phpt index 43164bab..b5459bec 100644 --- a/tests/integration/countryCode_alpha-3_4.phpt +++ b/tests/integration/countryCode_alpha-3_4.phpt @@ -2,9 +2,9 @@ assert('1'); diff --git a/tests/integration/countryCode_alpha-3_5.phpt b/tests/integration/countryCode_alpha-3_5.phpt index f89b006e..7a39aa96 100644 --- a/tests/integration/countryCode_alpha-3_5.phpt +++ b/tests/integration/countryCode_alpha-3_5.phpt @@ -2,9 +2,9 @@ check('BRA'); diff --git a/tests/integration/countryCode_alpha-3_6.phpt b/tests/integration/countryCode_alpha-3_6.phpt index 30a06add..bece55cd 100644 --- a/tests/integration/countryCode_alpha-3_6.phpt +++ b/tests/integration/countryCode_alpha-3_6.phpt @@ -2,9 +2,9 @@ assert('BRA'); diff --git a/tests/integration/countryCode_number_1.phpt b/tests/integration/countryCode_number_1.phpt index 83ac78aa..0b240029 100644 --- a/tests/integration/countryCode_number_1.phpt +++ b/tests/integration/countryCode_number_1.phpt @@ -4,8 +4,8 @@ countryCode() validate('076')); ?> diff --git a/tests/integration/countryCode_number_2.phpt b/tests/integration/countryCode_number_2.phpt index 9af012e0..bd6b0f1c 100644 --- a/tests/integration/countryCode_number_2.phpt +++ b/tests/integration/countryCode_number_2.phpt @@ -2,8 +2,8 @@ assert('076'); v::countryCode(CountryCode::NUMERIC)->assert('276'); diff --git a/tests/integration/countryCode_number_3.phpt b/tests/integration/countryCode_number_3.phpt index fec45770..b976cd49 100644 --- a/tests/integration/countryCode_number_3.phpt +++ b/tests/integration/countryCode_number_3.phpt @@ -2,9 +2,9 @@ check('BRA'); diff --git a/tests/integration/countryCode_number_4.phpt b/tests/integration/countryCode_number_4.phpt index 51e220d2..eb61bb81 100644 --- a/tests/integration/countryCode_number_4.phpt +++ b/tests/integration/countryCode_number_4.phpt @@ -2,9 +2,9 @@ assert('BRA'); diff --git a/tests/integration/countryCode_number_5.phpt b/tests/integration/countryCode_number_5.phpt index 28a522a6..584e0027 100644 --- a/tests/integration/countryCode_number_5.phpt +++ b/tests/integration/countryCode_number_5.phpt @@ -2,9 +2,9 @@ check('076'); diff --git a/tests/integration/countryCode_number_6.phpt b/tests/integration/countryCode_number_6.phpt index 0b4367bc..7fc653ab 100644 --- a/tests/integration/countryCode_number_6.phpt +++ b/tests/integration/countryCode_number_6.phpt @@ -2,9 +2,9 @@ assert('076'); diff --git a/tests/integration/cpf_1.phpt b/tests/integration/cpf_1.phpt index 98ae35af..303364ba 100644 --- a/tests/integration/cpf_1.phpt +++ b/tests/integration/cpf_1.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - v::cpf()->check('68786265440'); v::cpf()->assert('485.764.121-60'); ?> diff --git a/tests/integration/cpf_2.phpt b/tests/integration/cpf_2.phpt index 3b6162d9..effaf4bc 100644 --- a/tests/integration/cpf_2.phpt +++ b/tests/integration/cpf_2.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\CpfException; +use Respect\Validation\Validator as v; try { v::cpf()->check('this thing'); diff --git a/tests/integration/cpf_3.phpt b/tests/integration/cpf_3.phpt index 1bc3c22b..a190500a 100644 --- a/tests/integration/cpf_3.phpt +++ b/tests/integration/cpf_3.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::cpf()->assert('your mother'); diff --git a/tests/integration/cpf_4.phpt b/tests/integration/cpf_4.phpt index 7d9e225d..8ea45bd4 100644 --- a/tests/integration/cpf_4.phpt +++ b/tests/integration/cpf_4.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\CpfException; +use Respect\Validation\Validator as v; try { v::not(v::cpf())->check('276.865.775-11'); diff --git a/tests/integration/cpf_5.phpt b/tests/integration/cpf_5.phpt index 2735c383..869962db 100644 --- a/tests/integration/cpf_5.phpt +++ b/tests/integration/cpf_5.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::not(v::cpf())->assert('368.928.062-10'); diff --git a/tests/integration/creditCard_1.phpt b/tests/integration/creditCard_1.phpt index d58b261b..a48ad81e 100644 --- a/tests/integration/creditCard_1.phpt +++ b/tests/integration/creditCard_1.phpt @@ -3,7 +3,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -use Respect\Validation\Exceptions\CreditCardException; v::creditCard()->assert('5555 4444 3333 1111'); v::creditCard()->check('4111 1111 1111 1111'); diff --git a/tests/integration/creditCard_2.phpt b/tests/integration/creditCard_2.phpt index 429636b6..db6ef942 100644 --- a/tests/integration/creditCard_2.phpt +++ b/tests/integration/creditCard_2.phpt @@ -2,11 +2,11 @@ check(0); + v::creditCard()->check(0); } catch (CreditCardException $e) { echo $e->getMainMessage().PHP_EOL; } diff --git a/tests/integration/creditCard_3.phpt b/tests/integration/creditCard_3.phpt index abbbe12f..61f58876 100644 --- a/tests/integration/creditCard_3.phpt +++ b/tests/integration/creditCard_3.phpt @@ -2,11 +2,11 @@ check(5555444433331111); + v::not(v::creditCard())->check(5555444433331111); } catch (CreditCardException $e) { echo $e->getMainMessage().PHP_EOL; } diff --git a/tests/integration/email_2.phpt b/tests/integration/email_2.phpt index c8dd8a7f..5cf2d1f3 100644 --- a/tests/integration/email_2.phpt +++ b/tests/integration/email_2.phpt @@ -2,8 +2,8 @@ check('batman'); diff --git a/tests/integration/email_3.phpt b/tests/integration/email_3.phpt index 3b7664e2..de89191c 100644 --- a/tests/integration/email_3.phpt +++ b/tests/integration/email_3.phpt @@ -2,8 +2,8 @@ assert('bruce wayne'); diff --git a/tests/integration/email_4.phpt b/tests/integration/email_4.phpt index b031d704..a26d1222 100644 --- a/tests/integration/email_4.phpt +++ b/tests/integration/email_4.phpt @@ -2,8 +2,8 @@ check('bruce.wayne@gothancity.com'); diff --git a/tests/integration/email_5.phpt b/tests/integration/email_5.phpt index f089e587..f835fcc2 100644 --- a/tests/integration/email_5.phpt +++ b/tests/integration/email_5.phpt @@ -2,8 +2,8 @@ assert('iambatman@gothancity.com'); diff --git a/tests/integration/email_6.phpt b/tests/integration/email_6.phpt index 60b4631b..22812086 100644 --- a/tests/integration/email_6.phpt +++ b/tests/integration/email_6.phpt @@ -2,8 +2,8 @@ check('iambatman@gothancity..com'); diff --git a/tests/integration/find_messages_should_apply_templates_to_flattened_messages.phpt b/tests/integration/find_messages_should_apply_templates_to_flattened_messages.phpt index cbd8a7da..1ed62f82 100644 --- a/tests/integration/find_messages_should_apply_templates_to_flattened_messages.phpt +++ b/tests/integration/find_messages_should_apply_templates_to_flattened_messages.phpt @@ -22,7 +22,7 @@ $validator = v::allOf( )->setName('Validation Form'); try { $validator->assert( - (object) array( + (object) [ 'first_name' => 'fiif', 'last_name' => null, 'desired_login' => null, @@ -31,14 +31,14 @@ try { 'stay_signedin' => null, 'enable_webhistory' => null, 'security_question' => null, - ) + ] ); } catch (NestedValidationExceptionInterface $e) { $messages = $e->findMessages( - array( + [ 'allOf' => 'Invalid {{name}}', 'first_name.length' => 'Invalid length for {{name}} {{input}}', - ) + ] ); print_r($messages); } diff --git a/tests/integration/find_messages_should_return_composite_validation_messages_flattened.phpt b/tests/integration/find_messages_should_return_composite_validation_messages_flattened.phpt index bde5ec9d..c844995f 100644 --- a/tests/integration/find_messages_should_return_composite_validation_messages_flattened.phpt +++ b/tests/integration/find_messages_should_return_composite_validation_messages_flattened.phpt @@ -22,7 +22,7 @@ $validator = v::allOf( )->setName('Validation Form'); try { $validator->assert( - (object) array( + (object) [ 'first_name' => 'fiif', 'last_name' => null, 'desired_login' => null, @@ -31,10 +31,10 @@ try { 'stay_signedin' => null, 'enable_webhistory' => null, 'security_question' => null, - ) + ] ); } catch (NestedValidationExceptionInterface $e) { - print_r($e->findMessages(array('allOf', 'first_name.length'))); + print_r($e->findMessages(['allOf', 'first_name.length'])); } ?> --EXPECTF-- diff --git a/tests/integration/get_messages_should_include_all_validation_messages_in_a_chain.phpt b/tests/integration/get_messages_should_include_all_validation_messages_in_a_chain.phpt index b1e32b14..6ee5bfff 100644 --- a/tests/integration/get_messages_should_include_all_validation_messages_in_a_chain.phpt +++ b/tests/integration/get_messages_should_include_all_validation_messages_in_a_chain.phpt @@ -11,11 +11,11 @@ use Respect\Validation\Exceptions\NestedValidationExceptionInterface; use Respect\Validation\Validator; try { - $input = array( + $input = [ 'username' => 'u', 'birthdate' => 'Not a date', 'password' => '', - ); + ]; Validator::key('username', Validator::length(2, 32)) ->key('birthdate', Validator::date()) diff --git a/tests/integration/intType_2.phpt b/tests/integration/intType_2.phpt index e0efdb61..8bc801f4 100644 --- a/tests/integration/intType_2.phpt +++ b/tests/integration/intType_2.phpt @@ -2,8 +2,8 @@ check('42'); diff --git a/tests/integration/intType_3.phpt b/tests/integration/intType_3.phpt index d04db3b1..6c637332 100644 --- a/tests/integration/intType_3.phpt +++ b/tests/integration/intType_3.phpt @@ -2,8 +2,8 @@ assert('1984'); diff --git a/tests/integration/intType_4.phpt b/tests/integration/intType_4.phpt index c9d929f3..ff3e3565 100644 --- a/tests/integration/intType_4.phpt +++ b/tests/integration/intType_4.phpt @@ -2,8 +2,8 @@ check(42); diff --git a/tests/integration/intType_5.phpt b/tests/integration/intType_5.phpt index 1ca4b558..76d75432 100644 --- a/tests/integration/intType_5.phpt +++ b/tests/integration/intType_5.phpt @@ -2,8 +2,8 @@ assert(1984); diff --git a/tests/integration/ip_3.phpt b/tests/integration/ip_3.phpt index 375b5c8c..736d6d08 100644 --- a/tests/integration/ip_3.phpt +++ b/tests/integration/ip_3.phpt @@ -2,9 +2,9 @@ check('foo'); diff --git a/tests/integration/ip_4.phpt b/tests/integration/ip_4.phpt index 1674a046..fa8fc48a 100644 --- a/tests/integration/ip_4.phpt +++ b/tests/integration/ip_4.phpt @@ -2,9 +2,9 @@ check('10.0.0.1'); diff --git a/tests/integration/ip_5.phpt b/tests/integration/ip_5.phpt index 8313f240..0c96cf27 100644 --- a/tests/integration/ip_5.phpt +++ b/tests/integration/ip_5.phpt @@ -2,9 +2,9 @@ check('127.0.0.1'); diff --git a/tests/integration/ip_6.phpt b/tests/integration/ip_6.phpt index 7a9aa89c..154ec9c9 100644 --- a/tests/integration/ip_6.phpt +++ b/tests/integration/ip_6.phpt @@ -2,8 +2,8 @@ length(1, 15)->noWhitespace(); try { $usernameValidator->assert('really messed up screen#name'); } catch (NestedValidationExceptionInterface $e) { - print_r($e->findMessages(array('alnum', 'length', 'noWhitespace'))); + print_r($e->findMessages(['alnum', 'length', 'noWhitespace'])); } ?> --EXPECTF-- diff --git a/tests/integration/key-nested.phpt b/tests/integration/key-nested.phpt index 455a4f53..40a247e1 100644 --- a/tests/integration/key-nested.phpt +++ b/tests/integration/key-nested.phpt @@ -6,18 +6,17 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -$array = array( - 'foo' => array( +$array = [ + 'foo' => [ 'bar' => 123, - ), -); + ], +]; $object = new stdClass(); $object->foo = new stdClass(); $object->foo->bar = 42; - -var_dump(v::keyNested('foo.bar.baz')->validate(array('foo.bar.baz' => false))); +var_dump(v::keyNested('foo.bar.baz')->validate(['foo.bar.baz' => false])); var_dump(v::keyNested('foo.bar')->validate($array)); var_dump(v::keyNested('foo.bar')->validate(new ArrayObject($array))); var_dump(v::keyNested('foo.bar', v::negative())->validate($array)); diff --git a/tests/integration/keyValue-1.phpt b/tests/integration/keyValue-1.phpt index 31590a8a..7fdadc28 100644 --- a/tests/integration/keyValue-1.phpt +++ b/tests/integration/keyValue-1.phpt @@ -4,11 +4,11 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -$data = array( - 'password' => 'shuberry', - 'password_confirmation' => 'shuberry', - 'valid_passwords' => array('shuberry', 'monty-python') -); +$data = [ + 'password' => 'shuberry', + 'password_confirmation' => 'shuberry', + 'valid_passwords' => ['shuberry', 'monty-python'] +]; v::keyValue('password', 'equals', 'password_confirmation')->check($data); v::keyValue('password', 'in', 'valid_passwords')->assert($data); diff --git a/tests/integration/keyValue-2.phpt b/tests/integration/keyValue-2.phpt index 2dddc905..d446426a 100644 --- a/tests/integration/keyValue-2.phpt +++ b/tests/integration/keyValue-2.phpt @@ -2,18 +2,18 @@ 'shuberry', - 'password_confirmation' => '_shuberry_' -); +$data = [ + 'password' => 'shuberry', + 'password_confirmation' => '_shuberry_' +]; try { - v::keyValue('password', 'equals', 'password_confirmation')->check($data); + v::keyValue('password', 'equals', 'password_confirmation')->check($data); } catch (EqualsException $e) { - echo $e->getMainMessage(); + echo $e->getMainMessage(); } ?> --EXPECTF-- diff --git a/tests/integration/keys_as_validator_names.phpt b/tests/integration/keys_as_validator_names.phpt index 547ee318..8b08211d 100644 --- a/tests/integration/keys_as_validator_names.phpt +++ b/tests/integration/keys_as_validator_names.phpt @@ -14,7 +14,7 @@ try { Validator::key('username', Validator::length(2, 32)) ->key('birthdate', Validator::date()) ->setName('User Subscription Form') - ->assert(array('username' => '0', 'birthdate' => 'Whatever')); + ->assert(['username' => '0', 'birthdate' => 'Whatever']); } catch (NestedValidationExceptionInterface $e) { echo $e->getFullMessage(); } diff --git a/tests/integration/length_2.phpt b/tests/integration/length_2.phpt index a4637274..789fc55e 100644 --- a/tests/integration/length_2.phpt +++ b/tests/integration/length_2.phpt @@ -3,8 +3,8 @@ require_once 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\LengthException; +use Respect\Validation\Validator as v; try { v::length(0, 5)->check('nawarian'); diff --git a/tests/integration/length_3.phpt b/tests/integration/length_3.phpt index 723f35ad..de70151d 100644 --- a/tests/integration/length_3.phpt +++ b/tests/integration/length_3.phpt @@ -3,8 +3,8 @@ require_once 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::length(3, 5)->assert('phpsp.org.br'); diff --git a/tests/integration/minimumAge_2.phpt b/tests/integration/minimumAge_2.phpt index 5eb47cf1..f0883daf 100644 --- a/tests/integration/minimumAge_2.phpt +++ b/tests/integration/minimumAge_2.phpt @@ -2,13 +2,13 @@ check(new DateTime('2010-10-12')); -}catch(MinimumAgeException $exception){ - echo $exception->getMainMessage(); + v::MinimumAge(12)->check(new DateTime('2010-10-12')); +} catch (MinimumAgeException $exception) { + echo $exception->getMainMessage(); } ?> diff --git a/tests/integration/minimumAge_3.phpt b/tests/integration/minimumAge_3.phpt index 7c3ee2a7..5d30cbe4 100644 --- a/tests/integration/minimumAge_3.phpt +++ b/tests/integration/minimumAge_3.phpt @@ -3,7 +3,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; -use Respect\Validation\Exceptions\MinimumAgeException; v::MinimumAge(12, 'd/m/Y')->check('12/10/1999'); diff --git a/tests/integration/minimumAge_4.phpt b/tests/integration/minimumAge_4.phpt index fcf212ae..c8bfcb89 100644 --- a/tests/integration/minimumAge_4.phpt +++ b/tests/integration/minimumAge_4.phpt @@ -2,13 +2,13 @@ assert('12/10/2010'); -}catch(AllOfException $exception){ - echo $exception->getFullMessage(); + v::MinimumAge(12, 'd/m/Y')->assert('12/10/2010'); +} catch (AllOfException $exception) { + echo $exception->getFullMessage(); } ?> diff --git a/tests/integration/notBlank_1.phpt b/tests/integration/notBlank_1.phpt index a2a63edf..3c9886ba 100644 --- a/tests/integration/notBlank_1.phpt +++ b/tests/integration/notBlank_1.phpt @@ -5,30 +5,30 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; $notBlankValues = [ - 'a', - 1, - 1.0 + 'a', + 1, + 1.0 ]; //Check the "pure" value foreach ($notBlankValues as $value) { - v::notBlank()->assert($value); - v::notBlank()->check($value); + v::notBlank()->assert($value); + v::notBlank()->check($value); } //Check the value inside an array foreach ($notBlankValues as $value) { - v::notBlank()->assert([$value]); - v::notBlank()->check([$value]); + v::notBlank()->assert([$value]); + v::notBlank()->check([$value]); } //Check the value inside an object foreach ($notBlankValues as $value) { - $obj = new stdClass(); - $obj->testProp = $value; + $obj = new stdClass(); + $obj->testProp = $value; - v::notBlank()->assert($obj); - v::notBlank()->check($obj); + v::notBlank()->assert($obj); + v::notBlank()->check($obj); } ?> diff --git a/tests/integration/notBlank_2.phpt b/tests/integration/notBlank_2.phpt index fb4475b2..beabed3c 100644 --- a/tests/integration/notBlank_2.phpt +++ b/tests/integration/notBlank_2.phpt @@ -2,9 +2,9 @@ check(null); diff --git a/tests/integration/notBlank_3.phpt b/tests/integration/notBlank_3.phpt index 8852778a..dc410501 100644 --- a/tests/integration/notBlank_3.phpt +++ b/tests/integration/notBlank_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(null); diff --git a/tests/integration/notBlank_4.phpt b/tests/integration/notBlank_4.phpt index 14c84182..8827015e 100644 --- a/tests/integration/notBlank_4.phpt +++ b/tests/integration/notBlank_4.phpt @@ -2,9 +2,9 @@ check(1); @@ -13,7 +13,7 @@ try { } try { - v::not(v::notBlank())->assert(array(1)); + v::not(v::notBlank())->assert([1]); } catch (AllOfException $e) { echo $e->getFullMessage().PHP_EOL; } diff --git a/tests/integration/notEmpty_1.phpt b/tests/integration/notEmpty_1.phpt index 50ebf8eb..a0e5dc81 100644 --- a/tests/integration/notEmpty_1.phpt +++ b/tests/integration/notEmpty_1.phpt @@ -5,15 +5,15 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; $notEmptyValues = [ - 'a', - 1, - 1.0 + 'a', + 1, + 1.0 ]; //Check not empty values foreach ($notEmptyValues as $value) { - v::notEmpty()->assert($value); - v::notEmpty()->check($value); + v::notEmpty()->assert($value); + v::notEmpty()->check($value); } //Check a not empty array diff --git a/tests/integration/notEmpty_2.phpt b/tests/integration/notEmpty_2.phpt index ba070b6b..f71e8654 100644 --- a/tests/integration/notEmpty_2.phpt +++ b/tests/integration/notEmpty_2.phpt @@ -2,9 +2,9 @@ check(null); diff --git a/tests/integration/notEmpty_3.phpt b/tests/integration/notEmpty_3.phpt index c6dd2ad9..eb864213 100644 --- a/tests/integration/notEmpty_3.phpt +++ b/tests/integration/notEmpty_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(null); diff --git a/tests/integration/notEmpty_4.phpt b/tests/integration/notEmpty_4.phpt index 868624f6..183e46e5 100644 --- a/tests/integration/notEmpty_4.phpt +++ b/tests/integration/notEmpty_4.phpt @@ -2,9 +2,9 @@ check(1); @@ -13,7 +13,7 @@ try { } try { - v::not(v::notEmpty())->assert(array(1)); + v::not(v::notEmpty())->assert([1]); } catch (AllOfException $e) { echo $e->getFullMessage().PHP_EOL; } diff --git a/tests/integration/notOptional_1.phpt b/tests/integration/notOptional_1.phpt index 02fee0dc..64e2948c 100644 --- a/tests/integration/notOptional_1.phpt +++ b/tests/integration/notOptional_1.phpt @@ -6,7 +6,7 @@ use Respect\Validation\Validator as v; v::notOptional()->check(0); v::notOptional()->assert(false); -v::notOptional()->assert(array()); +v::notOptional()->assert([]); v::notOptional()->check(true); v::notOptional()->check(PHP_EOL); ?> diff --git a/tests/integration/notOptional_2.phpt b/tests/integration/notOptional_2.phpt index d40b1b11..e3ee7a31 100644 --- a/tests/integration/notOptional_2.phpt +++ b/tests/integration/notOptional_2.phpt @@ -2,9 +2,9 @@ check(null); diff --git a/tests/integration/notOptional_3.phpt b/tests/integration/notOptional_3.phpt index 21ff1f45..9ec4c887 100644 --- a/tests/integration/notOptional_3.phpt +++ b/tests/integration/notOptional_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(null); diff --git a/tests/integration/notOptional_4.phpt b/tests/integration/notOptional_4.phpt index 6492055f..9624b61f 100644 --- a/tests/integration/notOptional_4.phpt +++ b/tests/integration/notOptional_4.phpt @@ -2,9 +2,9 @@ check(0); @@ -13,13 +13,13 @@ try { } try { - v::not(v::notOptional())->assert(array()); + v::not(v::notOptional())->assert([]); } catch (AllOfException $e) { echo $e->getFullMessage().PHP_EOL; } try { - v::not(v::notOptional()->setName('Field'))->assert(array()); + v::not(v::notOptional()->setName('Field'))->assert([]); } catch (AllOfException $e) { echo $e->getFullMessage().PHP_EOL; } diff --git a/tests/integration/not_with_recursion.phpt b/tests/integration/not_with_recursion.phpt index f701bda1..c5be3e0a 100644 --- a/tests/integration/not_with_recursion.phpt +++ b/tests/integration/not_with_recursion.phpt @@ -4,8 +4,8 @@ not() with recursion should update mode from related rules check(1); diff --git a/tests/integration/nullType_3.phpt b/tests/integration/nullType_3.phpt index 1230bfe1..fdd2189d 100644 --- a/tests/integration/nullType_3.phpt +++ b/tests/integration/nullType_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(''); diff --git a/tests/integration/nullType_4.phpt b/tests/integration/nullType_4.phpt index 0682058a..442cd944 100644 --- a/tests/integration/nullType_4.phpt +++ b/tests/integration/nullType_4.phpt @@ -2,9 +2,9 @@ check(null); diff --git a/tests/integration/numeric_2.phpt b/tests/integration/numeric_2.phpt index cc97425e..133eb1b0 100644 --- a/tests/integration/numeric_2.phpt +++ b/tests/integration/numeric_2.phpt @@ -2,9 +2,9 @@ check('a'); diff --git a/tests/integration/numeric_3.phpt b/tests/integration/numeric_3.phpt index 0cc665dc..090bf27b 100644 --- a/tests/integration/numeric_3.phpt +++ b/tests/integration/numeric_3.phpt @@ -2,9 +2,9 @@ setName('Field')->check(null); diff --git a/tests/integration/numeric_4.phpt b/tests/integration/numeric_4.phpt index f1ffd12e..3b3709a7 100644 --- a/tests/integration/numeric_4.phpt +++ b/tests/integration/numeric_4.phpt @@ -2,9 +2,9 @@ check('1'); diff --git a/tests/integration/objectType_2.phpt b/tests/integration/objectType_2.phpt index f8e3e555..02ab8a5b 100644 --- a/tests/integration/objectType_2.phpt +++ b/tests/integration/objectType_2.phpt @@ -2,8 +2,8 @@ check(''); diff --git a/tests/integration/optional-assert.phpt b/tests/integration/optional-assert.phpt index 26a77977..e27b7d79 100644 --- a/tests/integration/optional-assert.phpt +++ b/tests/integration/optional-assert.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - v::optional(v::alpha())->assert(''); v::optional(v::alpha())->assert(null); ?> diff --git a/tests/integration/optional-check.phpt b/tests/integration/optional-check.phpt index 5ea5d5f0..96919873 100644 --- a/tests/integration/optional-check.phpt +++ b/tests/integration/optional-check.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - v::optional(v::alpha())->check(''); v::optional(v::alpha())->check(null); ?> diff --git a/tests/integration/optional-validate.phpt b/tests/integration/optional-validate.phpt index df11a7c4..4c24aeda 100644 --- a/tests/integration/optional-validate.phpt +++ b/tests/integration/optional-validate.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - var_dump(v::alpha()->validate('')); var_dump(v::alpha()->validate(null)); diff --git a/tests/integration/optional_2.phpt b/tests/integration/optional_2.phpt index 13c51953..d2617700 100644 --- a/tests/integration/optional_2.phpt +++ b/tests/integration/optional_2.phpt @@ -2,9 +2,8 @@ check(null); diff --git a/tests/integration/optional_3.phpt b/tests/integration/optional_3.phpt index e6eafdf3..5928beb9 100644 --- a/tests/integration/optional_3.phpt +++ b/tests/integration/optional_3.phpt @@ -2,9 +2,8 @@ setName('My field'))->check(null); diff --git a/tests/integration/set_template_with_single_validator_should_use_template_as_main_message.phpt b/tests/integration/set_template_with_single_validator_should_use_template_as_main_message.phpt index 1101f767..dd30bce8 100644 --- a/tests/integration/set_template_with_single_validator_should_use_template_as_main_message.phpt +++ b/tests/integration/set_template_with_single_validator_should_use_template_as_main_message.phpt @@ -5,8 +5,8 @@ setTemplate() with single validator should use template as main message require 'vendor/autoload.php'; use Respect\Validation\Exceptions\NestedValidationExceptionInterface; -use Respect\Validation\Validator; use Respect\Validation\Rules\Callback; +use Respect\Validation\Validator; try { Validator::callback('is_int')->setTemplate('{{name}} is not tasty')->assert('something'); diff --git a/tests/integration/slug_1.phpt b/tests/integration/slug_1.phpt index 3ea1ec40..dfd3da4d 100644 --- a/tests/integration/slug_1.phpt +++ b/tests/integration/slug_1.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - v::slug()->check('getting-started-to-respect-validation'); v::slug()->assert('welcome-to-php-7'); ?> diff --git a/tests/integration/slug_2.phpt b/tests/integration/slug_2.phpt index ec7de252..61155ea6 100644 --- a/tests/integration/slug_2.phpt +++ b/tests/integration/slug_2.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\SlugException; +use Respect\Validation\Validator as v; try { v::slug()->check('wrong slug'); diff --git a/tests/integration/slug_3.phpt b/tests/integration/slug_3.phpt index 80c510ba..481f1cb4 100644 --- a/tests/integration/slug_3.phpt +++ b/tests/integration/slug_3.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::slug()->assert('wrong slug'); diff --git a/tests/integration/slug_4.phpt b/tests/integration/slug_4.phpt index 98eefa47..06fd5b85 100644 --- a/tests/integration/slug_4.phpt +++ b/tests/integration/slug_4.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\SlugException; +use Respect\Validation\Validator as v; try { v::not(v::slug())->check('good-and-valid-slug'); diff --git a/tests/integration/slug_5.phpt b/tests/integration/slug_5.phpt index f884659a..5ee48233 100644 --- a/tests/integration/slug_5.phpt +++ b/tests/integration/slug_5.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::not(v::slug())->assert('good-and-valid-slug'); diff --git a/tests/integration/stringType_2.phpt b/tests/integration/stringType_2.phpt index 823ed7a8..ed2969c2 100644 --- a/tests/integration/stringType_2.phpt +++ b/tests/integration/stringType_2.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\StringTypeException; +use Respect\Validation\Validator as v; try { v::stringType()->check(42); diff --git a/tests/integration/stringType_3.phpt b/tests/integration/stringType_3.phpt index 25ddb45c..4d8d9407 100644 --- a/tests/integration/stringType_3.phpt +++ b/tests/integration/stringType_3.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::stringType()->assert(42); diff --git a/tests/integration/stringType_4.phpt b/tests/integration/stringType_4.phpt index a0c743d0..156acef1 100644 --- a/tests/integration/stringType_4.phpt +++ b/tests/integration/stringType_4.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\StringTypeException; +use Respect\Validation\Validator as v; try { v::not(v::stringType())->check('hello world'); diff --git a/tests/integration/stringType_5.phpt b/tests/integration/stringType_5.phpt index a3f9dcb5..71ea3099 100644 --- a/tests/integration/stringType_5.phpt +++ b/tests/integration/stringType_5.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::not(v::stringType())->assert('hello world'); diff --git a/tests/integration/tld_2.phpt b/tests/integration/tld_2.phpt index 1265e027..fdb2b1dc 100644 --- a/tests/integration/tld_2.phpt +++ b/tests/integration/tld_2.phpt @@ -2,8 +2,8 @@ check('42'); diff --git a/tests/integration/tld_3.phpt b/tests/integration/tld_3.phpt index 9ffdff68..92232db7 100644 --- a/tests/integration/tld_3.phpt +++ b/tests/integration/tld_3.phpt @@ -2,8 +2,8 @@ assert('1984'); diff --git a/tests/integration/tld_4.phpt b/tests/integration/tld_4.phpt index 7bd0d973..0898ad81 100644 --- a/tests/integration/tld_4.phpt +++ b/tests/integration/tld_4.phpt @@ -2,8 +2,8 @@ check('com'); diff --git a/tests/integration/tld_5.phpt b/tests/integration/tld_5.phpt index e90a967b..bbb9bb9d 100644 --- a/tests/integration/tld_5.phpt +++ b/tests/integration/tld_5.phpt @@ -2,8 +2,8 @@ assert('com'); diff --git a/tests/integration/translator-assert.phpt b/tests/integration/translator-assert.phpt index 2d65078f..4ef04332 100644 --- a/tests/integration/translator-assert.phpt +++ b/tests/integration/translator-assert.phpt @@ -7,11 +7,11 @@ use Respect\Validation\Validator; function translatorCallback($message) { - $messages = array( + $messages = [ 'All of the required rules must pass for {{name}}' => 'Todas as regras requeridas devem passar para {{name}}', '{{name}} must be a string' => '{{name}} deve ser uma string', '{{name}} must have a length between {{minValue}} and {{maxValue}}' => '{{name}} deve possuir de {{minValue}} a {{maxValue}} caracteres', - ); + ]; return $messages[$message]; } diff --git a/tests/integration/translator-check.phpt b/tests/integration/translator-check.phpt index 86d6fa09..f5cff3fc 100644 --- a/tests/integration/translator-check.phpt +++ b/tests/integration/translator-check.phpt @@ -7,9 +7,9 @@ use Respect\Validation\Validator; function translatorCallback($message) { - $messages = array( + $messages = [ '{{name}} must be a string' => '{{name}} deve ser uma string', - ); + ]; return $messages[$message]; } diff --git a/tests/integration/when_1.phpt b/tests/integration/when_1.phpt index 2adfc426..f8b0c837 100644 --- a/tests/integration/when_1.phpt +++ b/tests/integration/when_1.phpt @@ -3,10 +3,10 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; -use Respect\Validation\Rules\IntVal; use Respect\Validation\Rules\Between; +use Respect\Validation\Rules\IntVal; use Respect\Validation\Rules\NotEmpty; +use Respect\Validation\Validator as v; var_dump( v::when(new IntVal(), new Between(1, 5), new NotEmpty())->validate(3), diff --git a/tests/integration/when_2.phpt b/tests/integration/when_2.phpt index 4ab8c765..e1e1d10b 100644 --- a/tests/integration/when_2.phpt +++ b/tests/integration/when_2.phpt @@ -3,11 +3,11 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; -use Respect\Validation\Rules\IntVal; use Respect\Validation\Rules\Between; +use Respect\Validation\Rules\IntVal; use Respect\Validation\Rules\NotEmpty; +use Respect\Validation\Validator as v; try { v::not(v::when(new IntVal(), new Between(1, 5), new NotEmpty()))->assert(3); diff --git a/tests/integration/yes_1.phpt b/tests/integration/yes_1.phpt index 0e580c28..673719a4 100644 --- a/tests/integration/yes_1.phpt +++ b/tests/integration/yes_1.phpt @@ -5,7 +5,6 @@ require 'vendor/autoload.php'; use Respect\Validation\Validator as v; - v::yes()->check('Yes'); ?> --EXPECTF-- diff --git a/tests/integration/yes_2.phpt b/tests/integration/yes_2.phpt index 8b73c467..427655d3 100644 --- a/tests/integration/yes_2.phpt +++ b/tests/integration/yes_2.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\YesException; +use Respect\Validation\Validator as v; try { v::yes()->check('si'); diff --git a/tests/integration/yes_3.phpt b/tests/integration/yes_3.phpt index 1a00c1ab..f889ca88 100644 --- a/tests/integration/yes_3.phpt +++ b/tests/integration/yes_3.phpt @@ -3,8 +3,8 @@ require 'vendor/autoload.php'; -use Respect\Validation\Validator as v; use Respect\Validation\Exceptions\AllOfException; +use Respect\Validation\Validator as v; try { v::yes()->assert(null); diff --git a/tests/library/RuleTestCase.php b/tests/library/RuleTestCase.php index b9751b99..6fc69a02 100644 --- a/tests/library/RuleTestCase.php +++ b/tests/library/RuleTestCase.php @@ -36,9 +36,9 @@ abstract class RuleTestCase extends \PHPUnit_Framework_TestCase $ruleMocked = $this->getMockBuilder('Respect\Validation\Validatable') ->disableOriginalConstructor() ->setMethods( - array( + [ 'assert', 'check', 'getName', 'reportError', 'setName', 'setTemplate', 'validate', - ) + ] ) ->getMock(); diff --git a/tests/unit/Exceptions/CheckExceptionsTest.php b/tests/unit/Exceptions/CheckExceptionsTest.php index dfe4f9dd..1f936674 100644 --- a/tests/unit/Exceptions/CheckExceptionsTest.php +++ b/tests/unit/Exceptions/CheckExceptionsTest.php @@ -11,18 +11,18 @@ namespace Respect\Validation\Exceptions; -use ReflectionClass; use DirectoryIterator; +use ReflectionClass; class CheckExceptionsTest extends \PHPUnit_Framework_TestCase { - protected $deprecateds = array(); + protected $deprecateds = []; public function provideListOfRuleNames() { $rulesDirectory = 'library/Rules'; $rulesDirectoryIterator = new DirectoryIterator($rulesDirectory); - $ruleNames = array(); + $ruleNames = []; foreach ($rulesDirectoryIterator as $fileInfo) { if ($fileInfo->isDir()) { continue; @@ -41,7 +41,7 @@ class CheckExceptionsTest extends \PHPUnit_Framework_TestCase continue; } - $ruleNames[] = array($ruleName); + $ruleNames[] = [$ruleName]; } return $ruleNames; diff --git a/tests/unit/Exceptions/ValidationExceptionTest.php b/tests/unit/Exceptions/ValidationExceptionTest.php index fb1d941b..c40de890 100644 --- a/tests/unit/Exceptions/ValidationExceptionTest.php +++ b/tests/unit/Exceptions/ValidationExceptionTest.php @@ -57,7 +57,7 @@ class ValidationExceptionTest extends \PHPUnit_Framework_TestCase public function testGetMainMessageShouldApplyTemplatePlaceholders() { $sampleValidationException = new ValidationException(); - $sampleValidationException->configure('foo', array('bar' => 1, 'baz' => 2)); + $sampleValidationException->configure('foo', ['bar' => 1, 'baz' => 2]); $sampleValidationException->setTemplate('{{name}} {{bar}} {{baz}}'); $this->assertEquals( 'foo 1 2', @@ -94,75 +94,75 @@ class ValidationExceptionTest extends \PHPUnit_Framework_TestCase $exception = new Exception('My message'); - $iterator1 = new ArrayIterator(array(1, 2, 3)); - $iterator2 = new ArrayIterator(array('a' => 1, 'b' => 2, 'c' => 3)); + $iterator1 = new ArrayIterator([1, 2, 3]); + $iterator2 = new ArrayIterator(['a' => 1, 'b' => 2, 'c' => 3]); - return array( - array('', '""'), - array('foo', '"foo"'), - array(INF, 'INF'), - array(-INF, '-INF'), - array(acos(4), 'NaN'), - array(123, '123'), - array(123.456, '123.456'), - array(array(), '{ }'), - array(array(false), '{ false }'), - array(array(1,2,3,4,5,6,7,8,9,10), '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }'), - array(range(1, 80), '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... }'), - array( - array('foo' => true, 'bar' => array('baz' => 123, 'qux' => array(1, 2, 3))), + return [ + ['', '""'], + ['foo', '"foo"'], + [INF, 'INF'], + [-INF, '-INF'], + [acos(4), 'NaN'], + [123, '123'], + [123.456, '123.456'], + [[], '{ }'], + [[false], '{ false }'], + [[1,2,3,4,5,6,7,8,9,10], '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }'], + [range(1, 80), '{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... }'], + [ + ['foo' => true, 'bar' => ['baz' => 123, 'qux' => [1, 2, 3]]], '{ "foo": true, "bar": { "baz": 123, "qux": { 1, 2, 3 } } }' - ), - array( - array('foo' => true, 'bar' => array('baz' => 123, 'qux' => array('norf' => array(1,2,3)))), + ], + [ + ['foo' => true, 'bar' => ['baz' => 123, 'qux' => ['norf' => [1,2,3]]]], '{ "foo": true, "bar": { "baz": 123, "qux": { "norf": ... } } }' - ), - array(array(array(), 'foo'), '{ { }, "foo" }'), - array(array(array(1), 'foo'), '{ { 1 }, "foo" }'), - array(array(1, array(2, array(3))), '{ 1, { 2, { 3 } } }'), - array(array(1, array(2, array(3, array(4)))), '{ 1, { 2, { 3, ... } } }'), - array(array(1, array(2, array(3, array(4, array(5))))), '{ 1, { 2, { 3, ... } } }'), - array(array('foo', 'bar'), '{ "foo", "bar" }'), - array(array('foo', -1), '{ "foo", -1 }'), - array($object1, '"stringify.phpt"'), - array($object2, sprintf('"%s"', $object2->format('Y-m-d H:i:s'))), - array($object3, '`[object] (stdClass: { })`'), - array($object4, '`[object] (stdClass: { "foo": 1, "bar": false })`'), - array($object5, '`[object] (stdClass: { "name": [object] (stdClass: ...) })`'), - array( + ], + [[[], 'foo'], '{ { }, "foo" }'], + [[[1], 'foo'], '{ { 1 }, "foo" }'], + [[1, [2, [3]]], '{ 1, { 2, { 3 } } }'], + [[1, [2, [3, [4]]]], '{ 1, { 2, { 3, ... } } }'], + [[1, [2, [3, [4, [5]]]]], '{ 1, { 2, { 3, ... } } }'], + [['foo', 'bar'], '{ "foo", "bar" }'], + [['foo', -1], '{ "foo", -1 }'], + [$object1, '"stringify.phpt"'], + [$object2, sprintf('"%s"', $object2->format('Y-m-d H:i:s'))], + [$object3, '`[object] (stdClass: { })`'], + [$object4, '`[object] (stdClass: { "foo": 1, "bar": false })`'], + [$object5, '`[object] (stdClass: { "name": [object] (stdClass: ...) })`'], + [ $exception, '`[exception] (Exception: { "message": "My message", "code": 0, "file": "%s:%d" })`' - ), - array($iterator1, '`[traversable] (ArrayIterator: { 1, 2, 3 })`'), - array($iterator2, '`[traversable] (ArrayIterator: { "a": 1, "b": 2, "c": 3 })`'), - array(stream_context_create(), '`[resource] (stream-context)`'), - array(tmpfile(), '`[resource] (stream)`'), - array(xml_parser_create(), '`[resource] (xml)`'), - array( - array($object4, array(42, 43), true, null, tmpfile()), + ], + [$iterator1, '`[traversable] (ArrayIterator: { 1, 2, 3 })`'], + [$iterator2, '`[traversable] (ArrayIterator: { "a": 1, "b": 2, "c": 3 })`'], + [stream_context_create(), '`[resource] (stream-context)`'], + [tmpfile(), '`[resource] (stream)`'], + [xml_parser_create(), '`[resource] (xml)`'], + [ + [$object4, [42, 43], true, null, tmpfile()], '{ `[object] (stdClass: { "foo": 1, "bar": false })`, { 42, 43 }, true, null, `[resource] (stream)` }' - ), - ); + ], + ]; } public function providerForFormat() { - return array( - array( + return [ + [ '{{foo}} {{bar}} {{baz}}', '"hello" "world" "respect"', - array('foo' => 'hello', 'bar' => 'world', 'baz' => 'respect'), - ), - array( + ['foo' => 'hello', 'bar' => 'world', 'baz' => 'respect'], + ], + [ '{{foo}} {{bar}} {{baz}}', '"hello" {{bar}} "respect"', - array('foo' => 'hello', 'baz' => 'respect'), - ), - array( + ['foo' => 'hello', 'baz' => 'respect'], + ], + [ '{{foo}} {{bar}} {{baz}}', '"hello" {{bar}} "respect"', - array('foo' => 'hello', 'bot' => 111, 'baz' => 'respect'), - ), - ); + ['foo' => 'hello', 'bot' => 111, 'baz' => 'respect'], + ], + ]; } } diff --git a/tests/unit/FactoryTest.php b/tests/unit/FactoryTest.php index 8b8b1a77..e331d04a 100644 --- a/tests/unit/FactoryTest.php +++ b/tests/unit/FactoryTest.php @@ -20,7 +20,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { $factory = new Factory(); - $this->assertEquals(array('Respect\\Validation\\Rules\\'), $factory->getRulePrefixes()); + $this->assertEquals(['Respect\\Validation\\Rules\\'], $factory->getRulePrefixes()); } public function testShouldBeAbleToAppendANewPrefix() @@ -28,7 +28,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase $factory = new Factory(); $factory->appendRulePrefix('My\\Validation\\Rules\\'); - $this->assertEquals(array('Respect\\Validation\\Rules\\', 'My\\Validation\\Rules\\'), $factory->getRulePrefixes()); + $this->assertEquals(['Respect\\Validation\\Rules\\', 'My\\Validation\\Rules\\'], $factory->getRulePrefixes()); } public function testShouldBeAbleToPrependANewRulePrefix() @@ -36,7 +36,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase $factory = new Factory(); $factory->prependRulePrefix('My\\Validation\\Rules\\'); - $this->assertEquals(array('My\\Validation\\Rules\\', 'Respect\\Validation\\Rules\\'), $factory->getRulePrefixes()); + $this->assertEquals(['My\\Validation\\Rules\\', 'Respect\\Validation\\Rules\\'], $factory->getRulePrefixes()); } public function testShouldCreateARuleByName() @@ -49,7 +49,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase public function testShouldDefineConstructorArgumentsWhenCreatingARule() { $factory = new Factory(); - $rule = $factory->rule('date', array('Y-m-d')); + $rule = $factory->rule('date', ['Y-m-d']); $this->assertEquals('Y-m-d', $rule->format); } diff --git a/tests/unit/Rules/AbstractCompositeTest.php b/tests/unit/Rules/AbstractCompositeTest.php index 62daadd1..4e81be60 100644 --- a/tests/unit/Rules/AbstractCompositeTest.php +++ b/tests/unit/Rules/AbstractCompositeTest.php @@ -29,7 +29,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->setName($ruleName); $compositeRuleMock->addRule($simpleRuleMock); @@ -60,7 +60,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->setName($ruleName1); $compositeRuleMock->addRule($simpleRuleMock); @@ -80,7 +80,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->addRule($simpleRuleMock); $compositeRuleMock->setName('Whatever'); @@ -102,7 +102,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->addRule($simpleRuleMock); $compositeRuleMock->setName($ruleName); @@ -124,7 +124,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->addRule($simpleRuleMock); $compositeRuleMock->setName($ruleName); @@ -145,7 +145,7 @@ class AbstractCompositeTest extends \PHPUnit_Framework_TestCase $compositeRuleMock = $this ->getMockBuilder('Respect\\Validation\\Rules\\AbstractComposite') - ->setMethods(array('validate')) + ->setMethods(['validate']) ->getMockForAbstractClass(); $compositeRuleMock->addRule($simpleRuleMock); $compositeRuleMock->setName($ruleName); diff --git a/tests/unit/Rules/AbstractRuleTest.php b/tests/unit/Rules/AbstractRuleTest.php index 1f59cf85..fbf435b9 100644 --- a/tests/unit/Rules/AbstractRuleTest.php +++ b/tests/unit/Rules/AbstractRuleTest.php @@ -11,8 +11,6 @@ namespace Respect\Validation\Rules; -use ReflectionObject; - class AbstractRuleTest extends \PHPUnit_Framework_TestCase { /** @var Respect\Validation\Rules\AbstractRule */ @@ -27,10 +25,10 @@ class AbstractRuleTest extends \PHPUnit_Framework_TestCase public function providerForTrueAndFalse() { - return array( - array(true), - array(false) - ); + return [ + [true], + [false] + ]; } /** @@ -70,5 +68,3 @@ class AbstractRuleTest extends \PHPUnit_Framework_TestCase ); } } - - diff --git a/tests/unit/Rules/AgeTest.php b/tests/unit/Rules/AgeTest.php index 7df08df7..0c22d503 100644 --- a/tests/unit/Rules/AgeTest.php +++ b/tests/unit/Rules/AgeTest.php @@ -48,22 +48,22 @@ class AgeTest extends \PHPUnit_Framework_TestCase public function providerForValidAge() { - return array( - array(18, null, date('Y-m-d', strtotime('-18 years'))), - array(18, null, date('Y-m-d', strtotime('-19 years'))), - array(18, null, new DateTime('-18 years')), - array(18, null, new DateTime('-19 years')), + return [ + [18, null, date('Y-m-d', strtotime('-18 years'))], + [18, null, date('Y-m-d', strtotime('-19 years'))], + [18, null, new DateTime('-18 years')], + [18, null, new DateTime('-19 years')], - array(18, 50, date('Y-m-d', strtotime('-18 years'))), - array(18, 50, date('Y-m-d', strtotime('-50 years'))), - array(18, 50, new DateTime('-18 years')), - array(18, 50, new DateTime('-50 years')), + [18, 50, date('Y-m-d', strtotime('-18 years'))], + [18, 50, date('Y-m-d', strtotime('-50 years'))], + [18, 50, new DateTime('-18 years')], + [18, 50, new DateTime('-50 years')], - array(null, 50, date('Y-m-d', strtotime('-49 years'))), - array(null, 50, date('Y-m-d', strtotime('-50 years'))), - array(null, 50, new DateTime('-49 years')), - array(null, 50, new DateTime('-50 years')), - ); + [null, 50, date('Y-m-d', strtotime('-49 years'))], + [null, 50, date('Y-m-d', strtotime('-50 years'))], + [null, 50, new DateTime('-49 years')], + [null, 50, new DateTime('-50 years')], + ]; } /** @@ -78,18 +78,18 @@ class AgeTest extends \PHPUnit_Framework_TestCase public function providerForInvalidAge() { - return array( - array(18, null, date('Y-m-d', strtotime('-17 years'))), - array(18, null, new DateTime('-17 years')), + return [ + [18, null, date('Y-m-d', strtotime('-17 years'))], + [18, null, new DateTime('-17 years')], - array(18, 50, date('Y-m-d', strtotime('-17 years'))), - array(18, 50, date('Y-m-d', strtotime('-51 years'))), - array(18, 50, new DateTime('-17 years')), - array(18, 50, new DateTime('-51 years')), + [18, 50, date('Y-m-d', strtotime('-17 years'))], + [18, 50, date('Y-m-d', strtotime('-51 years'))], + [18, 50, new DateTime('-17 years')], + [18, 50, new DateTime('-51 years')], - array(null, 50, date('Y-m-d', strtotime('-51 years'))), - array(null, 50, new DateTime('-51 years')), - ); + [null, 50, date('Y-m-d', strtotime('-51 years'))], + [null, 50, new DateTime('-51 years')], + ]; } /** diff --git a/tests/unit/Rules/AllOfTest.php b/tests/unit/Rules/AllOfTest.php index b11ed467..977d9347 100644 --- a/tests/unit/Rules/AllOfTest.php +++ b/tests/unit/Rules/AllOfTest.php @@ -29,9 +29,9 @@ class AllOfTest extends \PHPUnit_Framework_TestCase { $o = new AllOf(); $o->addRules( - array( - array($x = new IntVal(), new Positive()), - ) + [ + [$x = new IntVal(), new Positive()], + ] ); $this->assertTrue($o->hasRule($x)); $this->assertTrue($o->hasRule('Positive')); @@ -40,7 +40,7 @@ class AllOfTest extends \PHPUnit_Framework_TestCase public function testAddRulesUsingSpecificationArray() { $o = new AllOf(); - $o->addRules(array('Between' => array(1, 2))); + $o->addRules(['Between' => [1, 2]]); $this->assertTrue($o->hasRule('Between')); } @@ -117,12 +117,12 @@ class AllOfTest extends \PHPUnit_Framework_TestCase return true; }); - return array( - array($theInvalidOne, $valid1, $valid2), - array($valid2, $valid1, $theInvalidOne), - array($valid2, $theInvalidOne, $valid1), - array($valid1, $valid2, $theInvalidOne), - array($valid1, $theInvalidOne, $valid2), - ); + return [ + [$theInvalidOne, $valid1, $valid2], + [$valid2, $valid1, $theInvalidOne], + [$valid2, $theInvalidOne, $valid1], + [$valid1, $valid2, $theInvalidOne], + [$valid1, $theInvalidOne, $valid2], + ]; } } diff --git a/tests/unit/Rules/AlnumTest.php b/tests/unit/Rules/AlnumTest.php index 1ab8b3eb..a56f15a0 100644 --- a/tests/unit/Rules/AlnumTest.php +++ b/tests/unit/Rules/AlnumTest.php @@ -58,53 +58,53 @@ class AlnumTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} abc 123'), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n abc 123"), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} abc 123'], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n abc 123"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidAlnum() { - return array( - array('alganet', ''), - array('alganet', 'alganet'), - array('0alg-anet0', '0-9'), - array('1', ''), - array("\t", ''), - array("\n", ''), - array('a', ''), - array('foobar', ''), - array('rubinho_', '_'), - array('google.com', '.'), - array('alganet alganet', ''), - array("\nabc", ''), - array("\tdef", ''), - array("\nabc \t", ''), - array(0, ''), - ); + return [ + ['alganet', ''], + ['alganet', 'alganet'], + ['0alg-anet0', '0-9'], + ['1', ''], + ["\t", ''], + ["\n", ''], + ['a', ''], + ['foobar', ''], + ['rubinho_', '_'], + ['google.com', '.'], + ['alganet alganet', ''], + ["\nabc", ''], + ["\tdef", ''], + ["\nabc \t", ''], + [0, ''], + ]; } public function providerForInvalidAlnum() { - return array( - array('', ''), - array('@#$', ''), - array('_', ''), - array('dgç', ''), - array(1e21, ''), //evaluates to "1.0E+21" - array(null, ''), - array(new \stdClass(), ''), - array(array(), ''), - ); + return [ + ['', ''], + ['@#$', ''], + ['_', ''], + ['dgç', ''], + [1e21, ''], //evaluates to "1.0E+21" + [null, ''], + [new \stdClass(), ''], + [[], ''], + ]; } } diff --git a/tests/unit/Rules/AlphaTest.php b/tests/unit/Rules/AlphaTest.php index 82506981..73033764 100644 --- a/tests/unit/Rules/AlphaTest.php +++ b/tests/unit/Rules/AlphaTest.php @@ -60,55 +60,55 @@ class AlphaTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} abc'), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n abc"), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} abc'], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n abc"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidAlpha() { - return array( - array('alganet', ''), - array('alganet', 'alganet'), - array('0alg-anet0', '0-9'), - array('a', ''), - array("\t", ''), - array("\n", ''), - array('foobar', ''), - array('rubinho_', '_'), - array('google.com', '.'), - array('alganet alganet', ''), - array("\nabc", ''), - array("\tdef", ''), - array("\nabc \t", ''), - ); + return [ + ['alganet', ''], + ['alganet', 'alganet'], + ['0alg-anet0', '0-9'], + ['a', ''], + ["\t", ''], + ["\n", ''], + ['foobar', ''], + ['rubinho_', '_'], + ['google.com', '.'], + ['alganet alganet', ''], + ["\nabc", ''], + ["\tdef", ''], + ["\nabc \t", ''], + ]; } public function providerForInvalidAlpha() { - return array( - array('', ''), - array('@#$', ''), - array('_', ''), - array('dgç', ''), - array('122al', ''), - array('122', ''), - array(11123, ''), - array(1e21, ''), - array(0, ''), - array(null, ''), - array(new \stdClass(), ''), - array(array(), ''), - ); + return [ + ['', ''], + ['@#$', ''], + ['_', ''], + ['dgç', ''], + ['122al', ''], + ['122', ''], + [11123, ''], + [1e21, ''], + [0, ''], + [null, ''], + [new \stdClass(), ''], + [[], ''], + ]; } } diff --git a/tests/unit/Rules/AlwaysValidTest.php b/tests/unit/Rules/AlwaysValidTest.php index f3ca025c..7274de58 100644 --- a/tests/unit/Rules/AlwaysValidTest.php +++ b/tests/unit/Rules/AlwaysValidTest.php @@ -19,17 +19,17 @@ class AlwaysValidTest extends \PHPUnit_Framework_TestCase { public function providerForValidAlwaysValid() { - return array( - array(0), - array(1), - array('string'), - array(true), - array(false), - array(null), - array(''), - array(array()), - array(array('array_full')), - ); + return [ + [0], + [1], + ['string'], + [true], + [false], + [null], + [''], + [[]], + [['array_full']], + ]; } /** diff --git a/tests/unit/Rules/ArrayValTest.php b/tests/unit/Rules/ArrayValTest.php index c63a1182..f35481cf 100644 --- a/tests/unit/Rules/ArrayValTest.php +++ b/tests/unit/Rules/ArrayValTest.php @@ -51,11 +51,11 @@ class ArrayValTest extends \PHPUnit_Framework_TestCase public function providerForArray() { - return array( - array(array()), - array(array(1, 2, 3)), - array(new TestAccess()), - ); + return [ + [[]], + [[1, 2, 3]], + [new TestAccess()], + ]; $validator = v::alnum()->length(1, 10); @@ -67,13 +67,13 @@ class ArrayValTest extends \PHPUnit_Framework_TestCase public function providerForNotArray() { - return array( - array(''), - array(null), - array(121), - array(new \stdClass()), - array(false), - array('aaa'), - ); + return [ + [''], + [null], + [121], + [new \stdClass()], + [false], + ['aaa'], + ]; } } diff --git a/tests/unit/Rules/AttributeTest.php b/tests/unit/Rules/AttributeTest.php index c6727dd4..65cb25d3 100644 --- a/tests/unit/Rules/AttributeTest.php +++ b/tests/unit/Rules/AttributeTest.php @@ -67,11 +67,11 @@ class AttributeTest extends \PHPUnit_Framework_TestCase public function providerForInvalidAttributeNames() { - return array( - array(new \stdClass()), - array(123), - array(''), - ); + return [ + [new \stdClass()], + [123], + [''], + ]; } public function testExtraValidatorRulesForAttribute() diff --git a/tests/unit/Rules/BaseTest.php b/tests/unit/Rules/BaseTest.php index a24a66c1..7e372380 100644 --- a/tests/unit/Rules/BaseTest.php +++ b/tests/unit/Rules/BaseTest.php @@ -64,50 +64,50 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function providerForBase() { - return array( - array(2, '011010001'), - array(3, '0120122001'), - array(8, '01234567520'), - array(16, '012a34f5675c20d'), - array(20, '012ah34f5675hic20dj'), - array(50, '012ah34f56A75FGhic20dj'), - array(62, 'Z01xSsg5675hic20dj'), - ); + return [ + [2, '011010001'], + [3, '0120122001'], + [8, '01234567520'], + [16, '012a34f5675c20d'], + [20, '012ah34f5675hic20dj'], + [50, '012ah34f56A75FGhic20dj'], + [62, 'Z01xSsg5675hic20dj'], + ]; } public function providerForInvalidBase() { - return array( - array(2, ''), - array(3, ''), - array(8, ''), - array(16, ''), - array(20, ''), - array(50, ''), - array(62, ''), - array(2, '01210103001'), - array(3, '0120125f2001'), - array(8, '01234dfZ567520'), - array(16, '012aXS34f5675c20d'), - array(20, '012ahZX34f5675hic20dj'), - array(50, '012ahGZ34f56A75FGhic20dj'), - array(61, 'Z01xSsg5675hic20dj'), - ); + return [ + [2, ''], + [3, ''], + [8, ''], + [16, ''], + [20, ''], + [50, ''], + [62, ''], + [2, '01210103001'], + [3, '0120125f2001'], + [8, '01234dfZ567520'], + [16, '012aXS34f5675c20d'], + [20, '012ahZX34f5675hic20dj'], + [50, '012ahGZ34f56A75FGhic20dj'], + [61, 'Z01xSsg5675hic20dj'], + ]; } public function providerForCustomBase() { - return array( - array(2, 'xy', 'xyyxyxxy'), - array(3, 'pfg', 'gfpffp'), - ); + return [ + [2, 'xy', 'xyyxyxxy'], + [3, 'pfg', 'gfpffp'], + ]; } public function providerForExceptionBase() { - return array( - array(63, '01210103001'), - array(125, '0120125f2001'), - ); + return [ + [63, '01210103001'], + [125, '0120125f2001'], + ]; } } diff --git a/tests/unit/Rules/BetweenTest.php b/tests/unit/Rules/BetweenTest.php index 27ed4bd1..97c05f69 100644 --- a/tests/unit/Rules/BetweenTest.php +++ b/tests/unit/Rules/BetweenTest.php @@ -22,43 +22,43 @@ class BetweenTest extends \PHPUnit_Framework_TestCase { public function providerValid() { - return array( - array(0, 1, true, 0), - array(0, 1, true, 1), - array(10, 20, false, 15), - array(10, 20, true, 20), - array(-10, 20, false, -5), - array(-10, 20, false, 0), - array('a', 'z', false, 'j'), - array( + return [ + [0, 1, true, 0], + [0, 1, true, 1], + [10, 20, false, 15], + [10, 20, true, 20], + [-10, 20, false, -5], + [-10, 20, false, 0], + ['a', 'z', false, 'j'], + [ new DateTime('yesterday'), new DateTime('tomorrow'), false, new DateTime('now'), - ), - ); + ], + ]; } public function providerInvalid() { - return array( - array(10, 20, false, ''), - array(10, 20, true, ''), - array(0, 1, false, 0), - array(0, 1, false, 1), - array(0, 1, false, 2), - array(0, 1, false, -1), - array(10, 20, false, 999), - array(10, 20, false, 20), - array(-10, 20, false, -11), - array('a', 'j', false, 'z'), - array( + return [ + [10, 20, false, ''], + [10, 20, true, ''], + [0, 1, false, 0], + [0, 1, false, 1], + [0, 1, false, 2], + [0, 1, false, -1], + [10, 20, false, 999], + [10, 20, false, 20], + [-10, 20, false, -11], + ['a', 'j', false, 'z'], + [ new DateTime('yesterday'), new DateTime('now'), false, new DateTime('tomorrow'), - ), - ); + ], + ]; } /** diff --git a/tests/unit/Rules/BoolTypeTest.php b/tests/unit/Rules/BoolTypeTest.php index 285936e3..d626ff2a 100644 --- a/tests/unit/Rules/BoolTypeTest.php +++ b/tests/unit/Rules/BoolTypeTest.php @@ -45,7 +45,7 @@ class BoolTypeTest extends \PHPUnit_Framework_TestCase $this->assertFalse($validator->__invoke('foo')); $this->assertFalse($validator->__invoke(123123)); $this->assertFalse($validator->__invoke(new \stdClass())); - $this->assertFalse($validator->__invoke(array())); + $this->assertFalse($validator->__invoke([])); $this->assertFalse($validator->__invoke(1)); $this->assertFalse($validator->__invoke(0)); $this->assertFalse($validator->__invoke(null)); diff --git a/tests/unit/Rules/BsnTest.php b/tests/unit/Rules/BsnTest.php index 4d76abc2..673c4a91 100644 --- a/tests/unit/Rules/BsnTest.php +++ b/tests/unit/Rules/BsnTest.php @@ -58,18 +58,18 @@ class BsnTest extends PHPUnit_Framework_TestCase */ public function providerForBsn() { - return array( - array('612890053'), - array('087880532'), - array('386625918'), - array('601608021'), - array('254650703'), - array('478063441'), - array('478063441'), - array('187368429'), - array('541777348'), - array('254283883'), - ); + return [ + ['612890053'], + ['087880532'], + ['386625918'], + ['601608021'], + ['254650703'], + ['478063441'], + ['478063441'], + ['187368429'], + ['541777348'], + ['254283883'], + ]; } /** @@ -77,20 +77,20 @@ class BsnTest extends PHPUnit_Framework_TestCase */ public function providerForInvalidBsn() { - return array( - array('1234567890'), - array('0987654321'), - array('13579024'), - array('612890054'), - array('854650703'), - array('283958721'), - array('231859081'), - array('189023323'), - array('238150912'), - array('382409678'), - array('38240.678'), - array('38240a678'), - array('abcdefghi'), - ); + return [ + ['1234567890'], + ['0987654321'], + ['13579024'], + ['612890054'], + ['854650703'], + ['283958721'], + ['231859081'], + ['189023323'], + ['238150912'], + ['382409678'], + ['38240.678'], + ['38240a678'], + ['abcdefghi'], + ]; } } diff --git a/tests/unit/Rules/CallTest.php b/tests/unit/Rules/CallTest.php index 364596d4..a3603181 100644 --- a/tests/unit/Rules/CallTest.php +++ b/tests/unit/Rules/CallTest.php @@ -20,7 +20,7 @@ class CallTest extends \PHPUnit_Framework_TestCase { public function thisIsASampleCallbackUsedInsideThisTest() { - return array(); + return []; } public function testCallbackValidatorShouldAcceptEmptyString() @@ -37,14 +37,14 @@ class CallTest extends \PHPUnit_Framework_TestCase public function testCallbackValidatorShouldAcceptArrayCallbackDefinition() { - $v = new Call(array($this, 'thisIsASampleCallbackUsedInsideThisTest'), new ArrayVal()); + $v = new Call([$this, 'thisIsASampleCallbackUsedInsideThisTest'], new ArrayVal()); $this->assertTrue($v->assert('test')); } public function testCallbackValidatorShouldAcceptClosures() { $v = new Call(function () { - return array(); + return []; }, new ArrayVal()); $this->assertTrue($v->assert('test')); } diff --git a/tests/unit/Rules/CallableTypeTest.php b/tests/unit/Rules/CallableTypeTest.php index c32c8e37..e41ffbe9 100644 --- a/tests/unit/Rules/CallableTypeTest.php +++ b/tests/unit/Rules/CallableTypeTest.php @@ -52,22 +52,22 @@ class CallableTypeTest extends \PHPUnit_Framework_TestCase public function providerForCallable() { - return array( - array(function () {}), - array('trim'), - array(__METHOD__), - array(array($this, __FUNCTION__)), - ); + return [ + [function () {}], + ['trim'], + [__METHOD__], + [[$this, __FUNCTION__]], + ]; } public function providerForNonCallable() { - return array( - array(' '), - array(INF), - array(array()), - array(new \stdClass()), - array(null), - ); + return [ + [' '], + [INF], + [[]], + [new \stdClass()], + [null], + ]; } } diff --git a/tests/unit/Rules/CallbackTest.php b/tests/unit/Rules/CallbackTest.php index 5415d201..2d61be76 100644 --- a/tests/unit/Rules/CallbackTest.php +++ b/tests/unit/Rules/CallbackTest.php @@ -65,7 +65,7 @@ class CallbackTest extends \PHPUnit_Framework_TestCase public function testCallbackValidatorShouldAcceptArrayCallbackDefinitions() { - $v = new Callback(array($this, 'thisIsASampleCallbackUsedInsideThisTest')); + $v = new Callback([$this, 'thisIsASampleCallbackUsedInsideThisTest']); $this->assertTrue($v->assert('test')); } diff --git a/tests/unit/Rules/CharsetTest.php b/tests/unit/Rules/CharsetTest.php index cddcff79..ddd94913 100644 --- a/tests/unit/Rules/CharsetTest.php +++ b/tests/unit/Rules/CharsetTest.php @@ -49,38 +49,38 @@ class CharsetTest extends \PHPUnit_Framework_TestCase public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(null), - array('16'), - array('aeiou'), - array('a'), - array('Foo'), - array('basic'), - array(10), - ); + return [ + [new \stdClass()], + [[]], + [null], + ['16'], + ['aeiou'], + ['a'], + ['Foo'], + ['basic'], + [10], + ]; } public function providerForValidCharset() { - return array( - array('UTF-8', ''), - array('ISO-8859-1', mb_convert_encoding('açaí', 'ISO-8859-1')), - array(array('UTF-8', 'ASCII'), 'strawberry'), - array('ASCII', mb_convert_encoding('strawberry', 'ASCII')), - array('UTF-8', '日本国'), - array(array('ISO-8859-1', 'EUC-JP'), '日本国'), - array('UTF-8', 'açaí'), - array('ISO-8859-1', 'açaí'), - ); + return [ + ['UTF-8', ''], + ['ISO-8859-1', mb_convert_encoding('açaí', 'ISO-8859-1')], + [['UTF-8', 'ASCII'], 'strawberry'], + ['ASCII', mb_convert_encoding('strawberry', 'ASCII')], + ['UTF-8', '日本国'], + [['ISO-8859-1', 'EUC-JP'], '日本国'], + ['UTF-8', 'açaí'], + ['ISO-8859-1', 'açaí'], + ]; } public function providerForInvalidCharset() { - return array( - array('ASCII', '日本国'), - array('ASCII', 'açaí'), - ); + return [ + ['ASCII', '日本国'], + ['ASCII', 'açaí'], + ]; } } diff --git a/tests/unit/Rules/CnhTest.php b/tests/unit/Rules/CnhTest.php index 179507a9..d1aa0a2a 100644 --- a/tests/unit/Rules/CnhTest.php +++ b/tests/unit/Rules/CnhTest.php @@ -67,122 +67,122 @@ class CnhTest extends \PHPUnit_Framework_TestCase public function validCnhProvider() { - return array( - array('02650306461'), - array('04397322870'), - array('04375701302'), - array('02996843266'), - array('04375700501'), - array('02605113410'), - array('03247061306'), - array('01258750259'), - array('00739751580'), - array('03375637504'), - array('02542551342'), - array('01708111400'), - array('00836510948'), - array('04365445978'), - array('04324384302'), - array('04339482949'), - array('01036520050'), - array('01612581027'), - array('00603454740'), - array('04129251992'), - array('03401740201'), - array('03417248301'), - array('00670431345'), - array('03292694405'), - ); + return [ + ['02650306461'], + ['04397322870'], + ['04375701302'], + ['02996843266'], + ['04375700501'], + ['02605113410'], + ['03247061306'], + ['01258750259'], + ['00739751580'], + ['03375637504'], + ['02542551342'], + ['01708111400'], + ['00836510948'], + ['04365445978'], + ['04324384302'], + ['04339482949'], + ['01036520050'], + ['01612581027'], + ['00603454740'], + ['04129251992'], + ['03401740201'], + ['03417248301'], + ['00670431345'], + ['03292694405'], + ]; } public function invalidCnhProvider() { - return array( - array('12651316461'), - array('14397322871'), - array('14375711312'), - array('12996843266'), - array('14375711511'), - array('12615113411'), - array('13247161316'), - array('11258751259'), - array('11739751581'), - array('13375637514'), - array('12542551342'), - array('11718111411'), - array('11836511948'), - array('14365445978'), - array('14324384312'), - array('14339482949'), - array('11136521151'), - array('11612581127'), - array('11613454741'), - array('14129251992'), - array('13411741211'), - array('13417248311'), - array('11671431345'), - array('13292694415'), - ); + return [ + ['12651316461'], + ['14397322871'], + ['14375711312'], + ['12996843266'], + ['14375711511'], + ['12615113411'], + ['13247161316'], + ['11258751259'], + ['11739751581'], + ['13375637514'], + ['12542551342'], + ['11718111411'], + ['11836511948'], + ['14365445978'], + ['14324384312'], + ['14339482949'], + ['11136521151'], + ['11612581127'], + ['11613454741'], + ['14129251992'], + ['13411741211'], + ['13417248311'], + ['11671431345'], + ['13292694415'], + ]; } public function notIntegerCnhProvider() { - return array( - array(''), - array('F265F3F6461'), - array('F439732287F'), - array('F43757F13F2'), - array('F2996843266'), - array('F43757FF5F1'), - array('F26F511341F'), - array('F3247F613F6'), - array('F125875F259'), - array('FF73975158F'), - array('F33756375F4'), - array('F2542551342'), - array('F17F81114FF'), - array('FF83651F948'), - array('F4365445978'), - array('F43243843F2'), - array('F4339482949'), - array('F1F3652FF5F'), - array('F1612581F27'), - array('FF6F345474F'), - array('F4129251992'), - array('F34F174F2F1'), - array('F34172483F1'), - array('FF67F431345'), - array('F32926944F5'), - ); + return [ + [''], + ['F265F3F6461'], + ['F439732287F'], + ['F43757F13F2'], + ['F2996843266'], + ['F43757FF5F1'], + ['F26F511341F'], + ['F3247F613F6'], + ['F125875F259'], + ['FF73975158F'], + ['F33756375F4'], + ['F2542551342'], + ['F17F81114FF'], + ['FF83651F948'], + ['F4365445978'], + ['F43243843F2'], + ['F4339482949'], + ['F1F3652FF5F'], + ['F1612581F27'], + ['FF6F345474F'], + ['F4129251992'], + ['F34F174F2F1'], + ['F34172483F1'], + ['FF67F431345'], + ['F32926944F5'], + ]; } public function invalidCnhLengthProvider() { - return array( - array('00265003006461'), - array('0043973228700'), - array('00437570013002'), - array('002996843266'), - array('004375700005001'), - array('00260051134100'), - array('00324700613006'), - array('0012587500259'), - array('00007397515800'), - array('0033756375004'), - array('002542551342'), - array('001700811140000'), - array('00008365100948'), - array('004365445978'), - array('0043243843002'), - array('004339482949'), - array('0010036520000500'), - array('0016125810027'), - array('000060034547400'), - array('004129251992'), - array('003400174002001'), - array('0034172483001'), - array('00006700431345'), - array('0032926944005'), - ); + return [ + ['00265003006461'], + ['0043973228700'], + ['00437570013002'], + ['002996843266'], + ['004375700005001'], + ['00260051134100'], + ['00324700613006'], + ['0012587500259'], + ['00007397515800'], + ['0033756375004'], + ['002542551342'], + ['001700811140000'], + ['00008365100948'], + ['004365445978'], + ['0043243843002'], + ['004339482949'], + ['0010036520000500'], + ['0016125810027'], + ['000060034547400'], + ['004129251992'], + ['003400174002001'], + ['0034172483001'], + ['00006700431345'], + ['0032926944005'], + ]; } } diff --git a/tests/unit/Rules/CnpjTest.php b/tests/unit/Rules/CnpjTest.php index b09a508e..90797315 100644 --- a/tests/unit/Rules/CnpjTest.php +++ b/tests/unit/Rules/CnpjTest.php @@ -67,55 +67,55 @@ class CnpjTest extends \PHPUnit_Framework_TestCase public function providerValidFormattedCnpj() { - return array( - array('32.063.364/0001-07'), - array('24.663.454/0001-00'), - array('57.535.083/0001-30'), - array('24.760.428/0001-09'), - array('27.355.204/0001-00'), - array('36.310.327/0001-07'), - ); + return [ + ['32.063.364/0001-07'], + ['24.663.454/0001-00'], + ['57.535.083/0001-30'], + ['24.760.428/0001-09'], + ['27.355.204/0001-00'], + ['36.310.327/0001-07'], + ]; } public function providerValidUnformattedCnpj() { - return array( - array('38175021000110'), - array('37550610000179'), - array('12774546000189'), - array('77456211000168'), - array('02023077000102'), - ); + return [ + ['38175021000110'], + ['37550610000179'], + ['12774546000189'], + ['77456211000168'], + ['02023077000102'], + ]; } public function providerInvalidFormattedCnpj() { - return array( - array('12.345.678/9012-34'), - array('11.111.111/1111-11'), - ); + return [ + ['12.345.678/9012-34'], + ['11.111.111/1111-11'], + ]; } public function providerInvalidUnformattedCnpj() { - return array( - array('11111111111'), - array('22222222222'), - array('12345678900'), - array('99299929384'), - array('84434895894'), - array('44242340000'), - ); + return [ + ['11111111111'], + ['22222222222'], + ['12345678900'], + ['99299929384'], + ['84434895894'], + ['44242340000'], + ]; } public function providerInvalidFormattedAndUnformattedCnpjLength() { - return array( - array('1'), - array('22'), - array('123'), - array('992999999999929384'), - array('99-010-0.'), - ); + return [ + ['1'], + ['22'], + ['123'], + ['992999999999929384'], + ['99-010-0.'], + ]; } } diff --git a/tests/unit/Rules/CntrlTest.php b/tests/unit/Rules/CntrlTest.php index 47e4684d..1a8fdd46 100644 --- a/tests/unit/Rules/CntrlTest.php +++ b/tests/unit/Rules/CntrlTest.php @@ -58,44 +58,44 @@ class CntrlTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){} ', '!@#$%^&*(){} '), - array('[]?+=/\\-_|"\',<>. ', "[]?+=/\\-_|\"',<>. \t \n"), - ); + return [ + ['!@#$%^&*(){} ', '!@#$%^&*(){} '], + ['[]?+=/\\-_|"\',<>. ', "[]?+=/\\-_|\"',<>. \t \n"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidCntrl() { - return array( - array("\n"), - array("\r"), - array("\t"), - array("\n\r\t"), + return [ + ["\n"], + ["\r"], + ["\t"], + ["\n\r\t"], // array("\n \n", ' '), TODO Verify this - ); + ]; } public function providerForInvalidCntrl() { - return array( - array(''), - array('16-50'), - array('a'), - array(' '), - array('Foo'), - array('12.1'), - array('-12'), - array(-12), - array('alganet'), - ); + return [ + [''], + ['16-50'], + ['a'], + [' '], + ['Foo'], + ['12.1'], + ['-12'], + [-12], + ['alganet'], + ]; } } diff --git a/tests/unit/Rules/ConsonantTest.php b/tests/unit/Rules/ConsonantTest.php index d46dc9fb..a9e7a482 100644 --- a/tests/unit/Rules/ConsonantTest.php +++ b/tests/unit/Rules/ConsonantTest.php @@ -58,49 +58,49 @@ class ConsonantTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} bc dfg'), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n bc dfg"), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} bc dfg'], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n bc dfg"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidConsonants() { - return array( - array('b'), - array('c'), - array('d'), - array('w'), - array('y'), - array('y',''), - array('bcdfghklmnp'), - array('bcdfghklm np'), - array('qrst'), - array("\nz\t"), - array('zbcxwyrspq'), - ); + return [ + ['b'], + ['c'], + ['d'], + ['w'], + ['y'], + ['y',''], + ['bcdfghklmnp'], + ['bcdfghklm np'], + ['qrst'], + ["\nz\t"], + ['zbcxwyrspq'], + ]; } public function providerForInvalidConsonants() { - return array( - array(''), - array(null), - array('16'), - array('aeiou'), - array('a'), - array('Foo'), - array(-50), - array('basic'), - ); + return [ + [''], + [null], + ['16'], + ['aeiou'], + ['a'], + ['Foo'], + [-50], + ['basic'], + ]; } } diff --git a/tests/unit/Rules/ContainsTest.php b/tests/unit/Rules/ContainsTest.php index f14f6164..3cefaea1 100644 --- a/tests/unit/Rules/ContainsTest.php +++ b/tests/unit/Rules/ContainsTest.php @@ -56,46 +56,46 @@ class ContainsTest extends \PHPUnit_Framework_TestCase public function providerForContains() { - return array( - array('foo', array('bar', 'foo')), - array('foo', 'barbazFOO'), - array('foo', 'barbazfoo'), - array('foo', 'foobazfoO'), - array('1', array(2, 3, 1)), - array('1', array(2, 3, '1')), - ); + return [ + ['foo', ['bar', 'foo']], + ['foo', 'barbazFOO'], + ['foo', 'barbazfoo'], + ['foo', 'foobazfoO'], + ['1', [2, 3, 1]], + ['1', [2, 3, '1']], + ]; } public function providerForContainsIdentical() { - return array( - array('foo', array('fool', 'foo')), - array('foo', 'barbazfoo'), - array('foo', 'foobazfoo'), - array('1', array(2, 3, (string) 1)), - array('1', array(2, 3, '1')), - ); + return [ + ['foo', ['fool', 'foo']], + ['foo', 'barbazfoo'], + ['foo', 'foobazfoo'], + ['1', [2, 3, (string) 1]], + ['1', [2, 3, '1']], + ]; } public function providerForNotContains() { - return array( - array('foo', ''), - array('bat', array('bar', 'foo')), - array('foo', 'barfaabaz'), - array('foo', 'faabarbaz'), - ); + return [ + ['foo', ''], + ['bat', ['bar', 'foo']], + ['foo', 'barfaabaz'], + ['foo', 'faabarbaz'], + ]; } public function providerForNotContainsIdentical() { - return array( - array('foo', ''), - array('bat', array('BAT', 'foo')), - array('bat', array('BaT', 'Batata')), - array('foo', 'barfaabaz'), - array('foo', 'barbazFOO'), - array('foo', 'faabarbaz'), - ); + return [ + ['foo', ''], + ['bat', ['BAT', 'foo']], + ['bat', ['BaT', 'Batata']], + ['foo', 'barfaabaz'], + ['foo', 'barbazFOO'], + ['foo', 'faabarbaz'], + ]; } } diff --git a/tests/unit/Rules/CountryCodeTest.php b/tests/unit/Rules/CountryCodeTest.php index 6a5b1fc4..d61897f0 100644 --- a/tests/unit/Rules/CountryCodeTest.php +++ b/tests/unit/Rules/CountryCodeTest.php @@ -39,26 +39,26 @@ class CountryCodeTest extends \PHPUnit_Framework_TestCase public function providerForValidCountryCode() { - return array( - array(CountryCode::ALPHA2, 'BR'), - array(CountryCode::ALPHA3, 'BRA'), - array(CountryCode::NUMERIC, '076'), - array(CountryCode::ALPHA2, 'DE'), - array(CountryCode::ALPHA3, 'DEU'), - array(CountryCode::NUMERIC, '276'), - array(CountryCode::ALPHA2, 'US'), - array(CountryCode::ALPHA3, 'USA'), - array(CountryCode::NUMERIC, '840') - ); + return [ + [CountryCode::ALPHA2, 'BR'], + [CountryCode::ALPHA3, 'BRA'], + [CountryCode::NUMERIC, '076'], + [CountryCode::ALPHA2, 'DE'], + [CountryCode::ALPHA3, 'DEU'], + [CountryCode::NUMERIC, '276'], + [CountryCode::ALPHA2, 'US'], + [CountryCode::ALPHA3, 'USA'], + [CountryCode::NUMERIC, '840'] + ]; } public function providerForInvalidCountryCode() { - return array( - array(CountryCode::ALPHA2, 'USA'), - array(CountryCode::ALPHA3, 'US'), - array(CountryCode::NUMERIC, '000') - ); + return [ + [CountryCode::ALPHA2, 'USA'], + [CountryCode::ALPHA3, 'US'], + [CountryCode::NUMERIC, '000'] + ]; } /** diff --git a/tests/unit/Rules/CpfTest.php b/tests/unit/Rules/CpfTest.php index d0aa211c..6764bb66 100644 --- a/tests/unit/Rules/CpfTest.php +++ b/tests/unit/Rules/CpfTest.php @@ -70,58 +70,58 @@ class CpfTest extends \PHPUnit_Framework_TestCase public function providerValidFormattedCpf() { - return array( - array('342.444.198-88'), - array('342.444.198.88'), - array('350.45261819'), - array('693-319-118-40'), - array('3.6.8.8.9.2.5.5.4.8.8'), - ); + return [ + ['342.444.198-88'], + ['342.444.198.88'], + ['350.45261819'], + ['693-319-118-40'], + ['3.6.8.8.9.2.5.5.4.8.8'], + ]; } public function providerValidUnformattedCpf() { - return array( - array('11598647644'), - array('86734718697'), - array('86223423284'), - array('24845408333'), - array('95574461102'), - ); + return [ + ['11598647644'], + ['86734718697'], + ['86223423284'], + ['24845408333'], + ['95574461102'], + ]; } public function providerInvalidFormattedCpf() { - return array( - array(''), - array('000.000.000-00'), - array('111.222.444-05'), - array('999999999.99'), - array('8.8.8.8.8.8.8.8.8.8.8'), - array('693-319-110-40'), - array('698.111-111.00'), - ); + return [ + [''], + ['000.000.000-00'], + ['111.222.444-05'], + ['999999999.99'], + ['8.8.8.8.8.8.8.8.8.8.8'], + ['693-319-110-40'], + ['698.111-111.00'], + ]; } public function providerInvalidUnformattedCpf() { - return array( - array('11111111111'), - array('22222222222'), - array('12345678900'), - array('99299929384'), - array('84434895894'), - array('44242340000'), - ); + return [ + ['11111111111'], + ['22222222222'], + ['12345678900'], + ['99299929384'], + ['84434895894'], + ['44242340000'], + ]; } public function providerInvalidFormattedAndUnformattedCpfLength() { - return array( - array('1'), - array('22'), - array('123'), - array('992999999999929384'), - ); + return [ + ['1'], + ['22'], + ['123'], + ['992999999999929384'], + ]; } } diff --git a/tests/unit/Rules/CreditCardTest.php b/tests/unit/Rules/CreditCardTest.php index fcf73f54..5cef2e88 100644 --- a/tests/unit/Rules/CreditCardTest.php +++ b/tests/unit/Rules/CreditCardTest.php @@ -47,24 +47,24 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase public function providerForCreditCard() { - return array( - array('5376 7473 9720 8720'), // MasterCard - array('4024.0071.5336.1885'), // Visa 16 - array('4024 007 193 879'), // Visa 13 - array('340-3161-9380-9364'), // AmericanExpress - array('30351042633884'), // Dinners - ); + return [ + ['5376 7473 9720 8720'], // MasterCard + ['4024.0071.5336.1885'], // Visa 16 + ['4024 007 193 879'], // Visa 13 + ['340-3161-9380-9364'], // AmericanExpress + ['30351042633884'], // Dinners + ]; } public function providerForNotCreditCard() { - return array( - array(''), - array(null), - array('it isnt my credit card number'), - array('&stR@ng3|) (|-|@r$'), - array('1234 1234 1234 1234'), - array('1234.1234.1234.1234'), - ); + return [ + [''], + [null], + ['it isnt my credit card number'], + ['&stR@ng3|) (|-|@r$'], + ['1234 1234 1234 1234'], + ['1234.1234.1234.1234'], + ]; } } diff --git a/tests/unit/Rules/DateTest.php b/tests/unit/Rules/DateTest.php index 27f3ddd9..3c781724 100644 --- a/tests/unit/Rules/DateTest.php +++ b/tests/unit/Rules/DateTest.php @@ -121,13 +121,13 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function providerForDateTimeTimezoneStrings() { - return array( - array('UTC', 'c', '2005-12-30T01:02:03+01:00'), - array('UTC', 'c', '2004-02-12T15:19:21+00:00'), - array('UTC', 'r', 'Thu, 29 Dec 2005 01:02:03 +0000'), - array('Europe/Amsterdam', 'c', '2005-12-30T01:02:03+01:00'), - array('Europe/Amsterdam', 'c', '2004-02-12T15:19:21+00:00'), - array('Europe/Amsterdam', 'r', 'Thu, 29 Dec 2005 01:02:03 +0000'), - ); + return [ + ['UTC', 'c', '2005-12-30T01:02:03+01:00'], + ['UTC', 'c', '2004-02-12T15:19:21+00:00'], + ['UTC', 'r', 'Thu, 29 Dec 2005 01:02:03 +0000'], + ['Europe/Amsterdam', 'c', '2005-12-30T01:02:03+01:00'], + ['Europe/Amsterdam', 'c', '2004-02-12T15:19:21+00:00'], + ['Europe/Amsterdam', 'r', 'Thu, 29 Dec 2005 01:02:03 +0000'], + ]; } } diff --git a/tests/unit/Rules/DigitTest.php b/tests/unit/Rules/DigitTest.php index 142d56b2..9b6ed714 100644 --- a/tests/unit/Rules/DigitTest.php +++ b/tests/unit/Rules/DigitTest.php @@ -58,48 +58,48 @@ class DigitTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} 123'), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n 123"), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} 123'], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n 123"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidDigits() { - return array( - array("\n\t"), - array(' '), - array(165), - array(1650), - array('01650'), - array('165'), - array('1650'), - array('16 50'), - array("\n5\t"), - array('16-50', '-'), - ); + return [ + ["\n\t"], + [' '], + [165], + [1650], + ['01650'], + ['165'], + ['1650'], + ['16 50'], + ["\n5\t"], + ['16-50', '-'], + ]; } public function providerForInvalidDigits() { - return array( - array(''), - array(null), - array('16-50'), - array('a'), - array('Foo'), - array('12.1'), - array('-12'), - array(-12), - ); + return [ + [''], + [null], + ['16-50'], + ['a'], + ['Foo'], + ['12.1'], + ['-12'], + [-12], + ]; } } diff --git a/tests/unit/Rules/DirectoryTest.php b/tests/unit/Rules/DirectoryTest.php index 1ad1a7f8..a555e7ca 100644 --- a/tests/unit/Rules/DirectoryTest.php +++ b/tests/unit/Rules/DirectoryTest.php @@ -52,26 +52,26 @@ class DirectoryTest extends \PHPUnit_Framework_TestCase public function providerForDirectoryObjects() { - return array( - array(new \SplFileInfo(__DIR__), true), - array(new \SplFileInfo(__FILE__), false), + return [ + [new \SplFileInfo(__DIR__), true], + [new \SplFileInfo(__FILE__), false], /* * PHP 5.4 does not allows to use SplFileObject with directories. * array(new \SplFileObject(__DIR__), true), */ - array(new \SplFileObject(__FILE__), false), - ); + [new \SplFileObject(__FILE__), false], + ]; } public function providerForValidDirectory() { - $directories = array( + $directories = [ sys_get_temp_dir().DIRECTORY_SEPARATOR.'dataprovider-1', sys_get_temp_dir().DIRECTORY_SEPARATOR.'dataprovider-2', sys_get_temp_dir().DIRECTORY_SEPARATOR.'dataprovider-3', sys_get_temp_dir().DIRECTORY_SEPARATOR.'dataprovider-4', sys_get_temp_dir().DIRECTORY_SEPARATOR.'dataprovider-5', - ); + ]; return array_map( function ($directory) { @@ -79,7 +79,7 @@ class DirectoryTest extends \PHPUnit_Framework_TestCase mkdir($directory, 0766, true); } - return array(realpath($directory)); + return [realpath($directory)]; }, $directories ); @@ -88,14 +88,14 @@ class DirectoryTest extends \PHPUnit_Framework_TestCase public function providerForInvalidDirectory() { return array_chunk( - array( + [ '', __FILE__, __DIR__.'/../../../../../README.md', __DIR__.'/../../../../../composer.json', new \stdClass(), - array(__DIR__), - ), + [__DIR__], + ], 1 ); } diff --git a/tests/unit/Rules/DomainTest.php b/tests/unit/Rules/DomainTest.php index f230a40c..1593e5da 100644 --- a/tests/unit/Rules/DomainTest.php +++ b/tests/unit/Rules/DomainTest.php @@ -60,29 +60,29 @@ class DomainTest extends \PHPUnit_Framework_TestCase public function providerForDomain() { - return array( - array('111111111111domain.local', false), - array('111111111111.domain.local', false), - array('example.com'), - array('xn--bcher-kva.ch'), - array('mail.xn--bcher-kva.ch'), - array('example-hyphen.com'), - ); + return [ + ['111111111111domain.local', false], + ['111111111111.domain.local', false], + ['example.com'], + ['xn--bcher-kva.ch'], + ['mail.xn--bcher-kva.ch'], + ['example-hyphen.com'], + ]; } public function providerForNotDomain() { - return array( - array(null), - array(''), - array('2222222domain.local'), - array('example--invalid.com'), - array('-example-invalid.com'), - array('example.invalid.-com'), - array('xn--bcher--kva.ch'), - array('1.2.3.256'), - array('1.2.3.4'), - ); + return [ + [null], + [''], + ['2222222domain.local'], + ['example--invalid.com'], + ['-example-invalid.com'], + ['example.invalid.-com'], + ['xn--bcher--kva.ch'], + ['1.2.3.256'], + ['1.2.3.4'], + ]; } /** diff --git a/tests/unit/Rules/EachTest.php b/tests/unit/Rules/EachTest.php index c0ad97e6..040a90bb 100644 --- a/tests/unit/Rules/EachTest.php +++ b/tests/unit/Rules/EachTest.php @@ -21,33 +21,33 @@ class EachTest extends \PHPUnit_Framework_TestCase public function testValidatorShouldPassIfEveryArrayItemPass() { $v = new Each(new NotEmpty()); - $result = $v->validate(array(1, 2, 3, 4, 5)); + $result = $v->validate([1, 2, 3, 4, 5]); $this->assertTrue($result); - $result = $v->check(array(1, 2, 3, 4, 5)); + $result = $v->check([1, 2, 3, 4, 5]); $this->assertTrue($result); - $result = $v->assert(array(1, 2, 3, 4, 5)); + $result = $v->assert([1, 2, 3, 4, 5]); $this->assertTrue($result); } public function testValidatorShouldPassIfEveryArrayItemAndKeyPass() { $v = new Each(new Alpha(), new IntVal()); - $result = $v->validate(array('a', 'b', 'c', 'd', 'e')); + $result = $v->validate(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); - $result = $v->check(array('a', 'b', 'c', 'd', 'e')); + $result = $v->check(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); - $result = $v->assert(array('a', 'b', 'c', 'd', 'e')); + $result = $v->assert(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); } public function testValidatorShouldPassWithOnlyKeyValidation() { $v = new Each(null, new IntVal()); - $result = $v->validate(array('a', 'b', 'c', 'd', 'e')); + $result = $v->validate(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); - $result = $v->check(array('a', 'b', 'c', 'd', 'e')); + $result = $v->check(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); - $result = $v->assert(array('a', 'b', 'c', 'd', 'e')); + $result = $v->assert(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); } @@ -57,7 +57,7 @@ class EachTest extends \PHPUnit_Framework_TestCase public function testValidatorShouldNotPassWithOnlyKeyValidation() { $v = new Each(null, new StringType()); - $result = $v->assert(array('a', 'b', 'c', 'd', 'e')); + $result = $v->assert(['a', 'b', 'c', 'd', 'e']); $this->assertTrue($result); } @@ -71,7 +71,7 @@ class EachTest extends \PHPUnit_Framework_TestCase public function testValidatorShouldFailOnInvalidItem() { $v = new Each(new NotEmpty()); - $result = $v->validate(array('', 2, 3, 4, 5)); + $result = $v->validate(['', 2, 3, 4, 5]); $this->assertFalse($result); } @@ -81,7 +81,7 @@ class EachTest extends \PHPUnit_Framework_TestCase public function testAssertShouldFailOnInvalidItem() { $v = new Each(new IntVal()); - $result = $v->assert(array('a', 2, 3, 4, 5)); + $result = $v->assert(['a', 2, 3, 4, 5]); $this->assertFalse($result); } diff --git a/tests/unit/Rules/EmailTest.php b/tests/unit/Rules/EmailTest.php index 6d9fd013..1d74eeba 100644 --- a/tests/unit/Rules/EmailTest.php +++ b/tests/unit/Rules/EmailTest.php @@ -119,29 +119,29 @@ class EmailTest extends \PHPUnit_Framework_TestCase public function providerForValidEmail() { - return array( - array('test@test.com'), - array('mail+mail@gmail.com'), - array('mail.email@e.test.com'), - array('a@a.a'), - ); + return [ + ['test@test.com'], + ['mail+mail@gmail.com'], + ['mail.email@e.test.com'], + ['a@a.a'], + ]; } public function providerForInvalidEmail() { - return array( - array(''), - array('test@test'), - array('test'), - array('test@тест.рф'), - array('@test.com'), - array('mail@test@test.com'), - array('test.test@'), - array('test.@test.com'), - array('test@.test.com'), - array('test@test..com'), - array('test@test.com.'), - array('.test@test.com'), - ); + return [ + [''], + ['test@test'], + ['test'], + ['test@тест.рф'], + ['@test.com'], + ['mail@test@test.com'], + ['test.test@'], + ['test.@test.com'], + ['test@.test.com'], + ['test@test..com'], + ['test@test.com.'], + ['.test@test.com'], + ]; } } diff --git a/tests/unit/Rules/EndsWithTest.php b/tests/unit/Rules/EndsWithTest.php index e170076b..1fb50746 100644 --- a/tests/unit/Rules/EndsWithTest.php +++ b/tests/unit/Rules/EndsWithTest.php @@ -42,27 +42,27 @@ class EndsWithTest extends \PHPUnit_Framework_TestCase public function providerForEndsWith() { - return array( - array('foo', array('bar', 'foo')), - array('foo', 'barbazFOO'), - array('foo', 'barbazfoo'), - array('foo', 'foobazfoo'), - array('1', array(2, 3, 1)), - array('1', array(2, 3, '1'), true), - ); + return [ + ['foo', ['bar', 'foo']], + ['foo', 'barbazFOO'], + ['foo', 'barbazfoo'], + ['foo', 'foobazfoo'], + ['1', [2, 3, 1]], + ['1', [2, 3, '1'], true], + ]; } public function providerForNotEndsWith() { - return array( - array('foo', ''), - array('bat', array('bar', 'foo')), - array('foo', 'barfaabaz'), - array('foo', 'barbazFOO', true), - array('foo', 'faabarbaz'), - array('foo', 'baabazfaa'), - array('foo', 'baafoofaa'), - array('1', array(1, '1', 3), true), - ); + return [ + ['foo', ''], + ['bat', ['bar', 'foo']], + ['foo', 'barfaabaz'], + ['foo', 'barbazFOO', true], + ['foo', 'faabarbaz'], + ['foo', 'baabazfaa'], + ['foo', 'baafoofaa'], + ['1', [1, '1', 3], true], + ]; } } diff --git a/tests/unit/Rules/EqualsTest.php b/tests/unit/Rules/EqualsTest.php index 59c4146b..b90a2b6a 100644 --- a/tests/unit/Rules/EqualsTest.php +++ b/tests/unit/Rules/EqualsTest.php @@ -52,19 +52,19 @@ class EqualsTest extends \PHPUnit_Framework_TestCase public function providerForEquals() { - return array( - array('foo', 'foo'), - array(array(), array()), - array(new stdClass(), new stdClass()), - array(10, '10'), - ); + return [ + ['foo', 'foo'], + [[], []], + [new stdClass(), new stdClass()], + [10, '10'], + ]; } public function providerForNotEquals() { - return array( - array('foo', ''), - array('foo', 'bar'), - ); + return [ + ['foo', ''], + ['foo', 'bar'], + ]; } } diff --git a/tests/unit/Rules/EvenTest.php b/tests/unit/Rules/EvenTest.php index a6de8f44..fe72d460 100644 --- a/tests/unit/Rules/EvenTest.php +++ b/tests/unit/Rules/EvenTest.php @@ -47,22 +47,22 @@ class EvenTest extends \PHPUnit_Framework_TestCase public function providerForEven() { - return array( - array(''), - array(-2), - array(-0), - array(0), - array(32), - ); + return [ + [''], + [-2], + [-0], + [0], + [32], + ]; } public function providerForNotEven() { - return array( - array(-5), - array(-1), - array(1), - array(13), - ); + return [ + [-5], + [-1], + [1], + [13], + ]; } } diff --git a/tests/unit/Rules/ExecutableTest.php b/tests/unit/Rules/ExecutableTest.php index a3dab443..9a04cb63 100644 --- a/tests/unit/Rules/ExecutableTest.php +++ b/tests/unit/Rules/ExecutableTest.php @@ -52,7 +52,7 @@ class ExecutableTest extends \PHPUnit_Framework_TestCase public function testShouldValidateObjects() { $rule = new Executable(); - $object = $this->getMock('SplFileInfo', array('isExecutable'), array('somefile.txt')); + $object = $this->getMock('SplFileInfo', ['isExecutable'], ['somefile.txt']); $object->expects($this->once()) ->method('isExecutable') ->will($this->returnValue(true)); diff --git a/tests/unit/Rules/ExtensionTest.php b/tests/unit/Rules/ExtensionTest.php index d7d6b0f9..3f282ba9 100644 --- a/tests/unit/Rules/ExtensionTest.php +++ b/tests/unit/Rules/ExtensionTest.php @@ -24,12 +24,12 @@ class ExtensionTest extends PHPUnit_Framework_TestCase { public function providerValidExtension() { - return array( - array('filename.txt', 'txt'), - array('filename.jpg', 'jpg'), - array('filename.inc.php', 'php'), - array('filename.foo.bar.bz2', 'bz2'), - ); + return [ + ['filename.txt', 'txt'], + ['filename.jpg', 'jpg'], + ['filename.inc.php', 'php'], + ['filename.foo.bar.bz2', 'bz2'], + ]; } /** @@ -53,7 +53,7 @@ class ExtensionTest extends PHPUnit_Framework_TestCase public function testShouldInvalidWhenNotStringNorSplFileInfo() { - $nonFile = array(__FILE__); + $nonFile = [__FILE__]; $rule = new Extension('php'); diff --git a/tests/unit/Rules/FactorTest.php b/tests/unit/Rules/FactorTest.php index 3cec3e08..d4016e8a 100644 --- a/tests/unit/Rules/FactorTest.php +++ b/tests/unit/Rules/FactorTest.php @@ -65,27 +65,27 @@ class FactorTest extends \PHPUnit_Framework_TestCase public function providerForValidFactor() { - $tests = array( + $tests = [ // Run through the first few integers. - array(1, 1), - array(2, 1), - array(2, 2), - array(3, 1), - array(3, 3), - array(4, 1), - array(4, 2), - array(4, 4), - array(5, 1), - array(5, 5), - array(6, 1), - array(6, 2), - array(6, 3), - array(6, 6), + [1, 1], + [2, 1], + [2, 2], + [3, 1], + [3, 3], + [4, 1], + [4, 2], + [4, 4], + [5, 1], + [5, 5], + [6, 1], + [6, 2], + [6, 3], + [6, 6], // Zero as a dividend is always a pass. - array(0, 0), - array(0, 1), - array(0, mt_rand()), - ); + [0, 0], + [0, 1], + [0, mt_rand()], + ]; $tests = $this->generateNegativeCombinations($tests); @@ -96,17 +96,17 @@ class FactorTest extends \PHPUnit_Framework_TestCase public function providerForInvalidFactor() { - $tests = array( + $tests = [ // Run through the first few integers. - array(3, 2), - array(4, 3), - array(5, 2), - array(5, 3), - array(5, 4), + [3, 2], + [4, 3], + [5, 2], + [5, 3], + [5, 4], // Zeros. - array(1, 0), - array(2, 0), - ); + [1, 0], + [2, 0], + ]; $tests = $this->generateNegativeCombinations($tests); @@ -115,7 +115,7 @@ class FactorTest extends \PHPUnit_Framework_TestCase // Valid (but random) dividends, invalid inputs. $extra_tests = array_map( function ($test) { - return array(mt_rand(), $test); + return [mt_rand(), $test]; }, $this->thingsThatAreNotIntegers() ); @@ -129,20 +129,20 @@ class FactorTest extends \PHPUnit_Framework_TestCase // Invalid dividends, valid (but random) inputs. $tests = array_map( function ($test) { - return array($test, mt_rand()); + return [$test, mt_rand()]; }, $this->thingsThatAreNotIntegers() ); // Also check for an empty dividend string. - $tests[] = array('', mt_rand()); + $tests[] = ['', mt_rand()]; return $tests; } private function thingsThatAreNotIntegers() { - return array( + return [ 0.5, 1.5, -0.5, @@ -156,13 +156,13 @@ class FactorTest extends \PHPUnit_Framework_TestCase // Randomish string. uniqid('a'), // Non-scalars. - array(), + [], new \StdClass(), new \DateTime(), null, true, false, - ); + ]; } private function randomFloatBeweenZeroAndOne() @@ -177,7 +177,7 @@ class FactorTest extends \PHPUnit_Framework_TestCase $tests, array_map( function ($test) { - return array(-$test[0], $test[1]); + return [-$test[0], $test[1]]; }, $tests ) @@ -188,7 +188,7 @@ class FactorTest extends \PHPUnit_Framework_TestCase $tests, array_map( function ($test) { - return array($test[0], -$test[1]); + return [$test[0], -$test[1]]; }, $tests ) @@ -206,7 +206,7 @@ class FactorTest extends \PHPUnit_Framework_TestCase $tests, array_map( function ($test) { - return array((string) $test[0], (string) $test[1]); + return [(string) $test[0], (string) $test[1]]; }, $base_tests ) @@ -217,7 +217,7 @@ class FactorTest extends \PHPUnit_Framework_TestCase $tests, array_map( function ($test) { - return array((float) $test[0], (float) $test[1]); + return [(float) $test[0], (float) $test[1]]; }, $base_tests ) diff --git a/tests/unit/Rules/FalseValTest.php b/tests/unit/Rules/FalseValTest.php index 3185e0b8..1c9b3859 100644 --- a/tests/unit/Rules/FalseValTest.php +++ b/tests/unit/Rules/FalseValTest.php @@ -30,20 +30,20 @@ class FalseValTest extends \PHPUnit_Framework_TestCase public function validFalseProvider() { - return array( - array(false), - array(0), - array('0'), - array('false'), - array('off'), - array('no'), - array('FALSE'), - array('OFF'), - array('NO'), - array('False'), - array('Off'), - array('No'), - ); + return [ + [false], + [0], + ['0'], + ['false'], + ['off'], + ['no'], + ['FALSE'], + ['OFF'], + ['NO'], + ['False'], + ['Off'], + ['No'], + ]; } /** @@ -58,16 +58,16 @@ class FalseValTest extends \PHPUnit_Framework_TestCase public function invalidFalseProvider() { - return array( - array(true), - array(1), - array('1'), - array(0.5), - array(2), - array('true'), - array('on'), - array('yes'), - array('anything'), - ); + return [ + [true], + [1], + ['1'], + [0.5], + [2], + ['true'], + ['on'], + ['yes'], + ['anything'], + ]; } } diff --git a/tests/unit/Rules/FileTest.php b/tests/unit/Rules/FileTest.php index 7a026c37..74505aa3 100644 --- a/tests/unit/Rules/FileTest.php +++ b/tests/unit/Rules/FileTest.php @@ -61,7 +61,7 @@ class FileTest extends \PHPUnit_Framework_TestCase public function testShouldValidateObjects() { $rule = new File(); - $object = $this->getMock('SplFileInfo', array('isFile'), array('somefile.txt')); + $object = $this->getMock('SplFileInfo', ['isFile'], ['somefile.txt']); $object->expects($this->once()) ->method('isFile') ->will($this->returnValue(true)); diff --git a/tests/unit/Rules/FilterVarTest.php b/tests/unit/Rules/FilterVarTest.php index d573784c..5b0b7f93 100644 --- a/tests/unit/Rules/FilterVarTest.php +++ b/tests/unit/Rules/FilterVarTest.php @@ -41,7 +41,7 @@ class FilterVarTest extends \PHPUnit_Framework_TestCase $rule = new FilterVar(FILTER_VALIDATE_REGEXP); $actualArguments = $rule->arguments; - $expectedArguments = array(FILTER_VALIDATE_REGEXP); + $expectedArguments = [FILTER_VALIDATE_REGEXP]; $this->assertEquals($expectedArguments, $actualArguments); } @@ -51,7 +51,7 @@ class FilterVarTest extends \PHPUnit_Framework_TestCase $rule = new FilterVar(FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED); $actualArguments = $rule->arguments; - $expectedArguments = array(FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED); + $expectedArguments = [FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED]; $this->assertEquals($expectedArguments, $actualArguments); } diff --git a/tests/unit/Rules/FiniteTest.php b/tests/unit/Rules/FiniteTest.php index 22bfe730..51272f37 100644 --- a/tests/unit/Rules/FiniteTest.php +++ b/tests/unit/Rules/FiniteTest.php @@ -52,24 +52,24 @@ class FiniteTest extends \PHPUnit_Framework_TestCase public function providerForFinite() { - return array( - array('123456'), - array(-9), - array(0), - array(16), - array(2), - array(PHP_INT_MAX), - ); + return [ + ['123456'], + [-9], + [0], + [16], + [2], + [PHP_INT_MAX], + ]; } public function providerForNonFinite() { - return array( - array(' '), - array(INF), - array(array()), - array(new \stdClass()), - array(null), - ); + return [ + [' '], + [INF], + [[]], + [new \stdClass()], + [null], + ]; } } diff --git a/tests/unit/Rules/FloatValTest.php b/tests/unit/Rules/FloatValTest.php index 3ecc59cc..a7208331 100644 --- a/tests/unit/Rules/FloatValTest.php +++ b/tests/unit/Rules/FloatValTest.php @@ -47,27 +47,27 @@ class FloatValTest extends \PHPUnit_Framework_TestCase public function providerForFloat() { - return array( - array(165), - array(1), - array(0), - array(0.0), - array('1'), - array('19347e12'), - array(165.0), - array('165.7'), - array(1e12), - ); + return [ + [165], + [1], + [0], + [0.0], + ['1'], + ['19347e12'], + [165.0], + ['165.7'], + [1e12], + ]; } public function providerForNotFloat() { - return array( - array(''), - array(null), - array('a'), - array(' '), - array('Foo'), - ); + return [ + [''], + [null], + ['a'], + [' '], + ['Foo'], + ]; } } diff --git a/tests/unit/Rules/GraphTest.php b/tests/unit/Rules/GraphTest.php index 76ad6ebb..341440d5 100644 --- a/tests/unit/Rules/GraphTest.php +++ b/tests/unit/Rules/GraphTest.php @@ -58,41 +58,41 @@ class GraphTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array(' ', '!@#$%^&*(){} abc 123'), - array(" \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"), - ); + return [ + [' ', '!@#$%^&*(){} abc 123'], + [" \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidGraph() { - return array( - array('LKA#@%.54'), - array('foobar'), - array('16-50'), - array('123'), - array('#$%&*_'), - ); + return [ + ['LKA#@%.54'], + ['foobar'], + ['16-50'], + ['123'], + ['#$%&*_'], + ]; } public function providerForInvalidGraph() { - return array( - array(''), - array(null), - array("foo\nbar"), - array("foo\tbar"), - array('foo bar'), - array(' '), - ); + return [ + [''], + [null], + ["foo\nbar"], + ["foo\tbar"], + ['foo bar'], + [' '], + ]; } } diff --git a/tests/unit/Rules/HexRgbColorTest.php b/tests/unit/Rules/HexRgbColorTest.php index 473dc2a6..f29c8505 100644 --- a/tests/unit/Rules/HexRgbColorTest.php +++ b/tests/unit/Rules/HexRgbColorTest.php @@ -40,35 +40,35 @@ class HexRgbColorTest extends \PHPUnit_Framework_TestCase public function providerForValidHexRgbColor() { - return array( - array('#000'), - array('#00000F'), - array('#123'), - array('#123456'), - array('#FFFFFF'), - array('123123'), - array('FFFFFF'), - ); + return [ + ['#000'], + ['#00000F'], + ['#123'], + ['#123456'], + ['#FFFFFF'], + ['123123'], + ['FFFFFF'], + ]; } public function providerForInvalidHexRgbColor() { - return array( - array('#0'), - array('#0000G0'), - array('#0FG'), - array('#1234'), - array('#AAAAAA1'), - array('#S'), - array('1234'), - array('foo'), - array(0x39F), - array(05), - array(1), - array(443), - array(array()), - array(new \stdClass()), - array(null), - ); + return [ + ['#0'], + ['#0000G0'], + ['#0FG'], + ['#1234'], + ['#AAAAAA1'], + ['#S'], + ['1234'], + ['foo'], + [0x39F], + [05], + [1], + [443], + [[]], + [new \stdClass()], + [null], + ]; } } diff --git a/tests/unit/Rules/IdenticalTest.php b/tests/unit/Rules/IdenticalTest.php index b6664617..705ca66e 100644 --- a/tests/unit/Rules/IdenticalTest.php +++ b/tests/unit/Rules/IdenticalTest.php @@ -53,21 +53,22 @@ class IdenticalTest extends \PHPUnit_Framework_TestCase public function providerForIdentical() { $object = new stdClass(); - return array( - array('foo', 'foo'), - array(array(), array()), - array($object, $object), - array(10, 10), - ); + + return [ + ['foo', 'foo'], + [[], []], + [$object, $object], + [10, 10], + ]; } public function providerForNotIdentical() { - return array( - array(42, '42'), - array('foo', 'bar'), - array(array(1), array()), - array(new stdClass(), new stdClass()), - ); + return [ + [42, '42'], + ['foo', 'bar'], + [[1], []], + [new stdClass(), new stdClass()], + ]; } } diff --git a/tests/unit/Rules/InTest.php b/tests/unit/Rules/InTest.php index 7380f728..7f69a7f5 100644 --- a/tests/unit/Rules/InTest.php +++ b/tests/unit/Rules/InTest.php @@ -46,42 +46,42 @@ class InTest extends \PHPUnit_Framework_TestCase */ public function testInCheckExceptionMessageWithArray() { - $v = new In(array('foo', 'bar')); + $v = new In(['foo', 'bar']); $v->assert('x'); } public function providerForIn() { - return array( - array('', array('')), - array(null, array(null)), - array('0', array('0')), - array(0, array(0)), - array('foo', array('foo', 'bar')), - array('foo', 'barfoobaz'), - array('foo', 'foobarbaz'), - array('foo', 'barbazfoo'), - array('1', array(1, 2, 3)), - array('1', array('1', 2, 3), true), - ); + return [ + ['', ['']], + [null, [null]], + ['0', ['0']], + [0, [0]], + ['foo', ['foo', 'bar']], + ['foo', 'barfoobaz'], + ['foo', 'foobarbaz'], + ['foo', 'barbazfoo'], + ['1', [1, 2, 3]], + ['1', ['1', 2, 3], true], + ]; } public function providerForNotIn() { - return array( - array(null, '0'), - array(null, 0, true), - array(null, '', true), - array(null, array()), - array('', 'barfoobaz'), - array(null, 'barfoobaz'), - array(0, 'barfoobaz'), - array('0', 'barfoobaz'), - array('bat', array('foo', 'bar')), - array('foo', 'barfaabaz'), - array('foo', 'faabarbaz'), - array('foo', 'baabazfaa'), - array('1', array(1, 2, 3), true), - ); + return [ + [null, '0'], + [null, 0, true], + [null, '', true], + [null, []], + ['', 'barfoobaz'], + [null, 'barfoobaz'], + [0, 'barfoobaz'], + ['0', 'barfoobaz'], + ['bat', ['foo', 'bar']], + ['foo', 'barfaabaz'], + ['foo', 'faabarbaz'], + ['foo', 'baabazfaa'], + ['1', [1, 2, 3], true], + ]; } } diff --git a/tests/unit/Rules/InfiniteTest.php b/tests/unit/Rules/InfiniteTest.php index ec3ea2b6..6158d103 100644 --- a/tests/unit/Rules/InfiniteTest.php +++ b/tests/unit/Rules/InfiniteTest.php @@ -52,25 +52,25 @@ class InfiniteTest extends \PHPUnit_Framework_TestCase public function providerForInfinite() { - return array( - array(INF), - array(INF * -1), - ); + return [ + [INF], + [INF * -1], + ]; } public function providerForNonInfinite() { - return array( - array(' '), - array(array()), - array(new \stdClass()), - array(null), - array('123456'), - array(-9), - array(0), - array(16), - array(2), - array(PHP_INT_MAX), - ); + return [ + [' '], + [[]], + [new \stdClass()], + [null], + ['123456'], + [-9], + [0], + [16], + [2], + [PHP_INT_MAX], + ]; } } diff --git a/tests/unit/Rules/IntTypeTest.php b/tests/unit/Rules/IntTypeTest.php index 43262412..2575e0e0 100644 --- a/tests/unit/Rules/IntTypeTest.php +++ b/tests/unit/Rules/IntTypeTest.php @@ -19,12 +19,12 @@ class IntTypeTest extends \PHPUnit_Framework_TestCase { public function providerForValidIntType() { - return array( - array(0), - array(123456), - array(PHP_INT_MAX), - array(PHP_INT_MAX * -1), - ); + return [ + [0], + [123456], + [PHP_INT_MAX], + [PHP_INT_MAX * -1], + ]; } /** @@ -39,12 +39,12 @@ class IntTypeTest extends \PHPUnit_Framework_TestCase public function providerForInvalidIntType() { - return array( - array('1'), - array(1.0), - array(PHP_INT_MAX + 1), - array(true), - ); + return [ + ['1'], + [1.0], + [PHP_INT_MAX + 1], + [true], + ]; } /** diff --git a/tests/unit/Rules/IntValTest.php b/tests/unit/Rules/IntValTest.php index d3c9e84e..361e58e5 100644 --- a/tests/unit/Rules/IntValTest.php +++ b/tests/unit/Rules/IntValTest.php @@ -47,24 +47,24 @@ class IntValTest extends \PHPUnit_Framework_TestCase public function providerForInt() { - return array( - array(16), - array('165'), - array(123456), - array(PHP_INT_MAX), - ); + return [ + [16], + ['165'], + [123456], + [PHP_INT_MAX], + ]; } public function providerForNotInt() { - return array( - array(''), - array(null), - array('a'), - array(' '), - array('Foo'), - array('1.44'), - array(1e-5), - ); + return [ + [''], + [null], + ['a'], + [' '], + ['Foo'], + ['1.44'], + [1e-5], + ]; } } diff --git a/tests/unit/Rules/IpTest.php b/tests/unit/Rules/IpTest.php index dc737fc4..3991c57b 100644 --- a/tests/unit/Rules/IpTest.php +++ b/tests/unit/Rules/IpTest.php @@ -64,59 +64,59 @@ class IpTest extends \PHPUnit_Framework_TestCase public function providerForIp() { - return array( - array('127.0.0.1'), - ); + return [ + ['127.0.0.1'], + ]; } public function providerForIpBetweenRange() { - return array( - array('127.0.0.1', '127.*'), - array('127.0.0.1', '127.0.*'), - array('127.0.0.1', '127.0.0.*'), - array('192.168.2.6', '192.168.*.6'), - array('192.168.2.6', '192.*.2.6'), - array('10.168.2.6', '*.168.2.6'), - array('192.168.2.6', '192.168.*.*'), - array('192.10.2.6', '192.*.*.*'), - array('192.168.255.156', '*'), - array('192.168.255.156', '*.*.*.*'), - array('127.0.0.1', '127.0.0.0-127.0.0.255'), - array('192.168.2.6', '192.168.0.0-192.168.255.255'), - array('192.10.2.6', '192.0.0.0-192.255.255.255'), - array('192.168.255.156', '0.0.0.0-255.255.255.255'), - array('220.78.173.2', '220.78.168/21'), - array('220.78.173.2', '220.78.168.0/21'), - array('220.78.173.2', '220.78.168.0/255.255.248.0'), - ); + return [ + ['127.0.0.1', '127.*'], + ['127.0.0.1', '127.0.*'], + ['127.0.0.1', '127.0.0.*'], + ['192.168.2.6', '192.168.*.6'], + ['192.168.2.6', '192.*.2.6'], + ['10.168.2.6', '*.168.2.6'], + ['192.168.2.6', '192.168.*.*'], + ['192.10.2.6', '192.*.*.*'], + ['192.168.255.156', '*'], + ['192.168.255.156', '*.*.*.*'], + ['127.0.0.1', '127.0.0.0-127.0.0.255'], + ['192.168.2.6', '192.168.0.0-192.168.255.255'], + ['192.10.2.6', '192.0.0.0-192.255.255.255'], + ['192.168.255.156', '0.0.0.0-255.255.255.255'], + ['220.78.173.2', '220.78.168/21'], + ['220.78.173.2', '220.78.168.0/21'], + ['220.78.173.2', '220.78.168.0/255.255.248.0'], + ]; } public function providerForNotIp() { - return array( - array(''), - array(null), - array('j'), - array(' '), - array('Foo'), - array('192.168.0.1', FILTER_FLAG_NO_PRIV_RANGE), - ); + return [ + [''], + [null], + ['j'], + [' '], + ['Foo'], + ['192.168.0.1', FILTER_FLAG_NO_PRIV_RANGE], + ]; } public function providerForIpOutsideRange() { - return array( - array('127.0.0.1', '127.0.1.*'), - array('192.168.2.6', '192.163.*.*'), - array('192.10.2.6', '193.*.*.*'), - array('127.0.0.1', '127.0.1.0-127.0.1.255'), - array('192.168.2.6', '192.163.0.0-192.163.255.255'), - array('192.10.2.6', '193.168.0.0-193.255.255.255'), - array('220.78.176.1', '220.78.168/21'), - array('220.78.176.2', '220.78.168.0/21'), - array('220.78.176.3', '220.78.168.0/255.255.248.0'), - ); + return [ + ['127.0.0.1', '127.0.1.*'], + ['192.168.2.6', '192.163.*.*'], + ['192.10.2.6', '193.*.*.*'], + ['127.0.0.1', '127.0.1.0-127.0.1.255'], + ['192.168.2.6', '192.163.0.0-192.163.255.255'], + ['192.10.2.6', '193.168.0.0-193.255.255.255'], + ['220.78.176.1', '220.78.168/21'], + ['220.78.176.2', '220.78.168.0/21'], + ['220.78.176.3', '220.78.168.0/255.255.248.0'], + ]; } /** @@ -130,14 +130,14 @@ class IpTest extends \PHPUnit_Framework_TestCase public function providerForInvalidRanges() { - return array( - array('192.168'), - array('asd'), - array('192.168.0.0-192.168.0.256'), - array('192.168.0.0-192.168.0.1/4'), - array('192.168.0/1'), - array('192.168.2.0/256.256.256.256'), - array('192.168.2.0/8.256.256.256'), - ); + return [ + ['192.168'], + ['asd'], + ['192.168.0.0-192.168.0.256'], + ['192.168.0.0-192.168.0.1/4'], + ['192.168.0/1'], + ['192.168.2.0/256.256.256.256'], + ['192.168.2.0/8.256.256.256'], + ]; } } diff --git a/tests/unit/Rules/JsonTest.php b/tests/unit/Rules/JsonTest.php index d16e84ba..40a3f7b0 100644 --- a/tests/unit/Rules/JsonTest.php +++ b/tests/unit/Rules/JsonTest.php @@ -51,16 +51,16 @@ class JsonTest extends \PHPUnit_Framework_TestCase public function providerForPass() { - return array( - array('2'), - array('"abc"'), - array('[1,2,3]'), - array('["foo", "bar", "number", 1]'), - array('{"foo": "bar", "number":1}'), - array('[]'), - array('{}'), - array('false'), - array('null'), - ); + return [ + ['2'], + ['"abc"'], + ['[1,2,3]'], + ['["foo", "bar", "number", 1]'], + ['{"foo": "bar", "number":1}'], + ['[]'], + ['{}'], + ['false'], + ['null'], + ]; } } diff --git a/tests/unit/Rules/KeyNestedTest.php b/tests/unit/Rules/KeyNestedTest.php index 6ffe192e..6adf5370 100644 --- a/tests/unit/Rules/KeyNestedTest.php +++ b/tests/unit/Rules/KeyNestedTest.php @@ -22,16 +22,16 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase { public function testArrayWithPresentKeysWillReturnTrueForFullPathValidator() { - $array = array( - 'bar' => array( - 'foo' => array( + $array = [ + 'bar' => [ + 'foo' => [ 'baz' => 'hello world!', - ), - 'foooo' => array( + ], + 'foooo' => [ 'boooo' => 321, - ), - ), - ); + ], + ], + ]; $rule = new KeyNested('bar.foo.baz'); @@ -40,16 +40,16 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase public function testArrayWithPresentKeysWillReturnTrueForHalfPathValidator() { - $array = array( - 'bar' => array( - 'foo' => array( + $array = [ + 'bar' => [ + 'foo' => [ 'baz' => 'hello world!', - ), - 'foooo' => array( + ], + 'foooo' => [ 'boooo' => 321, - ), - ), - ); + ], + ], + ]; $rule = new KeyNested('bar.foo'); @@ -58,16 +58,16 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase public function testOnjectWithPresentPropertiesWillReturnTrueForDirtyPathValidator() { - $object = (object) array( - 'bar' => (object) array( - 'foo' => (object) array( + $object = (object) [ + 'bar' => (object) [ + 'foo' => (object) [ 'baz' => 'hello world!', - ), - 'foooo' => (object) array( + ], + 'foooo' => (object) [ 'boooo' => 321, - ), - ), - ); + ], + ], + ]; $rule = new KeyNested('bar.foooo.'); @@ -102,7 +102,7 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase public function testArrayWithEmptyKeyShouldReturnTrue() { $rule = new KeyNested('emptyKey'); - $input = array('emptyKey' => ''); + $input = ['emptyKey' => '']; $this->assertTrue($rule->validate($input)); } @@ -113,11 +113,11 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase public function testArrayWithAbsentKeyShouldThrowNestedKeyException() { $validator = new KeyNested('bar.bar'); - $object = array( - 'baraaaaaa' => array( + $object = [ + 'baraaaaaa' => [ 'bar' => 'foo', - ), - ); + ], + ]; $this->assertTrue($validator->assert($object)); } @@ -135,13 +135,13 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase { $subValidator = new Length(3, 7); $validator = new KeyNested('bar.foo.baz', $subValidator); - $object = array( - 'bar' => array( - 'foo' => array( + $object = [ + 'bar' => [ + 'foo' => [ 'baz' => 'example', - ), - ), - ); + ], + ], + ]; $this->assertTrue($validator->assert($object)); } @@ -155,16 +155,16 @@ class KeyNestedTest extends \PHPUnit_Framework_TestCase public function testArrayAccessWithPresentKeysWillReturnTrue() { - $arrayAccess = new ArrayObject(array( - 'bar' => array( - 'foo' => array( + $arrayAccess = new ArrayObject([ + 'bar' => [ + 'foo' => [ 'baz' => 'hello world!', - ), - 'foooo' => array( + ], + 'foooo' => [ 'boooo' => 321, - ), - ), - )); + ], + ], + ]); $rule = new KeyNested('bar.foo.baz'); diff --git a/tests/unit/Rules/KeySetTest.php b/tests/unit/Rules/KeySetTest.php index 06fc8c61..bc1999f8 100644 --- a/tests/unit/Rules/KeySetTest.php +++ b/tests/unit/Rules/KeySetTest.php @@ -84,14 +84,14 @@ class KeySetTest extends PHPUnit_Framework_TestCase $keySet = new KeySet($key1, $key2); - $this->assertEquals(array('foo', 'bar'), $keySet->getKeys()); + $this->assertEquals(['foo', 'bar'], $keySet->getKeys()); } public function testShouldValidateKeysWhenThereAreMissingRequiredKeys() { - $input = array( + $input = [ 'foo' => 42, - ); + ]; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), true); @@ -103,9 +103,9 @@ class KeySetTest extends PHPUnit_Framework_TestCase public function testShouldValidateKeysWhenThereAreMissingNonRequiredKeys() { - $input = array( + $input = [ 'foo' => 42, - ); + ]; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), false); @@ -117,11 +117,11 @@ class KeySetTest extends PHPUnit_Framework_TestCase public function testShouldValidateKeysWhenThereAreMoreKeys() { - $input = array( + $input = [ 'foo' => 42, 'bar' => 'String', 'baz' => false, - ); + ]; $key1 = new Key('foo', new AlwaysValid(), false); $key2 = new Key('bar', new AlwaysValid(), false); @@ -133,7 +133,7 @@ class KeySetTest extends PHPUnit_Framework_TestCase public function testShouldValidateKeysWhenEmpty() { - $input = array(); + $input = []; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), true); @@ -149,7 +149,7 @@ class KeySetTest extends PHPUnit_Framework_TestCase */ public function testShouldCheckKeys() { - $input = array(); + $input = []; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), true); @@ -164,7 +164,7 @@ class KeySetTest extends PHPUnit_Framework_TestCase */ public function testShouldAssertKeys() { - $input = array(); + $input = []; $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), true); diff --git a/tests/unit/Rules/KeyTest.php b/tests/unit/Rules/KeyTest.php index 9a67833f..92e0ae19 100644 --- a/tests/unit/Rules/KeyTest.php +++ b/tests/unit/Rules/KeyTest.php @@ -21,7 +21,7 @@ class KeyTest extends \PHPUnit_Framework_TestCase public function testArrayWithPresentKeyShouldReturnTrue() { $validator = new Key('bar'); - $obj = array(); + $obj = []; $obj['bar'] = 'foo'; $this->assertTrue($validator->assert($obj)); $this->assertTrue($validator->check($obj)); @@ -57,7 +57,7 @@ class KeyTest extends \PHPUnit_Framework_TestCase public function testArrayWithEmptyKeyShouldReturnTrue() { $validator = new Key('someEmptyKey'); - $input = array(); + $input = []; $input['someEmptyKey'] = ''; $this->assertTrue($validator->assert($input)); @@ -68,7 +68,7 @@ class KeyTest extends \PHPUnit_Framework_TestCase public function testShouldHaveTheSameReturnValueForAllValidators() { $rule = new Key('key', new NotEmpty()); - $input = array('key' => ''); + $input = ['key' => '']; try { $rule->assert($input); @@ -91,7 +91,7 @@ class KeyTest extends \PHPUnit_Framework_TestCase public function testArrayWithAbsentKeyShouldThrowKeyException() { $validator = new Key('bar'); - $obj = array(); + $obj = []; $obj['baraaaaaa'] = 'foo'; $this->assertTrue($validator->assert($obj)); } @@ -110,14 +110,14 @@ class KeyTest extends \PHPUnit_Framework_TestCase */ public function testInvalidConstructorParametersShouldThrowComponentExceptionUponInstantiation() { - $validator = new Key(array('invalid')); + $validator = new Key(['invalid']); } public function testExtraValidatorShouldValidateKey() { $subValidator = new Length(1, 3); $validator = new Key('bar', $subValidator); - $obj = array(); + $obj = []; $obj['bar'] = 'foo'; $this->assertTrue($validator->assert($obj)); } @@ -126,7 +126,7 @@ class KeyTest extends \PHPUnit_Framework_TestCase { $subValidator = new Length(1, 3); $validator = new Key('bar', $subValidator, false); - $obj = array(); + $obj = []; $this->assertTrue($validator->validate($obj)); } } diff --git a/tests/unit/Rules/KeyValueTest.php b/tests/unit/Rules/KeyValueTest.php index ce219fd0..a4406abf 100644 --- a/tests/unit/Rules/KeyValueTest.php +++ b/tests/unit/Rules/KeyValueTest.php @@ -37,42 +37,42 @@ class KeyValueTest extends PHPUnit_Framework_TestCase { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertFalse($rule->validate(array('bar' => 42))); + $this->assertFalse($rule->validate(['bar' => 42])); } public function testShouldNotValidateWhenBaseKeyDoesNotExist() { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertFalse($rule->validate(array('foo' => true))); + $this->assertFalse($rule->validate(['foo' => true])); } public function testShouldNotValidateRuleIsNotValid() { $rule = new KeyValue('foo', 'probably_not_a_rule', 'bar'); - $this->assertFalse($rule->validate(array('foo' => true, 'bar' => false))); + $this->assertFalse($rule->validate(['foo' => true, 'bar' => false])); } public function testShouldValidateWhenDefinedValuesMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertTrue($rule->validate(array('foo' => 42, 'bar' => 42))); + $this->assertTrue($rule->validate(['foo' => 42, 'bar' => 42])); } public function testShouldValidateWhenDefinedValuesDoesNotMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertFalse($rule->validate(array('foo' => 43, 'bar' => 42))); + $this->assertFalse($rule->validate(['foo' => 43, 'bar' => 42])); } public function testShouldAssertWhenDefinedValuesMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertTrue($rule->assert(array('foo' => 42, 'bar' => 42))); + $this->assertTrue($rule->assert(['foo' => 42, 'bar' => 42])); } /** @@ -82,7 +82,7 @@ class KeyValueTest extends PHPUnit_Framework_TestCase public function testShouldAssertWhenDefinedValuesDoesNotMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $rule->assert(array('foo' => 43, 'bar' => 42)); + $rule->assert(['foo' => 43, 'bar' => 42]); } /** @@ -92,14 +92,14 @@ class KeyValueTest extends PHPUnit_Framework_TestCase public function testShouldNotAssertWhenRuleIsNotValid() { $rule = new KeyValue('foo', 'probably_not_a_rule', 'bar'); - $rule->assert(array('foo' => 43, 'bar' => 42)); + $rule->assert(['foo' => 43, 'bar' => 42]); } public function testShouldCheckWhenDefinedValuesMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $this->assertTrue($rule->check(array('foo' => 42, 'bar' => 42))); + $this->assertTrue($rule->check(['foo' => 42, 'bar' => 42])); } /** @@ -109,6 +109,6 @@ class KeyValueTest extends PHPUnit_Framework_TestCase public function testShouldCheckWhenDefinedValuesDoesNotMatch() { $rule = new KeyValue('foo', 'equals', 'bar'); - $rule->check(array('foo' => 43, 'bar' => 42)); + $rule->check(['foo' => 43, 'bar' => 42]); } } diff --git a/tests/unit/Rules/LeapDateTest.php b/tests/unit/Rules/LeapDateTest.php index 8f412f7a..60ab1f36 100644 --- a/tests/unit/Rules/LeapDateTest.php +++ b/tests/unit/Rules/LeapDateTest.php @@ -50,6 +50,6 @@ class LeapDateTest extends \PHPUnit_Framework_TestCase } public function testInvalidLeapDate_input() { - $this->assertFalse($this->leapDateValidator->validate(array())); + $this->assertFalse($this->leapDateValidator->validate([])); } } diff --git a/tests/unit/Rules/LeapYearTest.php b/tests/unit/Rules/LeapYearTest.php index 55243168..7c375156 100644 --- a/tests/unit/Rules/LeapYearTest.php +++ b/tests/unit/Rules/LeapYearTest.php @@ -44,6 +44,6 @@ class LeapYearTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->leapYearValidator->__invoke(2009)); $this->assertFalse($this->leapYearValidator->__invoke( new DateTime('2009-02-29'))); - $this->assertFalse($this->leapYearValidator->__invoke(array())); + $this->assertFalse($this->leapYearValidator->__invoke([])); } } diff --git a/tests/unit/Rules/LengthTest.php b/tests/unit/Rules/LengthTest.php index 3988772b..51de3a2f 100644 --- a/tests/unit/Rules/LengthTest.php +++ b/tests/unit/Rules/LengthTest.php @@ -65,54 +65,54 @@ class LengthTest extends \PHPUnit_Framework_TestCase public function providerForValidLengthInclusive() { - return array( - array('alganet', 1, 15), - array('ççççç', 4, 6), - array(range(1, 20), 1, 30), - array((object) array('foo' => 'bar', 'bar' => 'baz'), 0, 2), - array('alganet', 1, null), //null is a valid max length, means "no maximum", - array('alganet', null, 15), //null is a valid min length, means "no minimum" - ); + return [ + ['alganet', 1, 15], + ['ççççç', 4, 6], + [range(1, 20), 1, 30], + [(object) ['foo' => 'bar', 'bar' => 'baz'], 0, 2], + ['alganet', 1, null], //null is a valid max length, means "no maximum", + ['alganet', null, 15], //null is a valid min length, means "no minimum" + ]; } public function providerForValidLengthNonInclusive() { - return array( - array('alganet', 1, 15), - array('ççççç', 4, 6), - array(range(1, 20), 1, 30), - array((object) array('foo' => 'bar', 'bar' => 'baz'), 1, 3), - array('alganet', 1, null), //null is a valid max length, means "no maximum", - array('alganet', null, 15), //null is a valid min length, means "no minimum" - ); + return [ + ['alganet', 1, 15], + ['ççççç', 4, 6], + [range(1, 20), 1, 30], + [(object) ['foo' => 'bar', 'bar' => 'baz'], 1, 3], + ['alganet', 1, null], //null is a valid max length, means "no maximum", + ['alganet', null, 15], //null is a valid min length, means "no minimum" + ]; } public function providerForInvalidLengthInclusive() { - return array( - array('', 1, 15), - array('alganet', 1, 6), - array(range(1, 20), 1, 19), - array('alganet', 8, null), //null is a valid max length, means "no maximum", - array('alganet', null, 6), //null is a valid min length, means "no minimum" - ); + return [ + ['', 1, 15], + ['alganet', 1, 6], + [range(1, 20), 1, 19], + ['alganet', 8, null], //null is a valid max length, means "no maximum", + ['alganet', null, 6], //null is a valid min length, means "no minimum" + ]; } public function providerForInvalidLengthNonInclusive() { - return array( - array('alganet', 1, 7), - array((object) array('foo' => 'bar', 'bar' => 'baz'), 3, 5), - array(range(1, 50), 1, 30), - ); + return [ + ['alganet', 1, 7], + [(object) ['foo' => 'bar', 'bar' => 'baz'], 3, 5], + [range(1, 50), 1, 30], + ]; } public function providerForComponentException() { - return array( - array('a', 15), - array(1, 'abc d'), - array(10, 1), - ); + return [ + ['a', 15], + [1, 'abc d'], + [10, 1], + ]; } } diff --git a/tests/unit/Rules/LowercaseTest.php b/tests/unit/Rules/LowercaseTest.php index 3b7294f7..58ed2ada 100644 --- a/tests/unit/Rules/LowercaseTest.php +++ b/tests/unit/Rules/LowercaseTest.php @@ -42,25 +42,25 @@ class LowercaseTest extends \PHPUnit_Framework_TestCase public function providerForValidLowercase() { - return array( - array(''), - array('lowercase'), - array('lowercase-with-dashes'), - array('lowercase with spaces'), - array('lowercase with numbers 123'), - array('lowercase with specials characters like ã ç ê'), - array('with specials characters like # $ % & * +'), - array('τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός'), - ); + return [ + [''], + ['lowercase'], + ['lowercase-with-dashes'], + ['lowercase with spaces'], + ['lowercase with numbers 123'], + ['lowercase with specials characters like ã ç ê'], + ['with specials characters like # $ % & * +'], + ['τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός'], + ]; } public function providerForInvalidLowercase() { - return array( - array('UPPERCASE'), - array('CamelCase'), - array('First Character Uppercase'), - array('With Numbers 1 2 3'), - ); + return [ + ['UPPERCASE'], + ['CamelCase'], + ['First Character Uppercase'], + ['With Numbers 1 2 3'], + ]; } } diff --git a/tests/unit/Rules/MacAddressTest.php b/tests/unit/Rules/MacAddressTest.php index 133da023..67cfea12 100644 --- a/tests/unit/Rules/MacAddressTest.php +++ b/tests/unit/Rules/MacAddressTest.php @@ -47,22 +47,22 @@ class MacAddressTest extends \PHPUnit_Framework_TestCase public function providerForMacAddress() { - return array( - array('00:11:22:33:44:55'), - array('66-77-88-99-aa-bb'), - array('AF:0F:bd:12:44:ba'), - array('90-bc-d3-1a-dd-cc'), - ); + return [ + ['00:11:22:33:44:55'], + ['66-77-88-99-aa-bb'], + ['AF:0F:bd:12:44:ba'], + ['90-bc-d3-1a-dd-cc'], + ]; } public function providerForNotMacAddress() { - return array( - array(''), - array('00-1122:33:44:55'), - array('66-77--99-jj-bb'), - array('HH:0F-bd:12:44:ba'), - array('90-bc-nk:1a-dd-cc'), - ); + return [ + [''], + ['00-1122:33:44:55'], + ['66-77--99-jj-bb'], + ['HH:0F-bd:12:44:ba'], + ['90-bc-nk:1a-dd-cc'], + ]; } } diff --git a/tests/unit/Rules/MaxTest.php b/tests/unit/Rules/MaxTest.php index c7762ebe..34a05ec1 100644 --- a/tests/unit/Rules/MaxTest.php +++ b/tests/unit/Rules/MaxTest.php @@ -42,26 +42,26 @@ class MaxTest extends \PHPUnit_Framework_TestCase public function providerForValidMax() { - return array( - array(200, false, ''), - array(200, false, 165.0), - array(200, false, -200), - array(200, true, 200), - array(200, false, 0), - array('-18 years', true, '1988-09-09'), - array('z', true, 'z'), - array('z', false, 'y'), - array('tomorrow', true, 'now'), - ); + return [ + [200, false, ''], + [200, false, 165.0], + [200, false, -200], + [200, true, 200], + [200, false, 0], + ['-18 years', true, '1988-09-09'], + ['z', true, 'z'], + ['z', false, 'y'], + ['tomorrow', true, 'now'], + ]; } public function providerForInvalidMax() { - return array( - array(200, false, 300), - array(200, false, 250), - array(200, false, 1500), - array(200, false, 200), - ); + return [ + [200, false, 300], + [200, false, 250], + [200, false, 1500], + [200, false, 200], + ]; } } diff --git a/tests/unit/Rules/MimetypeTest.php b/tests/unit/Rules/MimetypeTest.php index b64240ae..f431d1a3 100644 --- a/tests/unit/Rules/MimetypeTest.php +++ b/tests/unit/Rules/MimetypeTest.php @@ -43,7 +43,7 @@ class MimetypeTest extends PHPUnit_Framework_TestCase $fileInfoMock = $this ->getMockBuilder('finfo') ->disableOriginalConstructor() - ->setMethods(array('file')) + ->setMethods(['file']) ->getMock(); $fileInfoMock @@ -65,7 +65,7 @@ class MimetypeTest extends PHPUnit_Framework_TestCase $fileInfoMock = $this ->getMockBuilder('finfo') ->disableOriginalConstructor() - ->setMethods(array('file')) + ->setMethods(['file']) ->getMock(); $fileInfoMock @@ -83,7 +83,7 @@ class MimetypeTest extends PHPUnit_Framework_TestCase { $rule = new Mimetype('application/octet-stream'); - $this->assertFalse($rule->validate(array(__FILE__))); + $this->assertFalse($rule->validate([__FILE__])); } public function testShouldInvalidateWhenItIsNotAValidFile() diff --git a/tests/unit/Rules/MinTest.php b/tests/unit/Rules/MinTest.php index 9db9c82e..f8bce87b 100644 --- a/tests/unit/Rules/MinTest.php +++ b/tests/unit/Rules/MinTest.php @@ -44,32 +44,32 @@ class MinTest extends \PHPUnit_Framework_TestCase public function providerForValidMin() { - return array( - array(100, false, 165.0), - array(-100, false, 200), - array(200, true, 200), - array(200, false, 300), - array('a', true, 'a'), - array('a', true, 'c'), - array('yesterday', true, 'now'), + return [ + [100, false, 165.0], + [-100, false, 200], + [200, true, 200], + [200, false, 300], + ['a', true, 'a'], + ['a', true, 'c'], + ['yesterday', true, 'now'], // Samples from issue #178 - array('13-05-2014 03:16', true, '20-05-2014 03:16'), - array(new DateTime('13-05-2014 03:16'), true, new DateTime('20-05-2014 03:16')), - array('13-05-2014 03:16', true, new DateTime('20-05-2014 03:16')), - array(new DateTime('13-05-2014 03:16'), true, '20-05-2014 03:16'), - ); + ['13-05-2014 03:16', true, '20-05-2014 03:16'], + [new DateTime('13-05-2014 03:16'), true, new DateTime('20-05-2014 03:16')], + ['13-05-2014 03:16', true, new DateTime('20-05-2014 03:16')], + [new DateTime('13-05-2014 03:16'), true, '20-05-2014 03:16'], + ]; } public function providerForInvalidMin() { - return array( - array(100, true, ''), - array(100, false, ''), - array(500, false, 300), - array(0, false, -250), - array(0, false, -50), - array(50, false, 50), - ); + return [ + [100, true, ''], + [100, false, ''], + [500, false, 300], + [0, false, -250], + [0, false, -50], + [50, false, 50], + ]; } } diff --git a/tests/unit/Rules/MininumAgeTest.php b/tests/unit/Rules/MininumAgeTest.php index 8dcaadbb..f37ea397 100644 --- a/tests/unit/Rules/MininumAgeTest.php +++ b/tests/unit/Rules/MininumAgeTest.php @@ -53,29 +53,29 @@ class MininumAgeTest extends \PHPUnit_Framework_TestCase public function providerForValidDateValidMinimumAge() { - return array( - array(18, 'Y-m-d', ''), - array(18, 'Y-m-d', '1969-07-20'), - array(18, null, new \DateTime('1969-07-20')), - array(18, 'Y-m-d', new \DateTime('1969-07-20')), - ); + return [ + [18, 'Y-m-d', ''], + [18, 'Y-m-d', '1969-07-20'], + [18, null, new \DateTime('1969-07-20')], + [18, 'Y-m-d', new \DateTime('1969-07-20')], + ]; } public function providerForValidDateInvalidMinimumAge() { - return array( - array(18, 'Y-m-d', '2002-06-30'), - array(18, null, new \DateTime('2002-06-30')), - array(18, 'Y-m-d', new \DateTime('2002-06-30')), - ); + return [ + [18, 'Y-m-d', '2002-06-30'], + [18, null, new \DateTime('2002-06-30')], + [18, 'Y-m-d', new \DateTime('2002-06-30')], + ]; } public function providerForInvalidDate() { - return array( - array(18, null, 'invalid-input'), - array(18, null, new \stdClass()), - array(18, 'y-m-d', '2002-06-30'), - ); + return [ + [18, null, 'invalid-input'], + [18, null, new \stdClass()], + [18, 'y-m-d', '2002-06-30'], + ]; } } diff --git a/tests/unit/Rules/MultipleTest.php b/tests/unit/Rules/MultipleTest.php index 07b33625..ce29862e 100644 --- a/tests/unit/Rules/MultipleTest.php +++ b/tests/unit/Rules/MultipleTest.php @@ -42,32 +42,32 @@ class MultipleTest extends \PHPUnit_Framework_TestCase public function providerForMultiple() { - return array( - array('', ''), - array(5, 20), - array(5, 5), - array(5, 0), - array(5, -500), - array(1, 0), - array(1, 1), - array(1, 2), - array(1, 3), - array(0, 0), // Only 0 is multiple of 0 - ); + return [ + ['', ''], + [5, 20], + [5, 5], + [5, 0], + [5, -500], + [1, 0], + [1, 1], + [1, 2], + [1, 3], + [0, 0], // Only 0 is multiple of 0 + ]; } public function providerForNotMultiple() { - return array( - array(5, 11), - array(5, 3), - array(5, -1), - array(3, 4), - array(10, -8), - array(10, 57), - array(10, 21), - array(0, 1), - array(0, 2), - ); + return [ + [5, 11], + [5, 3], + [5, -1], + [3, 4], + [10, -8], + [10, 57], + [10, 21], + [0, 1], + [0, 2], + ]; } } diff --git a/tests/unit/Rules/NegativeTest.php b/tests/unit/Rules/NegativeTest.php index a543d34d..608a17e1 100644 --- a/tests/unit/Rules/NegativeTest.php +++ b/tests/unit/Rules/NegativeTest.php @@ -47,27 +47,27 @@ class NegativeTest extends \PHPUnit_Framework_TestCase public function providerForNegative() { - return array( - array('-1.44'), - array(-1e-5), - array(-10), - ); + return [ + ['-1.44'], + [-1e-5], + [-10], + ]; } public function providerForNotNegative() { - return array( - array(''), - array(0), - array(-0), - array(null), - array('a'), - array(' '), - array('Foo'), - array(16), - array('165'), - array(123456), - array(1e10), - ); + return [ + [''], + [0], + [-0], + [null], + ['a'], + [' '], + ['Foo'], + [16], + ['165'], + [123456], + [1e10], + ]; } } diff --git a/tests/unit/Rules/NfeAccessKeyTest.php b/tests/unit/Rules/NfeAccessKeyTest.php index aad0b439..a47a53f1 100644 --- a/tests/unit/Rules/NfeAccessKeyTest.php +++ b/tests/unit/Rules/NfeAccessKeyTest.php @@ -55,39 +55,39 @@ class NfeAccessKeyTest extends \PHPUnit_Framework_TestCase public function validAccessKeyProvider() { - return array( - array('52060433009911002506550120000007800267301615'), - ); + return [ + ['52060433009911002506550120000007800267301615'], + ]; } public function invalidAccessKeyProvider() { - return array( - array('31841136830118868211870485416765268625116906'), - array('21470801245862435081451225624565260861852679'), - array('45644318091447671194616059650873352394885852'), - array('17214281716057582143671174314277906696193888'), - array('56017280182977836779696364362142515138726654'), - array('90157126614010548506235171976891004177042525'), - array('78457064241662300187501877048374851128754067'), - array('39950148079977322431982386613620895568235903'), - array('90820939577654114875253907311677136672761216'), - ); + return [ + ['31841136830118868211870485416765268625116906'], + ['21470801245862435081451225624565260861852679'], + ['45644318091447671194616059650873352394885852'], + ['17214281716057582143671174314277906696193888'], + ['56017280182977836779696364362142515138726654'], + ['90157126614010548506235171976891004177042525'], + ['78457064241662300187501877048374851128754067'], + ['39950148079977322431982386613620895568235903'], + ['90820939577654114875253907311677136672761216'], + ]; } public function invalidAccessKeyLengthProvider() { - return array( - array('11145573386990252067204852181837301'), - array('6209433147444876'), - array('00745996227609395385255721262102'), - array('58215798856653'), - array('24149625439084262707824706699374326'), - array('163907274335'), - array('67229454773008929675906894698'), - array('5858836670181917762140106857095788313119136'), - array('6098412281885524361833754087461339281130'), - array('9025299113310221'), - ); + return [ + ['11145573386990252067204852181837301'], + ['6209433147444876'], + ['00745996227609395385255721262102'], + ['58215798856653'], + ['24149625439084262707824706699374326'], + ['163907274335'], + ['67229454773008929675906894698'], + ['5858836670181917762140106857095788313119136'], + ['6098412281885524361833754087461339281130'], + ['9025299113310221'], + ]; } } diff --git a/tests/unit/Rules/NoTest.php b/tests/unit/Rules/NoTest.php index 9897f7b6..0ef2ee19 100644 --- a/tests/unit/Rules/NoTest.php +++ b/tests/unit/Rules/NoTest.php @@ -56,14 +56,14 @@ class NoTest extends \PHPUnit_Framework_TestCase public function validNoProvider() { - return array( - array('N'), - array('Nay'), - array('Nix'), - array('No'), - array('Nope'), - array('Not'), - ); + return [ + ['N'], + ['Nay'], + ['Nix'], + ['No'], + ['Nope'], + ['Not'], + ]; } /** @@ -78,12 +78,12 @@ class NoTest extends \PHPUnit_Framework_TestCase public function invalidNoProvider() { - return array( - array('Donnot'), - array('Never'), - array('Niet'), - array('Noooooooo'), - array('Não'), - ); + return [ + ['Donnot'], + ['Never'], + ['Niet'], + ['Noooooooo'], + ['Não'], + ]; } } diff --git a/tests/unit/Rules/NoWhitespaceTest.php b/tests/unit/Rules/NoWhitespaceTest.php index 525298cd..9a6bad89 100644 --- a/tests/unit/Rules/NoWhitespaceTest.php +++ b/tests/unit/Rules/NoWhitespaceTest.php @@ -55,24 +55,24 @@ class NoWhitespaceTest extends \PHPUnit_Framework_TestCase public function providerForPass() { - return array( - array(''), - array(null), - array(0), - array('wpoiur'), - array('Foo'), - ); + return [ + [''], + [null], + [0], + ['wpoiur'], + ['Foo'], + ]; } public function providerForFail() { - return array( - array(' '), - array('w poiur'), - array(' '), - array("Foo\nBar"), - array("Foo\tBar"), - ); + return [ + [' '], + ['w poiur'], + [' '], + ["Foo\nBar"], + ["Foo\tBar"], + ]; } /** @@ -81,6 +81,6 @@ class NoWhitespaceTest extends \PHPUnit_Framework_TestCase */ public function testArrayDoesNotThrowAWarning() { - $this->noWhitespaceValidator->assert(array()); + $this->noWhitespaceValidator->assert([]); } } diff --git a/tests/unit/Rules/NotBlankTest.php b/tests/unit/Rules/NotBlankTest.php index 7ec7236c..30550152 100644 --- a/tests/unit/Rules/NotBlankTest.php +++ b/tests/unit/Rules/NotBlankTest.php @@ -66,34 +66,34 @@ class NotBlankTest extends \PHPUnit_Framework_TestCase $object = new stdClass(); $object->foo = true; - return array( - array(1), - array(' oi'), - array(array(5)), - array(array(1)), - array($object), - ); + return [ + [1], + [' oi'], + [[5]], + [[1]], + [$object], + ]; } public function providerForBlank() { - return array( - array(null), - array(''), - array(array()), - array(' '), - array(0), - array('0'), - array(0), - array('0.0'), - array(false), - array(array('')), - array(array(' ')), - array(array(0)), - array(array('0')), - array(array(false)), - array(array(array(''), array(0))), - array(new stdClass()), - ); + return [ + [null], + [''], + [[]], + [' '], + [0], + ['0'], + [0], + ['0.0'], + [false], + [['']], + [[' ']], + [[0]], + [['0']], + [[false]], + [[[''], [0]]], + [new stdClass()], + ]; } } diff --git a/tests/unit/Rules/NotEmptyTest.php b/tests/unit/Rules/NotEmptyTest.php index 287fa721..4496f090 100644 --- a/tests/unit/Rules/NotEmptyTest.php +++ b/tests/unit/Rules/NotEmptyTest.php @@ -44,24 +44,24 @@ class NotEmptyTest extends \PHPUnit_Framework_TestCase public function providerForNotEmpty() { - return array( - array(1), - array(' oi'), - array(array(5)), - array(array(0)), - array(new \stdClass()), - ); + return [ + [1], + [' oi'], + [[5]], + [[0]], + [new \stdClass()], + ]; } public function providerForEmpty() { - return array( - array(''), - array(' '), - array("\n"), - array(false), - array(null), - array(array()), - ); + return [ + [''], + [' '], + ["\n"], + [false], + [null], + [[]], + ]; } } diff --git a/tests/unit/Rules/NotOptionalTest.php b/tests/unit/Rules/NotOptionalTest.php index fa76f986..5724a883 100644 --- a/tests/unit/Rules/NotOptionalTest.php +++ b/tests/unit/Rules/NotOptionalTest.php @@ -41,29 +41,29 @@ class NotOptionalTest extends \PHPUnit_Framework_TestCase public function providerForNotOptional() { - return array( - array(array()), - array(' '), - array(0), - array('0'), - array(0), - array('0.0'), - array(false), - array(array('')), - array(array(' ')), - array(array(0)), - array(array('0')), - array(array(false)), - array(array(array(''), array(0))), - array(new stdClass()), - ); + return [ + [[]], + [' '], + [0], + ['0'], + [0], + ['0.0'], + [false], + [['']], + [[' ']], + [[0]], + [['0']], + [[false]], + [[[''], [0]]], + [new stdClass()], + ]; } public function providerForOptional() { - return array( - array(null), - array(''), - ); + return [ + [null], + [''], + ]; } } diff --git a/tests/unit/Rules/NotTest.php b/tests/unit/Rules/NotTest.php index 1bf92e83..c95c5254 100644 --- a/tests/unit/Rules/NotTest.php +++ b/tests/unit/Rules/NotTest.php @@ -41,25 +41,25 @@ class NotTest extends \PHPUnit_Framework_TestCase public function providerForValidNot() { - return array( - array(new IntVal(), ''), - array(new IntVal(), 'aaa'), - array(new AllOf(new NoWhitespace(), new Digit()), 'as df'), - array(new AllOf(new NoWhitespace(), new Digit()), '12 34'), - array(new AllOf(new AllOf(new NoWhitespace(), new Digit())), '12 34'), - array(new AllOf(new NoneOf(new Numeric(), new IntVal())), 13.37), - array(new NoneOf(new Numeric(), new IntVal()), 13.37), - array(Validator::noneOf(Validator::numeric(), Validator::intVal()), 13.37), - ); + return [ + [new IntVal(), ''], + [new IntVal(), 'aaa'], + [new AllOf(new NoWhitespace(), new Digit()), 'as df'], + [new AllOf(new NoWhitespace(), new Digit()), '12 34'], + [new AllOf(new AllOf(new NoWhitespace(), new Digit())), '12 34'], + [new AllOf(new NoneOf(new Numeric(), new IntVal())), 13.37], + [new NoneOf(new Numeric(), new IntVal()), 13.37], + [Validator::noneOf(Validator::numeric(), Validator::intVal()), 13.37], + ]; } public function providerForInvalidNot() { - return array( - array(new IntVal(), 123), - array(new AllOf(new OneOf(new Numeric(), new IntVal())), 13.37), - array(new OneOf(new Numeric(), new IntVal()), 13.37), - array(Validator::oneOf(Validator::numeric(), Validator::intVal()), 13.37), - ); + return [ + [new IntVal(), 123], + [new AllOf(new OneOf(new Numeric(), new IntVal())), 13.37], + [new OneOf(new Numeric(), new IntVal()), 13.37], + [Validator::oneOf(Validator::numeric(), Validator::intVal()), 13.37], + ]; } } diff --git a/tests/unit/Rules/NullTypeTest.php b/tests/unit/Rules/NullTypeTest.php index b9474119..d10a9c6d 100644 --- a/tests/unit/Rules/NullTypeTest.php +++ b/tests/unit/Rules/NullTypeTest.php @@ -44,12 +44,12 @@ class NullTypeTest extends \PHPUnit_Framework_TestCase public function providerForNotNull() { - return array( - array(''), - array(0), - array('w poiur'), - array(' '), - array('Foo'), - ); + return [ + [''], + [0], + ['w poiur'], + [' '], + ['Foo'], + ]; } } diff --git a/tests/unit/Rules/NumericTest.php b/tests/unit/Rules/NumericTest.php index e12006a5..ff05d7ba 100644 --- a/tests/unit/Rules/NumericTest.php +++ b/tests/unit/Rules/NumericTest.php @@ -47,24 +47,24 @@ class NumericTest extends \PHPUnit_Framework_TestCase public function providerForNumeric() { - return array( - array(165), - array(165.0), - array(-165), - array('165'), - array('165.0'), - array('+165.0'), - ); + return [ + [165], + [165.0], + [-165], + ['165'], + ['165.0'], + ['+165.0'], + ]; } public function providerForNotNumeric() { - return array( - array(''), - array(null), - array('a'), - array(' '), - array('Foo'), - ); + return [ + [''], + [null], + ['a'], + [' '], + ['Foo'], + ]; } } diff --git a/tests/unit/Rules/ObjectTypeTest.php b/tests/unit/Rules/ObjectTypeTest.php index 3e6d3d6b..940f2ad0 100644 --- a/tests/unit/Rules/ObjectTypeTest.php +++ b/tests/unit/Rules/ObjectTypeTest.php @@ -47,21 +47,21 @@ class ObjectTypeTest extends \PHPUnit_Framework_TestCase public function providerForObject() { - return array( - array(new \stdClass()), - array(new \ArrayObject()), - ); + return [ + [new \stdClass()], + [new \ArrayObject()], + ]; } public function providerForNotObject() { - return array( - array(''), - array(null), - array(121), - array(array()), - array('Foo'), - array(false), - ); + return [ + [''], + [null], + [121], + [[]], + ['Foo'], + [false], + ]; } } diff --git a/tests/unit/Rules/OddTest.php b/tests/unit/Rules/OddTest.php index b2341b81..3d387ba3 100644 --- a/tests/unit/Rules/OddTest.php +++ b/tests/unit/Rules/OddTest.php @@ -47,22 +47,22 @@ class OddTest extends \PHPUnit_Framework_TestCase public function providerForOdd() { - return array( - array(-5), - array(-1), - array(1), - array(13), - ); + return [ + [-5], + [-1], + [1], + [13], + ]; } public function providerForNotOdd() { - return array( - array(''), - array(-2), - array(-0), - array(0), - array(32), - ); + return [ + [''], + [-2], + [-0], + [0], + [32], + ]; } } diff --git a/tests/unit/Rules/OptionalTest.php b/tests/unit/Rules/OptionalTest.php index 63b7d49e..25679817 100644 --- a/tests/unit/Rules/OptionalTest.php +++ b/tests/unit/Rules/OptionalTest.php @@ -21,31 +21,31 @@ class OptionalTest extends \PHPUnit_Framework_TestCase { public function providerForOptional() { - return array( - array(null), - array(''), - ); + return [ + [null], + [''], + ]; } public function providerForNotOptional() { - return array( - array(1), - array(array()), - array(' '), - array(0), - array('0'), - array(0), - array('0.0'), - array(false), - array(array('')), - array(array(' ')), - array(array(0)), - array(array('0')), - array(array(false)), - array(array(array(''), array(0))), - array(new stdClass()), - ); + return [ + [1], + [[]], + [' '], + [0], + ['0'], + [0], + ['0.0'], + [false], + [['']], + [[' ']], + [[0]], + [['0']], + [[false]], + [[[''], [0]]], + [new stdClass()], + ]; } public function testShouldAcceptInstanceOfValidatobleOnConstructor() diff --git a/tests/unit/Rules/PerfectSquareTest.php b/tests/unit/Rules/PerfectSquareTest.php index 6618b326..c179d91d 100644 --- a/tests/unit/Rules/PerfectSquareTest.php +++ b/tests/unit/Rules/PerfectSquareTest.php @@ -47,33 +47,33 @@ class PerfectSquareTest extends \PHPUnit_Framework_TestCase public function providerForPerfectSquare() { - return array( - array(1), - array(9), - array(25), - array('25'), - array(400), - array('400'), - array('0'), - array(81), - array(0), - array(250), - ); + return [ + [1], + [9], + [25], + ['25'], + [400], + ['400'], + ['0'], + [81], + [0], + [250], + ]; } public function providerForNotPerfectSquare() { - return array( - array(''), - array(null), - array(7), - array(-1), - array(6), - array(2), - array('-1'), - array('a'), - array(' '), - array('Foo'), - ); + return [ + [''], + [null], + [7], + [-1], + [6], + [2], + ['-1'], + ['a'], + [' '], + ['Foo'], + ]; } } diff --git a/tests/unit/Rules/PhoneTest.php b/tests/unit/Rules/PhoneTest.php index f0dc1d72..46f5d395 100644 --- a/tests/unit/Rules/PhoneTest.php +++ b/tests/unit/Rules/PhoneTest.php @@ -47,83 +47,83 @@ class PhoneTest extends \PHPUnit_Framework_TestCase public function providerForPhone() { - return array( - array('+5-555-555-5555'), - array('+5 555 555 5555'), - array('+5.555.555.5555'), - array('5-555-555-5555'), - array('5.555.555.5555'), - array('5 555 555 5555'), - array('555.555.5555'), - array('555 555 5555'), - array('555-555-5555'), - array('555-5555555'), - array('5(555)555.5555'), - array('+5(555)555.5555'), - array('+5(555)555 5555'), - array('+5(555)555-5555'), - array('+5(555)5555555'), - array('(555)5555555'), - array('(555)555.5555'), - array('(555)555-5555'), - array('(555) 555 5555'), - array('55555555555'), - array('5555555555'), - array('+33(1)2222222'), - array('+33(1)222 2222'), - array('+33(1)222.2222'), - array('+33(1)22 22 22 22'), - array('33(1)2222222'), - array('33(1)22222222'), - array('33(1)22 22 22 22'), - array('(020) 7476 4026'), - array('33(020) 7777 7777'), - array('33(020)7777 7777'), - array('+33(020) 7777 7777'), - array('+33(020)7777 7777'), - array('03-6106666'), - array('036106666'), - array('+33(11) 97777 7777'), - array('+3311977777777'), - array('11977777777'), - array('11 97777 7777'), - array('(11) 97777 7777'), - array('(11) 97777-7777'), - array('555-5555'), - array('5555555'), - array('555.5555'), - array('555 5555'), - ); + return [ + ['+5-555-555-5555'], + ['+5 555 555 5555'], + ['+5.555.555.5555'], + ['5-555-555-5555'], + ['5.555.555.5555'], + ['5 555 555 5555'], + ['555.555.5555'], + ['555 555 5555'], + ['555-555-5555'], + ['555-5555555'], + ['5(555)555.5555'], + ['+5(555)555.5555'], + ['+5(555)555 5555'], + ['+5(555)555-5555'], + ['+5(555)5555555'], + ['(555)5555555'], + ['(555)555.5555'], + ['(555)555-5555'], + ['(555) 555 5555'], + ['55555555555'], + ['5555555555'], + ['+33(1)2222222'], + ['+33(1)222 2222'], + ['+33(1)222.2222'], + ['+33(1)22 22 22 22'], + ['33(1)2222222'], + ['33(1)22222222'], + ['33(1)22 22 22 22'], + ['(020) 7476 4026'], + ['33(020) 7777 7777'], + ['33(020)7777 7777'], + ['+33(020) 7777 7777'], + ['+33(020)7777 7777'], + ['03-6106666'], + ['036106666'], + ['+33(11) 97777 7777'], + ['+3311977777777'], + ['11977777777'], + ['11 97777 7777'], + ['(11) 97777 7777'], + ['(11) 97777-7777'], + ['555-5555'], + ['5555555'], + ['555.5555'], + ['555 5555'], + ]; } public function providerForNotPhone() { - return array( - array(''), - array('123'), - array('s555-5555'), - array('555-555'), - array('555555'), - array('555+5555'), - array('(555)555555'), - array('(555)55555'), - array('+(555)555 555'), - array('+5(555)555 555'), - array('+5(555)555 555 555'), - array('555)555 555'), - array('+5(555)5555 555'), - array('(555)55 555'), - array('(555)5555 555'), - array('+5(555)555555'), - array('5(555)55 55555'), - array('(5)555555'), - array('+55(5)55 5 55 55'), - array('+55(5)55 55 55 5'), - array('+55(5)55 55 55'), - array('+55(5)5555 555'), - array('+55()555 5555'), - array('03610666-5'), - array('text'), - ); + return [ + [''], + ['123'], + ['s555-5555'], + ['555-555'], + ['555555'], + ['555+5555'], + ['(555)555555'], + ['(555)55555'], + ['+(555)555 555'], + ['+5(555)555 555'], + ['+5(555)555 555 555'], + ['555)555 555'], + ['+5(555)5555 555'], + ['(555)55 555'], + ['(555)5555 555'], + ['+5(555)555555'], + ['5(555)55 55555'], + ['(5)555555'], + ['+55(5)55 5 55 55'], + ['+55(5)55 55 55 5'], + ['+55(5)55 55 55'], + ['+55(5)5555 555'], + ['+55()555 5555'], + ['03610666-5'], + ['text'], + ]; } } diff --git a/tests/unit/Rules/PositiveTest.php b/tests/unit/Rules/PositiveTest.php index b067da08..edc62153 100644 --- a/tests/unit/Rules/PositiveTest.php +++ b/tests/unit/Rules/PositiveTest.php @@ -47,27 +47,27 @@ class PositiveTest extends \PHPUnit_Framework_TestCase public function providerForPositive() { - return array( - array(16), - array('165'), - array(123456), - array(1e10), - ); + return [ + [16], + ['165'], + [123456], + [1e10], + ]; } public function providerForNotPositive() { - return array( - array(''), - array(null), - array('a'), - array(' '), - array('Foo'), - array('-1.44'), - array(-1e-5), - array(0), - array(-0), - array(-10), - ); + return [ + [''], + [null], + ['a'], + [' '], + ['Foo'], + ['-1.44'], + [-1e-5], + [0], + [-0], + [-10], + ]; } } diff --git a/tests/unit/Rules/PostalCodeTest.php b/tests/unit/Rules/PostalCodeTest.php index b13fc094..9688f802 100644 --- a/tests/unit/Rules/PostalCodeTest.php +++ b/tests/unit/Rules/PostalCodeTest.php @@ -83,14 +83,14 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase public function validPostalCodesProvider() { - return array( - array('BR', '02179-000'), - array('BR', '02179000'), - array('GB', 'GIR 0AA'), - array('GB', 'PR1 9LY'), - array('US', '02179'), - array('YE', ''), - ); + return [ + ['BR', '02179-000'], + ['BR', '02179000'], + ['GB', 'GIR 0AA'], + ['GB', 'PR1 9LY'], + ['US', '02179'], + ['YE', ''], + ]; } /** @@ -115,14 +115,14 @@ class PostalCodeTest extends \PHPUnit_Framework_TestCase public function invalidPostalCodesProvider() { - return array( - array('BR', '02179'), - array('BR', '02179.000'), - array('GB', 'GIR 00A'), - array('GB', 'GIR0AA'), - array('GB', 'PR19LY'), - array('US', '021 79'), - array('YE', '02179'), - ); + return [ + ['BR', '02179'], + ['BR', '02179.000'], + ['GB', 'GIR 00A'], + ['GB', 'GIR0AA'], + ['GB', 'PR19LY'], + ['US', '021 79'], + ['YE', '02179'], + ]; } } diff --git a/tests/unit/Rules/PrimeNumberTest.php b/tests/unit/Rules/PrimeNumberTest.php index b0e636b6..7d02a92d 100644 --- a/tests/unit/Rules/PrimeNumberTest.php +++ b/tests/unit/Rules/PrimeNumberTest.php @@ -47,32 +47,32 @@ class PrimeNumberTest extends \PHPUnit_Framework_TestCase public function providerForPrimeNumber() { - return array( - array(3), - array(5), - array(7), - array('3'), - array('5'), - array('+7'), - ); + return [ + [3], + [5], + [7], + ['3'], + ['5'], + ['+7'], + ]; } public function providerForNotPrimeNumber() { - return array( - array(''), - array(null), - array(0), - array(10), - array(25), - array(36), - array(-1), - array('-1'), - array('25'), - array('0'), - array('a'), - array(' '), - array('Foo'), - ); + return [ + [''], + [null], + [0], + [10], + [25], + [36], + [-1], + ['-1'], + ['25'], + ['0'], + ['a'], + [' '], + ['Foo'], + ]; } } diff --git a/tests/unit/Rules/PrntTest.php b/tests/unit/Rules/PrntTest.php index 1f93c20e..c125f505 100644 --- a/tests/unit/Rules/PrntTest.php +++ b/tests/unit/Rules/PrntTest.php @@ -58,41 +58,41 @@ class PrntTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array("\t\n", "\t\n "), - array("\v\r", "\v\r "), - ); + return [ + ["\t\n", "\t\n "], + ["\v\r", "\v\r "], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidPrint() { - return array( - array(' '), - array('LKA#@%.54'), - array('foobar'), - array('16-50'), - array('123'), - array('foo bar'), - array('#$%&*_'), - ); + return [ + [' '], + ['LKA#@%.54'], + ['foobar'], + ['16-50'], + ['123'], + ['foo bar'], + ['#$%&*_'], + ]; } public function providerForInvalidPrint() { - return array( - array(''), - array(null), - array('foo'.chr(7).'bar'), - array('foo'.chr(10).'bar'), - ); + return [ + [''], + [null], + ['foo'.chr(7).'bar'], + ['foo'.chr(10).'bar'], + ]; } } diff --git a/tests/unit/Rules/PunctTest.php b/tests/unit/Rules/PunctTest.php index 4be93d14..1875bc0f 100644 --- a/tests/unit/Rules/PunctTest.php +++ b/tests/unit/Rules/PunctTest.php @@ -58,43 +58,43 @@ class PunctTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('abc123 ', '!@#$%^&*(){} abc 123'), - array("abc123 \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"), - ); + return [ + ['abc123 ', '!@#$%^&*(){} abc 123'], + ["abc123 \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidPunct() { - return array( - array('.'), - array(',;:'), - array('-@#$*'), - array('()[]{}'), - ); + return [ + ['.'], + [',;:'], + ['-@#$*'], + ['()[]{}'], + ]; } public function providerForInvalidPunct() { - return array( - array(''), - array('16-50'), - array('a'), - array(' '), - array('Foo'), - array('12.1'), - array('-12'), - array(-12), - array('( )_{}'), - ); + return [ + [''], + ['16-50'], + ['a'], + [' '], + ['Foo'], + ['12.1'], + ['-12'], + [-12], + ['( )_{}'], + ]; } } diff --git a/tests/unit/Rules/ReadableTest.php b/tests/unit/Rules/ReadableTest.php index bd80c104..577c3af9 100644 --- a/tests/unit/Rules/ReadableTest.php +++ b/tests/unit/Rules/ReadableTest.php @@ -61,7 +61,7 @@ class ReadableTest extends \PHPUnit_Framework_TestCase public function testShouldValidateObjects() { $rule = new Readable(); - $object = $this->getMock('SplFileInfo', array('isReadable'), array('somefile.txt')); + $object = $this->getMock('SplFileInfo', ['isReadable'], ['somefile.txt']); $object->expects($this->once()) ->method('isReadable') ->will($this->returnValue(true)); diff --git a/tests/unit/Rules/ResourceTypeTest.php b/tests/unit/Rules/ResourceTypeTest.php index 9ba410c1..4380109c 100644 --- a/tests/unit/Rules/ResourceTypeTest.php +++ b/tests/unit/Rules/ResourceTypeTest.php @@ -52,22 +52,22 @@ class ResourceTypeTest extends \PHPUnit_Framework_TestCase public function providerForResource() { - return array( - array(stream_context_create()), - array(tmpfile()), - array(xml_parser_create()), - ); + return [ + [stream_context_create()], + [tmpfile()], + [xml_parser_create()], + ]; } public function providerForNonResource() { - return array( - array('String'), - array(123), - array(array()), - array(function () {}), - array(new \stdClass()), - array(null), - ); + return [ + ['String'], + [123], + [[]], + [function () {}], + [new \stdClass()], + [null], + ]; } } diff --git a/tests/unit/Rules/RomanTest.php b/tests/unit/Rules/RomanTest.php index 3f7455b5..ed068de4 100644 --- a/tests/unit/Rules/RomanTest.php +++ b/tests/unit/Rules/RomanTest.php @@ -47,33 +47,33 @@ class RomanTest extends \PHPUnit_Framework_TestCase public function providerForRoman() { - return array( - array(''), - array('III'), - array('IV'), - array('VI'), - array('XIX'), - array('XLII'), - array('LXII'), - array('CXLIX'), - array('CLIII'), - array('MCCXXXIV'), - array('MMXXIV'), - array('MCMLXXV'), - array('MMMMCMXCIX'), - ); + return [ + [''], + ['III'], + ['IV'], + ['VI'], + ['XIX'], + ['XLII'], + ['LXII'], + ['CXLIX'], + ['CLIII'], + ['MCCXXXIV'], + ['MMXXIV'], + ['MCMLXXV'], + ['MMMMCMXCIX'], + ]; } public function providerForNotRoman() { - return array( - array(' '), - array('IIII'), - array('IVVVX'), - array('CCDC'), // - array('MXM'), - array('XIIIIIIII'), - array('MIMIMI'), - ); + return [ + [' '], + ['IIII'], + ['IVVVX'], + ['CCDC'], // + ['MXM'], + ['XIIIIIIII'], + ['MIMIMI'], + ]; } } diff --git a/tests/unit/Rules/ScalarValTest.php b/tests/unit/Rules/ScalarValTest.php index d355dec5..4c242712 100644 --- a/tests/unit/Rules/ScalarValTest.php +++ b/tests/unit/Rules/ScalarValTest.php @@ -52,24 +52,24 @@ class ScalarValTest extends \PHPUnit_Framework_TestCase public function providerForScalar() { - return array( - array('6'), - array('String'), - array(1.0), - array(42), - array(false), - array(true), - ); + return [ + ['6'], + ['String'], + [1.0], + [42], + [false], + [true], + ]; } public function providerForNonScalar() { - return array( - array(array()), - array(function () {}), - array(new \stdClass()), - array(null), - array(tmpfile()), - ); + return [ + [[]], + [function () {}], + [new \stdClass()], + [null], + [tmpfile()], + ]; } } diff --git a/tests/unit/Rules/SizeTest.php b/tests/unit/Rules/SizeTest.php index f6567614..9818db41 100644 --- a/tests/unit/Rules/SizeTest.php +++ b/tests/unit/Rules/SizeTest.php @@ -26,18 +26,18 @@ class SizeTest extends PHPUnit_Framework_TestCase { public function validSizeProvider() { - return array( - array(42, 42), - array('1b', 1), - array('1kb', 1024), - array('1mb', 1048576), - array('1gb', 1073741824), - array('1tb', 1099511627776), - array('1pb', 1125899906842624), - array('1eb', 1152921504606846976), - array('1zb', 1.1805916207174113E+21), - array('1yb', 1.2089258196146292E+24), - ); + return [ + [42, 42], + ['1b', 1], + ['1kb', 1024], + ['1mb', 1048576], + ['1gb', 1073741824], + ['1tb', 1099511627776], + ['1pb', 1125899906842624], + ['1eb', 1152921504606846976], + ['1zb', 1.1805916207174113E+21], + ['1yb', 1.2089258196146292E+24], + ]; } public function validFileProvider() @@ -47,27 +47,27 @@ class SizeTest extends PHPUnit_Framework_TestCase $file2Kb = vfsStream::newFile('2kb.txt')->withContent(LargeFileContent::withKilobytes(2))->at($root); $file2Mb = vfsStream::newFile('2mb.txt')->withContent(LargeFileContent::withMegabytes(2))->at($root); - return array( + return [ // Valid data - array($file2Kb->url(), '1kb', null, true), - array($file2Kb->url(), '2kb', null, true), - array($file2Kb->url(), null, '2kb', true), - array($file2Kb->url(), null, '3kb', true), - array($file2Kb->url(), '1kb', '3kb', true), - array($file2Mb->url(), '1mb', null, true), - array($file2Mb->url(), '2mb', null, true), - array($file2Mb->url(), null, '2mb', true), - array($file2Mb->url(), null, '3mb', true), - array($file2Mb->url(), '1mb', '3mb', true), + [$file2Kb->url(), '1kb', null, true], + [$file2Kb->url(), '2kb', null, true], + [$file2Kb->url(), null, '2kb', true], + [$file2Kb->url(), null, '3kb', true], + [$file2Kb->url(), '1kb', '3kb', true], + [$file2Mb->url(), '1mb', null, true], + [$file2Mb->url(), '2mb', null, true], + [$file2Mb->url(), null, '2mb', true], + [$file2Mb->url(), null, '3mb', true], + [$file2Mb->url(), '1mb', '3mb', true], // Invalid data - array($file2Kb->url(), '3kb', null, false), - array($file2Kb->url(), null, '1kb', false), - array($file2Kb->url(), '1kb', '1.5kb', false), - array($file2Mb->url(), '2.5mb', null, false), - array($file2Mb->url(), '3gb', null, false), - array($file2Mb->url(), null, '1b', false), - array($file2Mb->url(), '1pb', '3pb', false), - ); + [$file2Kb->url(), '3kb', null, false], + [$file2Kb->url(), null, '1kb', false], + [$file2Kb->url(), '1kb', '1.5kb', false], + [$file2Mb->url(), '2.5mb', null, false], + [$file2Mb->url(), '3gb', null, false], + [$file2Mb->url(), null, '1b', false], + [$file2Mb->url(), '1pb', '3pb', false], + ]; } /** diff --git a/tests/unit/Rules/SlugTest.php b/tests/unit/Rules/SlugTest.php index 9d7f5879..b0988835 100644 --- a/tests/unit/Rules/SlugTest.php +++ b/tests/unit/Rules/SlugTest.php @@ -33,33 +33,33 @@ class SlugTest extends \PHPUnit_Framework_TestCase public function testInvalidSlug($input) { $rule = new Slug(); - + $this->assertFalse($rule->validate($input)); } public function providerValidSlug() { - return array( - array('o-rato-roeu-o-rei-de-roma'), - array('o-alganet-e-um-feio'), - array('a-e-i-o-u'), - array('anticonstitucionalissimamente'), - ); + return [ + ['o-rato-roeu-o-rei-de-roma'], + ['o-alganet-e-um-feio'], + ['a-e-i-o-u'], + ['anticonstitucionalissimamente'], + ]; } public function providerInvalidSlug() { - return array( - array(''), - array('o-alganet-é-um-feio'), - array('á-é-í-ó-ú'), - array('-assim-nao-pode'), - array('assim-tambem-nao-'), - array('nem--assim'), - array('--nem-assim'), - array('Nem mesmo Assim'), - array('Ou-ate-assim'), - array('-Se juntar-tudo-Então-'), - ); + return [ + [''], + ['o-alganet-é-um-feio'], + ['á-é-í-ó-ú'], + ['-assim-nao-pode'], + ['assim-tambem-nao-'], + ['nem--assim'], + ['--nem-assim'], + ['Nem mesmo Assim'], + ['Ou-ate-assim'], + ['-Se juntar-tudo-Então-'], + ]; } } diff --git a/tests/unit/Rules/SpaceTest.php b/tests/unit/Rules/SpaceTest.php index e1810b7e..4a065936 100644 --- a/tests/unit/Rules/SpaceTest.php +++ b/tests/unit/Rules/SpaceTest.php @@ -58,43 +58,43 @@ class SpaceTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} '), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n "), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} '], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n "], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidSpace() { - return array( - array("\n"), - array(' '), - array(' '), - array("\t"), - array(' '), - ); + return [ + ["\n"], + [' '], + [' '], + ["\t"], + [' '], + ]; } public function providerForInvalidSpace() { - return array( - array(''), - array('16-50'), - array('a'), - array('Foo'), - array('12.1'), - array('-12'), - array(-12), - array('_'), - ); + return [ + [''], + ['16-50'], + ['a'], + ['Foo'], + ['12.1'], + ['-12'], + [-12], + ['_'], + ]; } } diff --git a/tests/unit/Rules/StartsWithTest.php b/tests/unit/Rules/StartsWithTest.php index f20a2ac4..f2f907ef 100644 --- a/tests/unit/Rules/StartsWithTest.php +++ b/tests/unit/Rules/StartsWithTest.php @@ -42,27 +42,27 @@ class StartsWithTest extends \PHPUnit_Framework_TestCase public function providerForStartsWith() { - return array( - array('foo', array('foo', 'bar')), - array('foo', 'FOObarbaz'), - array('foo', 'foobarbaz'), - array('foo', 'foobazfoo'), - array('1', array(1, 2, 3)), - array('1', array('1', 2, 3), true), - ); + return [ + ['foo', ['foo', 'bar']], + ['foo', 'FOObarbaz'], + ['foo', 'foobarbaz'], + ['foo', 'foobazfoo'], + ['1', [1, 2, 3]], + ['1', ['1', 2, 3], true], + ]; } public function providerForNotStartsWith() { - return array( - array('foo', ''), - array('bat', array('foo', 'bar')), - array('foo', 'barfaabaz'), - array('foo', 'FOObarbaz', true), - array('foo', 'faabarbaz'), - array('foo', 'baabazfaa'), - array('foo', 'baafoofaa'), - array('1', array(1, '1', 3), true), - ); + return [ + ['foo', ''], + ['bat', ['foo', 'bar']], + ['foo', 'barfaabaz'], + ['foo', 'FOObarbaz', true], + ['foo', 'faabarbaz'], + ['foo', 'baabazfaa'], + ['foo', 'baafoofaa'], + ['1', [1, '1', 3], true], + ]; } } diff --git a/tests/unit/Rules/StringTypeTest.php b/tests/unit/Rules/StringTypeTest.php index 950c3332..b15e9f6b 100644 --- a/tests/unit/Rules/StringTypeTest.php +++ b/tests/unit/Rules/StringTypeTest.php @@ -40,19 +40,19 @@ class StringTypeTest extends \PHPUnit_Framework_TestCase public function providerForString() { - return array( - array(''), - array('165.7'), - ); + return [ + [''], + ['165.7'], + ]; } public function providerForNotString() { - return array( - array(null), - array(array()), - array(new \stdClass()), - array(150), - ); + return [ + [null], + [[]], + [new \stdClass()], + [150], + ]; } } diff --git a/tests/unit/Rules/SubdivisionCodeTest.php b/tests/unit/Rules/SubdivisionCodeTest.php index 8609d440..76bdf67d 100644 --- a/tests/unit/Rules/SubdivisionCodeTest.php +++ b/tests/unit/Rules/SubdivisionCodeTest.php @@ -46,13 +46,13 @@ class SubdivisionCodeTest extends PHPUnit_Framework_TestCase public function providerForValidSubdivisionCodeInformation() { - return array( - array('AQ', null), - array('BR', 'SP'), - array('MV', '00'), - array('US', 'CA'), - array('YT', ''), - ); + return [ + ['AQ', null], + ['BR', 'SP'], + ['MV', '00'], + ['US', 'CA'], + ['YT', ''], + ]; } /** @@ -67,11 +67,11 @@ class SubdivisionCodeTest extends PHPUnit_Framework_TestCase public function providerForInvalidSubdivisionCodeInformation() { - return array( - array('BR', 'CA'), - array('MV', 0), - array('US', 'CE'), - ); + return [ + ['BR', 'CA'], + ['MV', 0], + ['US', 'CE'], + ]; } /** diff --git a/tests/unit/Rules/SymbolicLinkTest.php b/tests/unit/Rules/SymbolicLinkTest.php index e8a9936b..8ba867a1 100644 --- a/tests/unit/Rules/SymbolicLinkTest.php +++ b/tests/unit/Rules/SymbolicLinkTest.php @@ -61,7 +61,7 @@ class SymbolicLinkTest extends \PHPUnit_Framework_TestCase public function testShouldValidateObjects() { $rule = new SymbolicLink(); - $object = $this->getMock('SplFileInfo', array('isLink'), array('somelink.lnk')); + $object = $this->getMock('SplFileInfo', ['isLink'], ['somelink.lnk']); $object->expects($this->once()) ->method('isLink') ->will($this->returnValue(true)); diff --git a/tests/unit/Rules/TldTest.php b/tests/unit/Rules/TldTest.php index 203df686..c60c48fb 100644 --- a/tests/unit/Rules/TldTest.php +++ b/tests/unit/Rules/TldTest.php @@ -19,14 +19,14 @@ class TldTest extends \PHPUnit_Framework_TestCase { public function providerForValidTld() { - return array( - array('com'), - array('cafe'), - array('democrat'), - array('br'), - array('us'), - array('eu'), - ); + return [ + ['com'], + ['cafe'], + ['democrat'], + ['br'], + ['us'], + ['eu'], + ]; } /** @@ -41,12 +41,12 @@ class TldTest extends \PHPUnit_Framework_TestCase public function providerForInvalidTld() { - return array( - array('1'), - array(1.0), - array('wrongtld'), - array(true), - ); + return [ + ['1'], + [1.0], + ['wrongtld'], + [true], + ]; } /** diff --git a/tests/unit/Rules/TrueValTest.php b/tests/unit/Rules/TrueValTest.php index eab2b5aa..67b3386c 100644 --- a/tests/unit/Rules/TrueValTest.php +++ b/tests/unit/Rules/TrueValTest.php @@ -30,20 +30,20 @@ class TrueValTest extends \PHPUnit_Framework_TestCase public function validTrueProvider() { - return array( - array(true), - array(1), - array('1'), - array('true'), - array('on'), - array('yes'), - array('TRUE'), - array('ON'), - array('YES'), - array('True'), - array('On'), - array('Yes'), - ); + return [ + [true], + [1], + ['1'], + ['true'], + ['on'], + ['yes'], + ['TRUE'], + ['ON'], + ['YES'], + ['True'], + ['On'], + ['Yes'], + ]; } /** @@ -58,16 +58,16 @@ class TrueValTest extends \PHPUnit_Framework_TestCase public function invalidTrueProvider() { - return array( - array(false), - array(0), - array(0.5), - array(2), - array('0'), - array('false'), - array('off'), - array('no'), - array('truth'), - ); + return [ + [false], + [0], + [0.5], + [2], + ['0'], + ['false'], + ['off'], + ['no'], + ['truth'], + ]; } } diff --git a/tests/unit/Rules/TypeTest.php b/tests/unit/Rules/TypeTest.php index 1a786322..40b3c779 100644 --- a/tests/unit/Rules/TypeTest.php +++ b/tests/unit/Rules/TypeTest.php @@ -76,27 +76,27 @@ class TypeTest extends \PHPUnit_Framework_TestCase public function providerForValidType() { - return array( - array('array', array()), - array('bool', true), - array('boolean', false), - array('callable', function () {}), - array('double', 0.8), - array('float', 1.0), - array('int', 42), - array('integer', 13), - array('null', null), - array('object', new stdClass()), - array('resource', tmpfile()), - array('string', 'Something'), - ); + return [ + ['array', []], + ['bool', true], + ['boolean', false], + ['callable', function () {}], + ['double', 0.8], + ['float', 1.0], + ['int', 42], + ['integer', 13], + ['null', null], + ['object', new stdClass()], + ['resource', tmpfile()], + ['string', 'Something'], + ]; } public function providerForInvalidType() { - return array( - array('int', '1'), - array('bool', '1'), - ); + return [ + ['int', '1'], + ['bool', '1'], + ]; } } diff --git a/tests/unit/Rules/UppercaseTest.php b/tests/unit/Rules/UppercaseTest.php index e43eddd0..afc8c5a9 100644 --- a/tests/unit/Rules/UppercaseTest.php +++ b/tests/unit/Rules/UppercaseTest.php @@ -42,25 +42,25 @@ class UppercaseTest extends \PHPUnit_Framework_TestCase public function providerForValidUppercase() { - return array( - array(''), - array('UPPERCASE'), - array('UPPERCASE-WITH-DASHES'), - array('UPPERCASE WITH SPACES'), - array('UPPERCASE WITH NUMBERS 123'), - array('UPPERCASE WITH SPECIALS CHARACTERS LIKE Ã Ç Ê'), - array('WITH SPECIALS CHARACTERS LIKE # $ % & * +'), - array('ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ'), - ); + return [ + [''], + ['UPPERCASE'], + ['UPPERCASE-WITH-DASHES'], + ['UPPERCASE WITH SPACES'], + ['UPPERCASE WITH NUMBERS 123'], + ['UPPERCASE WITH SPECIALS CHARACTERS LIKE Ã Ç Ê'], + ['WITH SPECIALS CHARACTERS LIKE # $ % & * +'], + ['ΤΆΧΙΣΤΗ ΑΛΏΠΗΞ ΒΑΦΉΣ ΨΗΜΈΝΗ ΓΗ, ΔΡΑΣΚΕΛΊΖΕΙ ΥΠΈΡ ΝΩΘΡΟΎ ΚΥΝΌΣ'], + ]; } public function providerForInvalidUppercase() { - return array( - array('lowercase'), - array('CamelCase'), - array('First Character Uppercase'), - array('With Numbers 1 2 3'), - ); + return [ + ['lowercase'], + ['CamelCase'], + ['First Character Uppercase'], + ['With Numbers 1 2 3'], + ]; } } diff --git a/tests/unit/Rules/UrlTest.php b/tests/unit/Rules/UrlTest.php index cfd3f823..b0a8cb3b 100644 --- a/tests/unit/Rules/UrlTest.php +++ b/tests/unit/Rules/UrlTest.php @@ -40,29 +40,29 @@ class UrlTest extends \PHPUnit_Framework_TestCase public function providerForValidUrl() { - return array( - array('ftp://ftp.is.co.za.example.org/rfc/rfc1808.txt'), - array('gopher://spinaltap.micro.umn.example.edu/00/Weather/California/Los%20Angeles'), - array('http://www.ietf.org/rfc/rfc2396.txt'), - array('http://www.math.uio.no.example.net/faq/compression-faq/part1.html'), - array('https://www.youtube.com/watch?v=6FOUqQt3Kg0'), - array('ldap://[2001:db8::7]/c=GB?objectClass?one'), - array('mailto:John.Doe@example.com'), - array('mailto:mduerst@ifi.unizh.example.gov'), - array('news:comp.infosystems.www.servers.unix'), - array('news:comp.infosystems.www.servers.unix'), - array('telnet://192.0.2.16:80/'), - array('telnet://melvyl.ucop.example.edu/'), - ); + return [ + ['ftp://ftp.is.co.za.example.org/rfc/rfc1808.txt'], + ['gopher://spinaltap.micro.umn.example.edu/00/Weather/California/Los%20Angeles'], + ['http://www.ietf.org/rfc/rfc2396.txt'], + ['http://www.math.uio.no.example.net/faq/compression-faq/part1.html'], + ['https://www.youtube.com/watch?v=6FOUqQt3Kg0'], + ['ldap://[2001:db8::7]/c=GB?objectClass?one'], + ['mailto:John.Doe@example.com'], + ['mailto:mduerst@ifi.unizh.example.gov'], + ['news:comp.infosystems.www.servers.unix'], + ['news:comp.infosystems.www.servers.unix'], + ['telnet://192.0.2.16:80/'], + ['telnet://melvyl.ucop.example.edu/'], + ]; } public function providerForInvalidUrl() { - return array( - array('example.com'), - array('http:/example.com/'), - array('tel:+1-816-555-1212'), - array('urn:oasis:names:specification:docbook:dtd:xml:4.1.2'), - ); + return [ + ['example.com'], + ['http:/example.com/'], + ['tel:+1-816-555-1212'], + ['urn:oasis:names:specification:docbook:dtd:xml:4.1.2'], + ]; } } diff --git a/tests/unit/Rules/VersionTest.php b/tests/unit/Rules/VersionTest.php index 932192e9..72d6989c 100644 --- a/tests/unit/Rules/VersionTest.php +++ b/tests/unit/Rules/VersionTest.php @@ -42,27 +42,27 @@ class VersionTest extends \PHPUnit_Framework_TestCase public function providerForValidVersion() { - return array( - array('1.0.0'), - array('1.0.0-alpha'), - array('1.0.0-alpha.1'), - array('1.0.0-0.3.7'), - array('1.0.0-x.7.z.92'), - array('1.3.7+build.2.b8f12d7'), - array('1.3.7-rc.1'), - ); + return [ + ['1.0.0'], + ['1.0.0-alpha'], + ['1.0.0-alpha.1'], + ['1.0.0-0.3.7'], + ['1.0.0-x.7.z.92'], + ['1.3.7+build.2.b8f12d7'], + ['1.3.7-rc.1'], + ]; } public function providerForInvalidVersion() { - return array( - array(''), - array('1.3.7--'), - array('1.3.7++'), - array('foo'), - array('1.2.3.4'), - array('1.2.3.4-beta'), - array('beta'), - ); + return [ + [''], + ['1.3.7--'], + ['1.3.7++'], + ['foo'], + ['1.2.3.4'], + ['1.2.3.4-beta'], + ['beta'], + ]; } } diff --git a/tests/unit/Rules/VideoUrlTest.php b/tests/unit/Rules/VideoUrlTest.php index 78510aca..3d627bf5 100644 --- a/tests/unit/Rules/VideoUrlTest.php +++ b/tests/unit/Rules/VideoUrlTest.php @@ -29,35 +29,35 @@ class VideoUrlTest extends \PHPUnit_Framework_TestCase public function validVideoUrlProvider() { - return array( - array('vimeo', 'https://player.vimeo.com/video/71787467'), - array('vimeo', 'https://vimeo.com/71787467'), - array('youtube', 'https://www.youtube.com/embed/netHLn9TScY'), - array('youtube', 'https://www.youtube.com/watch?v=netHLn9TScY'), - array('youtube', 'https://youtu.be/netHLn9TScY'), - array(null, 'https://player.vimeo.com/video/71787467'), - array(null, 'https://vimeo.com/71787467'), - array(null, 'https://www.youtube.com/embed/netHLn9TScY'), - array(null, 'https://www.youtube.com/watch?v=netHLn9TScY'), - array(null, 'https://youtu.be/netHLn9TScY'), - ); + return [ + ['vimeo', 'https://player.vimeo.com/video/71787467'], + ['vimeo', 'https://vimeo.com/71787467'], + ['youtube', 'https://www.youtube.com/embed/netHLn9TScY'], + ['youtube', 'https://www.youtube.com/watch?v=netHLn9TScY'], + ['youtube', 'https://youtu.be/netHLn9TScY'], + [null, 'https://player.vimeo.com/video/71787467'], + [null, 'https://vimeo.com/71787467'], + [null, 'https://www.youtube.com/embed/netHLn9TScY'], + [null, 'https://www.youtube.com/watch?v=netHLn9TScY'], + [null, 'https://youtu.be/netHLn9TScY'], + ]; } public function invalidVideoUrlProvider() { - return array( - array('vimeo', 'https://www.youtube.com/watch?v=netHLn9TScY'), - array('youtube', 'https://vimeo.com/71787467'), - array(null, 'example.com'), - array(null, 'ftp://youtu.be/netHLn9TScY'), - array(null, 'https:/example.com/'), - array(null, 'https:/youtube.com/'), - array(null, 'https://vimeo'), - array(null, 'https://vimeo.com71787467'), - array(null, 'https://www.google.com'), - array(null, 'tel:+1-816-555-1212'), - array(null, 'text'), - ); + return [ + ['vimeo', 'https://www.youtube.com/watch?v=netHLn9TScY'], + ['youtube', 'https://vimeo.com/71787467'], + [null, 'example.com'], + [null, 'ftp://youtu.be/netHLn9TScY'], + [null, 'https:/example.com/'], + [null, 'https:/youtube.com/'], + [null, 'https://vimeo'], + [null, 'https://vimeo.com71787467'], + [null, 'https://www.google.com'], + [null, 'tel:+1-816-555-1212'], + [null, 'text'], + ]; } /** diff --git a/tests/unit/Rules/VowelTest.php b/tests/unit/Rules/VowelTest.php index 00e23b79..3dea2190 100644 --- a/tests/unit/Rules/VowelTest.php +++ b/tests/unit/Rules/VowelTest.php @@ -58,47 +58,47 @@ class VowelTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){}', '!@#$%^&*(){} aeo iu'), - array('[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n aeo iu"), - ); + return [ + ['!@#$%^&*(){}', '!@#$%^&*(){} aeo iu'], + ['[]?+=/\\-_|"\',<>.', "[]?+=/\\-_|\"',<>. \t \n aeo iu"], + ]; } public function providerForInvalidParams() { - return array( - array(new \stdClass()), - array(array()), - array(0x2), - ); + return [ + [new \stdClass()], + [[]], + [0x2], + ]; } public function providerForValidVowels() { - return array( - array('a'), - array('e'), - array('i'), - array('o'), - array('u'), - array('aeiou'), - array('aei ou'), - array("\na\t"), - array('uoiea'), - ); + return [ + ['a'], + ['e'], + ['i'], + ['o'], + ['u'], + ['aeiou'], + ['aei ou'], + ["\na\t"], + ['uoiea'], + ]; } public function providerForInvalidVowels() { - return array( - array(''), - array(null), - array('16'), - array('F'), - array('g'), - array('Foo'), - array(-50), - array('basic'), - ); + return [ + [''], + [null], + ['16'], + ['F'], + ['g'], + ['Foo'], + [-50], + ['basic'], + ]; } } diff --git a/tests/unit/Rules/WhenTest.php b/tests/unit/Rules/WhenTest.php index ea495610..39846c91 100644 --- a/tests/unit/Rules/WhenTest.php +++ b/tests/unit/Rules/WhenTest.php @@ -39,37 +39,37 @@ class WhenTest extends RuleTestCase */ public function providerForValidInput() { - return array( - 'int (all true)' => array( + return [ + 'int (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), 42, - ), - 'bool (all true)' => array( + ], + 'bool (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), true, - ), - 'empty (all true)' => array( + ], + 'empty (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), '', - ), - 'object (all true)' => array( + ], + 'object (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), new \stdClass(), - ), - 'empty array (all true)' => array( + ], + 'empty array (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), - array(), - ), - 'not empty array (all true)' => array( + [], + ], + 'not empty array (all true)' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock()), - array('test'), - ), - 'when = true, then = false, else = true' => array( + ['test'], + ], + 'when = true, then = false, else = true' => [ new When($this->getRuleMock(), $this->getRuleMock(), $this->getRuleMock(false)), false, - ), + ], - ); + ]; } /** @@ -77,19 +77,19 @@ class WhenTest extends RuleTestCase */ public function providerForInvalidInput() { - return array( - 'when = true, then = false, else = false' => array( + return [ + 'when = true, then = false, else = false' => [ new When($this->getRuleMock(), $this->getRuleMock(false), $this->getRuleMock(false)), false, - ), - 'when = true, then = false, else = true' => array( + ], + 'when = true, then = false, else = true' => [ new When($this->getRuleMock(), $this->getRuleMock(false), $this->getRuleMock()), false, - ), - 'when = false, then = false, else = false' => array( + ], + 'when = false, then = false, else = false' => [ new When($this->getRuleMock(false), $this->getRuleMock(false), $this->getRuleMock(false)), false, - ), - ); + ], + ]; } } diff --git a/tests/unit/Rules/WritableTest.php b/tests/unit/Rules/WritableTest.php index 76b46805..f87fe80f 100644 --- a/tests/unit/Rules/WritableTest.php +++ b/tests/unit/Rules/WritableTest.php @@ -61,7 +61,7 @@ class WritableTest extends \PHPUnit_Framework_TestCase public function testShouldValidateObjects() { $rule = new Writable(); - $object = $this->getMock('SplFileInfo', array('isWritable'), array('somefile.txt')); + $object = $this->getMock('SplFileInfo', ['isWritable'], ['somefile.txt']); $object->expects($this->once()) ->method('isWritable') ->will($this->returnValue(true)); diff --git a/tests/unit/Rules/XdigitTest.php b/tests/unit/Rules/XdigitTest.php index 70a48a21..1d4d8165 100644 --- a/tests/unit/Rules/XdigitTest.php +++ b/tests/unit/Rules/XdigitTest.php @@ -56,32 +56,32 @@ class XdigitTest extends \PHPUnit_Framework_TestCase public function providerAdditionalChars() { - return array( - array('!@#$%^&*(){} ', '!@#$%^&*(){} abc 123'), - array("[]?+=/\\-_|\"',<>. \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"), - ); + return [ + ['!@#$%^&*(){} ', '!@#$%^&*(){} abc 123'], + ["[]?+=/\\-_|\"',<>. \t\n", "[]?+=/\\-_|\"',<>. \t \n abc 123"], + ]; } public function providerForXdigit() { - return array( - array('FFF'), - array('15'), - array('DE12FA'), - array('1234567890abcdef'), - array(0x123), - ); + return [ + ['FFF'], + ['15'], + ['DE12FA'], + ['1234567890abcdef'], + [0x123], + ]; } public function providerForNotXdigit() { - return array( - array(''), - array(null), - array('j'), - array(' '), - array('Foo'), - array('1.5'), - ); + return [ + [''], + [null], + ['j'], + [' '], + ['Foo'], + ['1.5'], + ]; } } diff --git a/tests/unit/Rules/YesTest.php b/tests/unit/Rules/YesTest.php index 796f9e0b..f0b631c4 100644 --- a/tests/unit/Rules/YesTest.php +++ b/tests/unit/Rules/YesTest.php @@ -56,13 +56,13 @@ class YesTest extends \PHPUnit_Framework_TestCase public function validYesProvider() { - return array( - array('Y'), - array('Yea'), - array('Yeah'), - array('Yep'), - array('Yes'), - ); + return [ + ['Y'], + ['Yea'], + ['Yeah'], + ['Yep'], + ['Yes'], + ]; } /** @@ -77,12 +77,12 @@ class YesTest extends \PHPUnit_Framework_TestCase public function invalidYesProvider() { - return array( - array('Si'), - array('Sim'), - array('Yoo'), - array('Young'), - array('Yy'), - ); + return [ + ['Si'], + ['Sim'], + ['Yoo'], + ['Young'], + ['Yy'], + ]; } } diff --git a/tests/unit/Rules/ZendTest.php b/tests/unit/Rules/ZendTest.php index ebf7abbb..1a876c23 100644 --- a/tests/unit/Rules/ZendTest.php +++ b/tests/unit/Rules/ZendTest.php @@ -84,7 +84,7 @@ class ZendTest extends \PHPUnit_Framework_TestCase public function testConstructorWithValidatorName_and_params() { $zendValidatorName = 'StringLength'; - $zendValidatorParams = array('min' => 10, 'max' => 25); + $zendValidatorParams = ['min' => 10, 'max' => 25]; $v = new Zend($zendValidatorName, $zendValidatorParams); $this->assertTrue( $v->validate('12345678901'), @@ -129,7 +129,7 @@ class ZendTest extends \PHPUnit_Framework_TestCase */ public function testParamsNot() { - $v = new Zend('StringLength', array('min' => 10, 'max' => 25)); + $v = new Zend('StringLength', ['min' => 10, 'max' => 25]); $this->assertFalse($v->assert('aw')); } }