respect-validation/library/Rules
Ayesh Karunaratne 746c755d14
Use json_validate in Rules\Json if available (#1394)
[`json_validate` function](https://wiki.php.net/rfc/json_validate)
[added in PHP 8.3](https://php.watch/versions/8.3/json_validate) validates a
given string input to contain valid JSON without decoding it in memory.

This adds a function availability check to `Rules\Json`, and uses the new
function instead of decoding the given input, followed by a last-error check.
2023-02-13 04:43:32 +00:00
..
AbstractAge.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
AbstractComparison.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
AbstractComposite.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
AbstractEnvelope.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
AbstractFilterRule.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
AbstractRelated.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
AbstractRule.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
AbstractSearcher.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
AbstractWrapper.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
AllOf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Alnum.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Alpha.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
AlwaysInvalid.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
AlwaysValid.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
AnyOf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
ArrayType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
ArrayVal.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Attribute.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Base.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Base64.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Between.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
BoolType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
BoolVal.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Bsn.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Call.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
CallableType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Callback.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Charset.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
Cnh.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Cnpj.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Consonant.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Contains.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
ContainsAny.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Control.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Countable.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
CountryCode.php Revert "Use "sokil/php-isocodes" on CountryCode" 2021-03-19 15:12:44 +01:00
Cpf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
CreditCard.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
CurrencyCode.php Revert "Use "sokil/php-isocodes" on CurrencyCode" 2021-03-19 15:12:44 +01:00
Date.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
DateTime.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Decimal.php Create "Decimal" rule 2020-10-04 14:09:34 +02:00
Digit.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Directory.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Domain.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Each.php Report all errors when asserting with "Each" rule 2020-05-18 21:18:13 +02:00
Email.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
EndsWith.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
Equals.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Equivalent.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Even.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Executable.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Exists.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Extension.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Factor.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
FalseVal.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Fibonacci.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
File.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
FilterVar.php Only define filter_var options when it is valid 2020-10-04 11:13:18 +02:00
Finite.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
FloatType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
FloatVal.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Graph.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
GreaterThan.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
HexRgbColor.php Make "HexRgbColor" rule case-insensitive 2020-10-04 12:12:10 +02:00
Iban.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Identical.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Image.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Imei.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
In.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
Infinite.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Instance.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
IntType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
IntVal.php Fix E_DEPRECATED warning in IntVal rule on PHP 8.1 (#1374) 2022-01-19 12:38:23 +02:00
Ip.php Fix check whether start and end address have been set in Ip rule (#1375) 2022-01-19 12:36:13 +02:00
Isbn.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
IterableType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Json.php Use json_validate in Rules\Json if available (#1394) 2023-02-13 04:43:32 +00:00
Key.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
KeyNested.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
KeySet.php fix phpdoc type for KeySet constructor (#1365) 2022-01-19 12:40:08 +02:00
KeyValue.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
LanguageCode.php Revert "Use "sokil/php-isocodes" on LanguageCode" 2021-03-19 15:12:44 +01:00
LeapDate.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
LeapYear.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Length.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
LessThan.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Lowercase.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
Luhn.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
MacAddress.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Max.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
MaxAge.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Mimetype.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Min.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
MinAge.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Multiple.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Negative.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
NfeAccessKey.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
Nif.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
Nip.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
No.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
NoneOf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Not.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
NotBlank.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
NotEmoji.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
NotEmpty.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
NotOptional.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
NoWhitespace.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Nullable.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
NullType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Number.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
NumericVal.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
ObjectType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Odd.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
OneOf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Optional.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
PerfectSquare.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Pesel.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
Phone.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
PhpLabel.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Pis.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00
PolishIdCard.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Positive.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
PostalCode.php Allow optional space for greek postal codes 2020-08-31 22:54:04 -03:00
PrimeNumber.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
Printable.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Punct.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Readable.php Allow file-related rules to validate PSR-7 interfaces 2020-10-04 12:03:22 +02:00
Regex.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
ResourceType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Roman.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
ScalarVal.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Sf.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Size.php Allow file-related rules to validate PSR-7 interfaces 2020-10-04 12:03:22 +02:00
Slug.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Sorted.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Space.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
StartsWith.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
StringType.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
StringVal.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
SubdivisionCode.php Revert "Use "sokil/php-isocodes" on SubdivisionCode" 2021-03-19 15:12:45 +01:00
Subset.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
SymbolicLink.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Time.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Tld.php Update list of top-level domains 2021-03-14 00:30:48 +00:00
TrueVal.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Type.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Unique.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Uploaded.php Allow file-related rules to validate PSR-7 interfaces 2020-10-04 12:03:22 +02:00
Uppercase.php Call mbstring functions without getting encoding 2021-02-06 17:42:11 +01:00
Url.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Uuid.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Version.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
VideoUrl.php Update version of "respect/coding-standard" 2020-08-27 16:21:02 +02:00
Vowel.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
When.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Writable.php Allow file-related rules to validate PSR-7 interfaces 2020-10-04 12:03:22 +02:00
Xdigit.php Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
Yes.php Update version of "respect/coding-standard" 2020-07-21 22:54:41 +02:00
Zend.php Update version of PHPStan packages 2020-07-25 22:50:59 +02:00