summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorChih-Hsuan Yen <[email protected]>2022-07-03 14:47:43 +0800
committerAndrew Dolgov <[email protected]>2022-07-12 22:23:30 +0300
commitd9861038bcc3cb2f38c7153bdca7d5ab89597afa (patch)
tree7b7b28f75714a24856106edce8dfdc0ec989057a /vendor
parentf8fe5e02f18ce3d61544865cc8eb22df18be6bf1 (diff)
Update beberlei/assert for PHP 8 compatibility
Run `composer update beberlei/assert` using composer 2.3.8 on PHP 8.1.7 Updating other packages without updating this fails with: ``` Your requirements could not be resolved to an installable set of packages. Problem 1 - beberlei/assert v3.2.2 requires php ^7 -> your php version (8.1.7) does not satisfy that requirement. - spomky-labs/otphp v10.0.1 requires beberlei/assert ^3.0 -> satisfiable by beberlei/assert[v3.2.2]. - spomky-labs/otphp is locked to version v10.0.1 and an update of this package was not requested. ```
Diffstat (limited to 'vendor')
-rw-r--r--vendor/autoload.php5
-rw-r--r--vendor/beberlei/assert/.github/workflows/ci.yml64
-rw-r--r--vendor/beberlei/assert/composer.json14
-rw-r--r--vendor/beberlei/assert/lib/Assert/Assert.php36
-rw-r--r--vendor/beberlei/assert/lib/Assert/Assertion.php1173
-rw-r--r--vendor/beberlei/assert/lib/Assert/AssertionChain.php71
-rw-r--r--vendor/beberlei/assert/lib/Assert/AssertionFailedException.php8
-rw-r--r--vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php19
-rw-r--r--vendor/beberlei/assert/lib/Assert/LazyAssertion.php210
-rw-r--r--vendor/beberlei/assert/lib/Assert/LazyAssertionException.php9
-rw-r--r--vendor/beberlei/assert/lib/Assert/functions.php32
-rw-r--r--vendor/beberlei/assert/phpstan-code.neon3
-rw-r--r--vendor/beberlei/assert/phpstan-tests.neon10
-rwxr-xr-x[l---------]vendor/bin/php-parse121
-rwxr-xr-x[l---------]vendor/bin/phpstan121
-rwxr-xr-x[l---------]vendor/bin/phpstan.phar121
-rwxr-xr-x[l---------]vendor/bin/phpunit124
-rw-r--r--vendor/composer/ClassLoader.php2
-rw-r--r--vendor/composer/InstalledVersions.php16
-rw-r--r--vendor/composer/autoload_classmap.php2
-rw-r--r--vendor/composer/autoload_files.php8
-rw-r--r--vendor/composer/autoload_namespaces.php2
-rw-r--r--vendor/composer/autoload_psr4.php4
-rw-r--r--vendor/composer/autoload_real.php40
-rw-r--r--vendor/composer/autoload_static.php10
-rw-r--r--vendor/composer/installed.json38
-rw-r--r--vendor/composer/installed.php96
-rwxr-xr-x[-rw-r--r--]vendor/nikic/php-parser/bin/php-parse0
-rwxr-xr-x[-rw-r--r--]vendor/phpstan/phpstan/phpstan0
-rwxr-xr-x[-rw-r--r--]vendor/phpstan/phpstan/phpstan.pharbin19215905 -> 19215905 bytes
-rwxr-xr-x[-rw-r--r--]vendor/phpunit/phpunit/phpunit0
31 files changed, 1532 insertions, 827 deletions
diff --git a/vendor/autoload.php b/vendor/autoload.php
index e6e3ad736..df8e3fc4e 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -2,6 +2,11 @@
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ exit(1);
+}
+
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056::getLoader();
diff --git a/vendor/beberlei/assert/.github/workflows/ci.yml b/vendor/beberlei/assert/.github/workflows/ci.yml
new file mode 100644
index 000000000..7003ff495
--- /dev/null
+++ b/vendor/beberlei/assert/.github/workflows/ci.yml
@@ -0,0 +1,64 @@
+on: [push, pull_request]
+name: CI
+jobs:
+ tests:
+ name: Tests
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ tools: "cs2pr"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v1"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Composer"
+ run: "composer update --prefer-stable"
+
+ - name: "PHPUnit"
+ run: "php vendor/bin/phpunit"
+
+# lint:
+# name: Lint
+# runs-on: ubuntu-latest
+
+# steps:
+# - name: Checkout
+# uses: actions/checkout@v1
+
+# - name: Setup PHP
+# uses: shivammathur/setup-php@v2
+# with:
+# php-version: 7.4
+
+# - name: "Cache dependencies installed with composer"
+# uses: "actions/cache@v1"
+# with:
+# path: "~/.composer/cache"
+# key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+# restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+# - name: "Composer"
+# run: "composer update --prefer-stable"
+
+# - name: "assert:cs-lint"
+# run: "composer assert:cs-lint"
+
+# - name: "assert:sa-code"
+# run: "composer assert:sa-code"
+
+# - name: "assert:sa-tests"
+# run: "composer assert:sa-tests"
diff --git a/vendor/beberlei/assert/composer.json b/vendor/beberlei/assert/composer.json
index 3dd5e7451..1485a0084 100644
--- a/vendor/beberlei/assert/composer.json
+++ b/vendor/beberlei/assert/composer.json
@@ -23,12 +23,17 @@
"sort-packages": true
},
"require": {
- "php": "^7"
+ "php": "^7.0 || ^8.0",
+ "ext-simplexml": "*",
+ "ext-mbstring": "*",
+ "ext-ctype": "*",
+ "ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
- "phpstan/phpstan-shim": "*",
- "phpunit/phpunit": ">=6.0.0 <8"
+ "phpstan/phpstan": "*",
+ "phpunit/phpunit": ">=6.0.0",
+ "yoast/phpunit-polyfills": "^0.1.0"
},
"autoload": {
"psr-4": {
@@ -52,5 +57,8 @@
"assert:cs-fix": "php-cs-fixer fix . -vvv || true",
"assert:sa-code": "vendor/bin/phpstan analyse --configuration=phpstan-code.neon --no-progress --ansi -l 7 bin lib",
"assert:sa-tests": "vendor/bin/phpstan analyse --configuration=phpstan-tests.neon --no-progress --ansi -l 7 tests"
+ },
+ "suggest": {
+ "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles"
}
}
diff --git a/vendor/beberlei/assert/lib/Assert/Assert.php b/vendor/beberlei/assert/lib/Assert/Assert.php
index 39bd9d64d..3614b3455 100644
--- a/vendor/beberlei/assert/lib/Assert/Assert.php
+++ b/vendor/beberlei/assert/lib/Assert/Assert.php
@@ -31,6 +31,9 @@ abstract class Assert
* The invocation of this method starts an assertion chain
* that is happening on the passed value.
*
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
+ *
* @example
*
* Assert::that($value)->notEmpty()->integer();
@@ -38,14 +41,8 @@ abstract class Assert
*
* The assertion chain can be stateful, that means be careful when you reuse
* it. You should never pass around the chain.
- *
- * @param mixed $value
- * @param string $defaultMessage
- * @param string $defaultPropertyPath
- *
- * @return \Assert\AssertionChain
*/
- public static function that($value, $defaultMessage = null, $defaultPropertyPath = null)
+ public static function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
$assertionChain = new AssertionChain($value, $defaultMessage, $defaultPropertyPath);
@@ -55,13 +52,10 @@ abstract class Assert
/**
* Start validation on a set of values, returns {@link AssertionChain}.
*
- * @param mixed $values
- * @param string $defaultMessage
- * @param string $defaultPropertyPath
- *
- * @return \Assert\AssertionChain
+ * @param mixed $values
+ * @param string|callable|null $defaultMessage
*/
- public static function thatAll($values, $defaultMessage = null, $defaultPropertyPath = null)
+ public static function thatAll($values, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return static::that($values, $defaultMessage, $defaultPropertyPath)->all();
}
@@ -69,29 +63,23 @@ abstract class Assert
/**
* Start validation and allow NULL, returns {@link AssertionChain}.
*
- * @param mixed $value
- * @param string $defaultMessage
- * @param string $defaultPropertyPath
- *
- * @return \Assert\AssertionChain
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
*/
- public static function thatNullOr($value, $defaultMessage = null, $defaultPropertyPath = null)
+ public static function thatNullOr($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return static::that($value, $defaultMessage, $defaultPropertyPath)->nullOr();
}
/**
* Create a lazy assertion object.
- *
- * @return \Assert\LazyAssertion
*/
- public static function lazy()
+ public static function lazy(): LazyAssertion
{
$lazyAssertion = new LazyAssertion();
return $lazyAssertion
->setAssertClass(\get_called_class())
- ->setExceptionClass(static::$lazyAssertionExceptionClass)
- ;
+ ->setExceptionClass(static::$lazyAssertionExceptionClass);
}
}
diff --git a/vendor/beberlei/assert/lib/Assert/Assertion.php b/vendor/beberlei/assert/lib/Assert/Assertion.php
index 0b06b065c..243e64d28 100644
--- a/vendor/beberlei/assert/lib/Assert/Assertion.php
+++ b/vendor/beberlei/assert/lib/Assert/Assertion.php
@@ -14,112 +14,122 @@
namespace Assert;
+use ArrayAccess;
use BadMethodCallException;
+use Countable;
+use DateTime;
+use ReflectionClass;
+use ReflectionException;
+use ResourceBundle;
+use SimpleXMLElement;
+use Throwable;
+use Traversable;
/**
* Assert library.
*
* @author Benjamin Eberlei <[email protected]>
*
- * @method static bool allAlnum(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric for all values.
- * @method static bool allBase64(string $value, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values.
- * @method static bool allBetween(mixed $value, mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit for all values.
- * @method static bool allBetweenExclusive(mixed $value, mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit for all values.
- * @method static bool allBetweenLength(mixed $value, int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths for all values.
- * @method static bool allBoolean(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is php boolean for all values.
- * @method static bool allChoice(mixed $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices for all values.
- * @method static bool allChoicesNotEmpty(array $values, array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content for all values.
- * @method static bool allClassExists(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the class exists for all values.
- * @method static bool allContains(mixed $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars for all values.
- * @method static bool allCount(array|\Countable|\ResourceBundle|\SimpleXMLElement $countable, int $count, string $message = null, string $propertyPath = null) Assert that the count of countable is equal to count for all values.
- * @method static bool allDate(string $value, string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format for all values.
- * @method static bool allDefined(mixed $constant, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values.
- * @method static bool allDigit(mixed $value, string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit for all values.
- * @method static bool allDirectory(string $value, string|callable $message = null, string $propertyPath = null) Assert that a directory exists for all values.
- * @method static bool allE164(string $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number for all values.
- * @method static bool allEmail(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL) for all values.
- * @method static bool allEndsWith(mixed $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars for all values.
- * @method static bool allEq(mixed $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==) for all values.
- * @method static bool allEqArraySubset(mixed $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset for all values.
- * @method static bool allExtensionLoaded(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded for all values.
- * @method static bool allExtensionVersion(string $extension, string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed for all values.
- * @method static bool allFalse(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False for all values.
- * @method static bool allFile(string $value, string|callable $message = null, string $propertyPath = null) Assert that a file exists for all values.
- * @method static bool allFloat(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php float for all values.
- * @method static bool allGreaterOrEqualThan(mixed $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit for all values.
- * @method static bool allGreaterThan(mixed $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit for all values.
- * @method static bool allImplementsInterface(mixed $class, string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface for all values.
- * @method static bool allInArray(mixed $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice() for all values.
- * @method static bool allInteger(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer for all values.
- * @method static bool allIntegerish(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish for all values.
- * @method static bool allInterfaceExists(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the interface exists for all values.
- * @method static bool allIp(string $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address for all values.
- * @method static bool allIpv4(string $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address for all values.
- * @method static bool allIpv6(string $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address for all values.
- * @method static bool allIsArray(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array for all values.
- * @method static bool allIsArrayAccessible(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object for all values.
- * @method static bool allIsCallable(mixed $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable for all values.
- * @method static bool allIsCountable(array|\Countable|\ResourceBundle|\SimpleXMLElement $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable for all values.
- * @method static bool allIsInstanceOf(mixed $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name for all values.
- * @method static bool allIsJsonString(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string for all values.
- * @method static bool allIsObject(mixed $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object for all values.
- * @method static bool allIsResource(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a resource for all values.
- * @method static bool allIsTraversable(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object for all values.
- * @method static bool allKeyExists(mixed $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array for all values.
- * @method static bool allKeyIsset(mixed $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset() for all values.
- * @method static bool allKeyNotExists(mixed $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array for all values.
- * @method static bool allLength(mixed $value, int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length for all values.
- * @method static bool allLessOrEqualThan(mixed $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit for all values.
- * @method static bool allLessThan(mixed $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit for all values.
- * @method static bool allMax(mixed $value, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit for all values.
- * @method static bool allMaxCount(array|\Countable|\ResourceBundle|\SimpleXMLElement $countable, int $count, string $message = null, string $propertyPath = null) Assert that the countable have at most $count elements for all values.
- * @method static bool allMaxLength(mixed $value, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars for all values.
- * @method static bool allMethodExists(string $value, mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object for all values.
- * @method static bool allMin(mixed $value, mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit for all values.
- * @method static bool allMinCount(array|\Countable|\ResourceBundle|\SimpleXMLElement $countable, int $count, string $message = null, string $propertyPath = null) Assert that the countable have at least $count elements for all values.
- * @method static bool allMinLength(mixed $value, int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long for all values.
- * @method static bool allNoContent(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty for all values.
- * @method static bool allNotBlank(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is not blank for all values.
- * @method static bool allNotContains(mixed $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars for all values.
- * @method static bool allNotEmpty(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is not empty for all values.
- * @method static bool allNotEmptyKey(mixed $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty for all values.
- * @method static bool allNotEq(mixed $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using == ) for all values.
- * @method static bool allNotInArray(mixed $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices for all values.
- * @method static bool allNotIsInstanceOf(mixed $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name for all values.
- * @method static bool allNotNull(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is not null for all values.
- * @method static bool allNotRegex(mixed $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex for all values.
- * @method static bool allNotSame(mixed $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using === ) for all values.
- * @method static bool allNull(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is null for all values.
- * @method static bool allNumeric(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is numeric for all values.
- * @method static bool allObjectOrClass(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists for all values.
- * @method static bool allPhpVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version for all values.
- * @method static bool allPropertiesExist(mixed $value, array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist for all values.
- * @method static bool allPropertyExists(mixed $value, string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists for all values.
- * @method static bool allRange(mixed $value, mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers for all values.
- * @method static bool allReadable(string $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something readable for all values.
- * @method static bool allRegex(mixed $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex for all values.
- * @method static bool allSame(mixed $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===) for all values.
- * @method static bool allSatisfy(mixed $value, callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback for all values.
- * @method static bool allScalar(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar for all values.
- * @method static bool allStartsWith(mixed $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars for all values.
- * @method static bool allString(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is a string for all values.
- * @method static bool allSubclassOf(mixed $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name for all values.
- * @method static bool allTrue(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True for all values.
- * @method static bool allUrl(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is an URL for all values.
- * @method static bool allUuid(string $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID for all values.
- * @method static bool allVersion(string $version1, string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions for all values.
- * @method static bool allWriteable(string $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable for all values.
+ * @method static bool allAlnum(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric for all values.
+ * @method static bool allBase64(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values.
+ * @method static bool allBetween(mixed[] $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit for all values.
+ * @method static bool allBetweenExclusive(mixed[] $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit for all values.
+ * @method static bool allBetweenLength(mixed[] $value, int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths for all values.
+ * @method static bool allBoolean(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is php boolean for all values.
+ * @method static bool allChoice(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices for all values.
+ * @method static bool allChoicesNotEmpty(array[] $values, array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content for all values.
+ * @method static bool allClassExists(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the class exists for all values.
+ * @method static bool allContains(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars for all values.
+ * @method static bool allCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count for all values.
+ * @method static bool allDate(string[] $value, string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format for all values.
+ * @method static bool allDefined(mixed[] $constant, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined for all values.
+ * @method static bool allDigit(mixed[] $value, string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit for all values.
+ * @method static bool allDirectory(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a directory exists for all values.
+ * @method static bool allE164(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number for all values.
+ * @method static bool allEmail(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL) for all values.
+ * @method static bool allEndsWith(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars for all values.
+ * @method static bool allEq(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==) for all values.
+ * @method static bool allEqArraySubset(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset for all values.
+ * @method static bool allExtensionLoaded(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded for all values.
+ * @method static bool allExtensionVersion(string[] $extension, string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed for all values.
+ * @method static bool allFalse(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False for all values.
+ * @method static bool allFile(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that a file exists for all values.
+ * @method static bool allFloat(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php float for all values.
+ * @method static bool allGreaterOrEqualThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit for all values.
+ * @method static bool allGreaterThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit for all values.
+ * @method static bool allImplementsInterface(mixed[] $class, string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface for all values.
+ * @method static bool allInArray(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice() for all values.
+ * @method static bool allInteger(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer for all values.
+ * @method static bool allIntegerish(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish for all values.
+ * @method static bool allInterfaceExists(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the interface exists for all values.
+ * @method static bool allIp(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address for all values.
+ * @method static bool allIpv4(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address for all values.
+ * @method static bool allIpv6(string[] $value, int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address for all values.
+ * @method static bool allIsArray(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array for all values.
+ * @method static bool allIsArrayAccessible(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object for all values.
+ * @method static bool allIsCallable(mixed[] $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable for all values.
+ * @method static bool allIsCountable(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable for all values.
+ * @method static bool allIsInstanceOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name for all values.
+ * @method static bool allIsJsonString(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string for all values.
+ * @method static bool allIsObject(mixed[] $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object for all values.
+ * @method static bool allIsResource(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a resource for all values.
+ * @method static bool allIsTraversable(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object for all values.
+ * @method static bool allKeyExists(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array for all values.
+ * @method static bool allKeyIsset(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset() for all values.
+ * @method static bool allKeyNotExists(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array for all values.
+ * @method static bool allLength(mixed[] $value, int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length for all values.
+ * @method static bool allLessOrEqualThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit for all values.
+ * @method static bool allLessThan(mixed[] $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit for all values.
+ * @method static bool allMax(mixed[] $value, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit for all values.
+ * @method static bool allMaxCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements for all values.
+ * @method static bool allMaxLength(mixed[] $value, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars for all values.
+ * @method static bool allMethodExists(string[] $value, mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object for all values.
+ * @method static bool allMin(mixed[] $value, mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit for all values.
+ * @method static bool allMinCount(array[]|Countable[]|ResourceBundle[]|SimpleXMLElement[] $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements for all values.
+ * @method static bool allMinLength(mixed[] $value, int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long for all values.
+ * @method static bool allNoContent(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty for all values.
+ * @method static bool allNotBlank(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not blank for all values.
+ * @method static bool allNotContains(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars for all values.
+ * @method static bool allNotEmpty(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not empty for all values.
+ * @method static bool allNotEmptyKey(mixed[] $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty for all values.
+ * @method static bool allNotEq(mixed[] $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==) for all values.
+ * @method static bool allNotInArray(mixed[] $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices for all values.
+ * @method static bool allNotIsInstanceOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name for all values.
+ * @method static bool allNotNull(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is not null for all values.
+ * @method static bool allNotRegex(mixed[] $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex for all values.
+ * @method static bool allNotSame(mixed[] $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===) for all values.
+ * @method static bool allNull(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is null for all values.
+ * @method static bool allNumeric(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is numeric for all values.
+ * @method static bool allObjectOrClass(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists for all values.
+ * @method static bool allPhpVersion(string[] $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version for all values.
+ * @method static bool allPropertiesExist(mixed[] $value, array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist for all values.
+ * @method static bool allPropertyExists(mixed[] $value, string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists for all values.
+ * @method static bool allRange(mixed[] $value, mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers for all values.
+ * @method static bool allReadable(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something readable for all values.
+ * @method static bool allRegex(mixed[] $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex for all values.
+ * @method static bool allSame(mixed[] $value, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===) for all values.
+ * @method static bool allSatisfy(mixed[] $value, callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback for all values.
+ * @method static bool allScalar(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar for all values.
+ * @method static bool allStartsWith(mixed[] $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars for all values.
+ * @method static bool allString(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is a string for all values.
+ * @method static bool allSubclassOf(mixed[] $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name for all values.
+ * @method static bool allTrue(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True for all values.
+ * @method static bool allUniqueValues(array[] $values, string|callable $message = null, string $propertyPath = null) Assert that values in array are unique (using strict equality) for all values.
+ * @method static bool allUrl(mixed[] $value, string|callable $message = null, string $propertyPath = null) Assert that value is an URL for all values.
+ * @method static bool allUuid(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID for all values.
+ * @method static bool allVersion(string[] $version1, string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions for all values.
+ * @method static bool allWriteable(string[] $value, string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable for all values.
* @method static bool nullOrAlnum(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric or that the value is null.
* @method static bool nullOrBase64(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined or that the value is null.
- * @method static bool nullOrBetween(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit or that the value is null.
- * @method static bool nullOrBetweenExclusive(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit or that the value is null.
+ * @method static bool nullOrBetween(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit or that the value is null.
+ * @method static bool nullOrBetweenExclusive(mixed|null $value, mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit or that the value is null.
* @method static bool nullOrBetweenLength(mixed|null $value, int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths or that the value is null.
* @method static bool nullOrBoolean(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is php boolean or that the value is null.
* @method static bool nullOrChoice(mixed|null $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices or that the value is null.
* @method static bool nullOrChoicesNotEmpty(array|null $values, array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content or that the value is null.
* @method static bool nullOrClassExists(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the class exists or that the value is null.
* @method static bool nullOrContains(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars or that the value is null.
- * @method static bool nullOrCount(array|\Countable|\ResourceBundle|\SimpleXMLElement|null $countable, int $count, string $message = null, string $propertyPath = null) Assert that the count of countable is equal to count or that the value is null.
+ * @method static bool nullOrCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count or that the value is null.
* @method static bool nullOrDate(string|null $value, string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format or that the value is null.
* @method static bool nullOrDefined(mixed|null $constant, string|callable $message = null, string $propertyPath = null) Assert that a constant is defined or that the value is null.
* @method static bool nullOrDigit(mixed|null $value, string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit or that the value is null.
@@ -147,7 +157,7 @@ use BadMethodCallException;
* @method static bool nullOrIsArray(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or that the value is null.
* @method static bool nullOrIsArrayAccessible(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object or that the value is null.
* @method static bool nullOrIsCallable(mixed|null $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable or that the value is null.
- * @method static bool nullOrIsCountable(array|\Countable|\ResourceBundle|\SimpleXMLElement|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable or that the value is null.
+ * @method static bool nullOrIsCountable(array|Countable|ResourceBundle|SimpleXMLElement|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is countable or that the value is null.
* @method static bool nullOrIsInstanceOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name or that the value is null.
* @method static bool nullOrIsJsonString(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string or that the value is null.
* @method static bool nullOrIsObject(mixed|null $value, string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object or that the value is null.
@@ -160,23 +170,23 @@ use BadMethodCallException;
* @method static bool nullOrLessOrEqualThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit or that the value is null.
* @method static bool nullOrLessThan(mixed|null $value, mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit or that the value is null.
* @method static bool nullOrMax(mixed|null $value, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit or that the value is null.
- * @method static bool nullOrMaxCount(array|\Countable|\ResourceBundle|\SimpleXMLElement|null $countable, int $count, string $message = null, string $propertyPath = null) Assert that the countable have at most $count elements or that the value is null.
+ * @method static bool nullOrMaxCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements or that the value is null.
* @method static bool nullOrMaxLength(mixed|null $value, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars or that the value is null.
* @method static bool nullOrMethodExists(string|null $value, mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object or that the value is null.
* @method static bool nullOrMin(mixed|null $value, mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit or that the value is null.
- * @method static bool nullOrMinCount(array|\Countable|\ResourceBundle|\SimpleXMLElement|null $countable, int $count, string $message = null, string $propertyPath = null) Assert that the countable have at least $count elements or that the value is null.
+ * @method static bool nullOrMinCount(array|Countable|ResourceBundle|SimpleXMLElement|null $countable, int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements or that the value is null.
* @method static bool nullOrMinLength(mixed|null $value, int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long or that the value is null.
* @method static bool nullOrNoContent(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty or that the value is null.
* @method static bool nullOrNotBlank(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not blank or that the value is null.
* @method static bool nullOrNotContains(mixed|null $string, string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars or that the value is null.
* @method static bool nullOrNotEmpty(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not empty or that the value is null.
* @method static bool nullOrNotEmptyKey(mixed|null $value, string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty or that the value is null.
- * @method static bool nullOrNotEq(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using == ) or that the value is null.
+ * @method static bool nullOrNotEq(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==) or that the value is null.
* @method static bool nullOrNotInArray(mixed|null $value, array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices or that the value is null.
* @method static bool nullOrNotIsInstanceOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name or that the value is null.
* @method static bool nullOrNotNull(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is not null or that the value is null.
* @method static bool nullOrNotRegex(mixed|null $value, string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex or that the value is null.
- * @method static bool nullOrNotSame(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using === ) or that the value is null.
+ * @method static bool nullOrNotSame(mixed|null $value1, mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===) or that the value is null.
* @method static bool nullOrNull(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is null or that the value is null.
* @method static bool nullOrNumeric(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is numeric or that the value is null.
* @method static bool nullOrObjectOrClass(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists or that the value is null.
@@ -193,6 +203,7 @@ use BadMethodCallException;
* @method static bool nullOrString(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is a string or that the value is null.
* @method static bool nullOrSubclassOf(mixed|null $value, string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name or that the value is null.
* @method static bool nullOrTrue(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True or that the value is null.
+ * @method static bool nullOrUniqueValues(array|null $values, string|callable $message = null, string $propertyPath = null) Assert that values in array are unique (using strict equality) or that the value is null.
* @method static bool nullOrUrl(mixed|null $value, string|callable $message = null, string $propertyPath = null) Assert that value is an URL or that the value is null.
* @method static bool nullOrUuid(string|null $value, string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID or that the value is null.
* @method static bool nullOrVersion(string|null $version1, string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions or that the value is null.
@@ -278,6 +289,7 @@ class Assertion
const INVALID_MIN_COUNT = 227;
const INVALID_MAX_COUNT = 228;
const INVALID_STRING_NOT_CONTAINS = 229;
+ const INVALID_UNIQUE_VALUES = 230;
/**
* Exception to throw when an assertion failed.
@@ -289,14 +301,13 @@ class Assertion
/**
* Assert that two values are equal (using ==).
*
- * @param mixed $value
- * @param mixed $value2
+ * @param mixed $value
+ * @param mixed $value2
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function eq($value, $value2, $message = null, $propertyPath = null)
+ public static function eq($value, $value2, $message = null, string $propertyPath = null): bool
{
if ($value != $value2) {
$message = \sprintf(
@@ -314,14 +325,13 @@ class Assertion
/**
* Assert that the array contains the subset.
*
- * @param mixed $value
- * @param mixed $value2
+ * @param mixed $value
+ * @param mixed $value2
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function eqArraySubset($value, $value2, $message = null, $propertyPath = null)
+ public static function eqArraySubset($value, $value2, $message = null, string $propertyPath = null): bool
{
static::isArray($value, $message, $propertyPath);
static::isArray($value2, $message, $propertyPath);
@@ -335,14 +345,20 @@ class Assertion
/**
* Assert that two values are the same (using ===).
*
- * @param mixed $value
- * @param mixed $value2
+ * @param mixed $value
+ * @param mixed $value2
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-template ExpectedType
+ * @psalm-param ExpectedType $value2
+ * @psalm-assert =ExpectedType $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function same($value, $value2, $message = null, $propertyPath = null)
+ public static function same($value, $value2, $message = null, string $propertyPath = null): bool
{
if ($value !== $value2) {
$message = \sprintf(
@@ -358,16 +374,15 @@ class Assertion
}
/**
- * Assert that two values are not equal (using == ).
+ * Assert that two values are not equal (using ==).
*
- * @param mixed $value1
- * @param mixed $value2
+ * @param mixed $value1
+ * @param mixed $value2
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function notEq($value1, $value2, $message = null, $propertyPath = null)
+ public static function notEq($value1, $value2, $message = null, string $propertyPath = null): bool
{
if ($value1 == $value2) {
$message = \sprintf(
@@ -382,16 +397,22 @@ class Assertion
}
/**
- * Assert that two values are not the same (using === ).
+ * Assert that two values are not the same (using ===).
*
- * @param mixed $value1
- * @param mixed $value2
+ * @param mixed $value1
+ * @param mixed $value2
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-template ExpectedType
+ * @psalm-param ExpectedType $value2
+ * @psalm-assert !=ExpectedType $value1
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function notSame($value1, $value2, $message = null, $propertyPath = null)
+ public static function notSame($value1, $value2, $message = null, string $propertyPath = null): bool
{
if ($value1 === $value2) {
$message = \sprintf(
@@ -408,14 +429,12 @@ class Assertion
/**
* Assert that value is not in array of choices.
*
- * @param mixed $value
- * @param array $choices
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function notInArray($value, array $choices, $message = null, $propertyPath = null)
+ public static function notInArray($value, array $choices, $message = null, string $propertyPath = null): bool
{
if (true === \in_array($value, $choices)) {
$message = \sprintf(
@@ -432,13 +451,17 @@ class Assertion
/**
* Assert that value is a php integer.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert int $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function integer($value, $message = null, $propertyPath = null)
+ public static function integer($value, $message = null, string $propertyPath = null): bool
{
if (!\is_int($value)) {
$message = \sprintf(
@@ -455,13 +478,17 @@ class Assertion
/**
* Assert that value is a php float.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert float $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function float($value, $message = null, $propertyPath = null)
+ public static function float($value, $message = null, string $propertyPath = null): bool
{
if (!\is_float($value)) {
$message = \sprintf(
@@ -478,15 +505,19 @@ class Assertion
/**
* Validates if an integer or integerish is a digit.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =numeric $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function digit($value, $message = null, $propertyPath = null)
+ public static function digit($value, $message = null, string $propertyPath = null): bool
{
- if (!\ctype_digit((string) $value)) {
+ if (!\ctype_digit((string)$value)) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" is not a digit.'),
static::stringify($value)
@@ -501,13 +532,12 @@ class Assertion
/**
* Assert that value is a php integer'ish.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function integerish($value, $message = null, $propertyPath = null)
+ public static function integerish($value, $message = null, string $propertyPath = null): bool
{
if (
\is_resource($value) ||
@@ -537,13 +567,17 @@ class Assertion
/**
* Assert that value is php boolean.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert bool $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function boolean($value, $message = null, $propertyPath = null)
+ public static function boolean($value, $message = null, string $propertyPath = null): bool
{
if (!\is_bool($value)) {
$message = \sprintf(
@@ -560,13 +594,17 @@ class Assertion
/**
* Assert that value is a PHP scalar.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert scalar $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function scalar($value, $message = null, $propertyPath = null)
+ public static function scalar($value, $message = null, string $propertyPath = null): bool
{
if (!\is_scalar($value)) {
$message = \sprintf(
@@ -583,13 +621,17 @@ class Assertion
/**
* Assert that value is not empty.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert !empty $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function notEmpty($value, $message = null, $propertyPath = null)
+ public static function notEmpty($value, $message = null, string $propertyPath = null): bool
{
if (empty($value)) {
$message = \sprintf(
@@ -606,13 +648,17 @@ class Assertion
/**
* Assert that value is empty.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert empty $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function noContent($value, $message = null, $propertyPath = null)
+ public static function noContent($value, $message = null, string $propertyPath = null): bool
{
if (!empty($value)) {
$message = \sprintf(
@@ -629,13 +675,15 @@ class Assertion
/**
* Assert that value is null.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert null $value
*
* @return bool
*/
- public static function null($value, $message = null, $propertyPath = null)
+ public static function null($value, $message = null, string $propertyPath = null): bool
{
if (null !== $value) {
$message = \sprintf(
@@ -652,13 +700,17 @@ class Assertion
/**
* Assert that value is not null.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert !null $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function notNull($value, $message = null, $propertyPath = null)
+ public static function notNull($value, $message = null, string $propertyPath = null): bool
{
if (null === $value) {
$message = \sprintf(
@@ -675,13 +727,17 @@ class Assertion
/**
* Assert that value is a string.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function string($value, $message = null, $propertyPath = null)
+ public static function string($value, $message = null, string $propertyPath = null)
{
if (!\is_string($value)) {
$message = \sprintf(
@@ -699,14 +755,18 @@ class Assertion
/**
* Assert that value matches a regex.
*
- * @param mixed $value
- * @param string $pattern
+ * @param mixed $value
+ * @param string $pattern
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function regex($value, $pattern, $message = null, $propertyPath = null)
+ public static function regex($value, $pattern, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -725,16 +785,16 @@ class Assertion
/**
* Assert that value does not match a regex.
*
- * @param mixed $value
- * @param string $pattern
+ * @param mixed $value
+ * @param string $pattern
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
*
- * @return bool
+ * @psalm-assert !=string $value
*
- * @throws \Assert\AssertionFailedException
+ * @throws AssertionFailedException
*/
- public static function notRegex($value, $pattern, $message = null, $propertyPath = null)
+ public static function notRegex($value, $pattern, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -753,15 +813,19 @@ class Assertion
/**
* Assert that string has a given length.
*
- * @param mixed $value
- * @param int $length
+ * @param mixed $value
+ * @param int $length
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function length($value, $length, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function length($value, $length, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($value, $message, $propertyPath);
@@ -782,15 +846,19 @@ class Assertion
/**
* Assert that a string is at least $minLength chars long.
*
- * @param mixed $value
- * @param int $minLength
+ * @param mixed $value
+ * @param int $minLength
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function minLength($value, $minLength, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function minLength($value, $minLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($value, $message, $propertyPath);
@@ -811,15 +879,19 @@ class Assertion
/**
* Assert that string value is not longer than $maxLength chars.
*
- * @param mixed $value
- * @param int $maxLength
+ * @param mixed $value
+ * @param int $maxLength
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function maxLength($value, $maxLength, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function maxLength($value, $maxLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($value, $message, $propertyPath);
@@ -840,16 +912,20 @@ class Assertion
/**
* Assert that string length is between min and max lengths.
*
- * @param mixed $value
- * @param int $minLength
- * @param int $maxLength
+ * @param mixed $value
+ * @param int $minLength
+ * @param int $maxLength
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function betweenLength($value, $minLength, $maxLength, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function betweenLength($value, $minLength, $maxLength, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($value, $message, $propertyPath);
static::minLength($value, $minLength, $message, $propertyPath, $encoding);
@@ -861,19 +937,23 @@ class Assertion
/**
* Assert that string starts with a sequence of chars.
*
- * @param mixed $string
- * @param string $needle
+ * @param mixed $string
+ * @param string $needle
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $string
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function startsWith($string, $needle, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function startsWith($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($string, $message, $propertyPath);
- if (0 !== \mb_strpos($string, $needle, null, $encoding)) {
+ if (0 !== \mb_strpos($string, $needle, 0, $encoding)) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" does not start with "%s".'),
static::stringify($string),
@@ -889,21 +969,25 @@ class Assertion
/**
* Assert that string ends with a sequence of chars.
*
- * @param mixed $string
- * @param string $needle
+ * @param mixed $string
+ * @param string $needle
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $string
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function endsWith($string, $needle, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function endsWith($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($string, $message, $propertyPath);
$stringPosition = \mb_strlen($string, $encoding) - \mb_strlen($needle, $encoding);
- if (\mb_strripos($string, $needle, null, $encoding) !== $stringPosition) {
+ if (\mb_strripos($string, $needle, 0, $encoding) !== $stringPosition) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" does not end with "%s".'),
static::stringify($string),
@@ -919,19 +1003,23 @@ class Assertion
/**
* Assert that string contains a sequence of chars.
*
- * @param mixed $string
- * @param string $needle
+ * @param mixed $string
+ * @param string $needle
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $string
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function contains($string, $needle, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function contains($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($string, $message, $propertyPath);
- if (false === \mb_strpos($string, $needle, null, $encoding)) {
+ if (false === \mb_strpos($string, $needle, 0, $encoding)) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" does not contain "%s".'),
static::stringify($string),
@@ -947,19 +1035,23 @@ class Assertion
/**
* Assert that string does not contains a sequence of chars.
*
- * @param mixed $string
- * @param string $needle
+ * @param mixed $string
+ * @param string $needle
* @param string|callable|null $message
- * @param string|null $propertyPath
- * @param string $encoding
+ * @param string|null $propertyPath
+ * @param string $encoding
+ *
+ * @psalm-assert =string $string
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function notContains($string, $needle, $message = null, $propertyPath = null, $encoding = 'utf8')
+ public static function notContains($string, $needle, $message = null, string $propertyPath = null, $encoding = 'utf8'): bool
{
static::string($string, $message, $propertyPath);
- if (false !== \mb_strpos($string, $needle, null, $encoding)) {
+ if (false !== \mb_strpos($string, $needle, 0, $encoding)) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" contains "%s".'),
static::stringify($string),
@@ -975,14 +1067,12 @@ class Assertion
/**
* Assert that value is in array of choices.
*
- * @param mixed $value
- * @param array $choices
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function choice($value, array $choices, $message = null, $propertyPath = null)
+ public static function choice($value, array $choices, $message = null, string $propertyPath = null): bool
{
if (!\in_array($value, $choices, true)) {
$message = \sprintf(
@@ -1002,14 +1092,12 @@ class Assertion
*
* This is an alias of {@see choice()}.
*
- * @param mixed $value
- * @param array $choices
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function inArray($value, array $choices, $message = null, $propertyPath = null)
+ public static function inArray($value, array $choices, $message = null, string $propertyPath = null): bool
{
return static::choice($value, $choices, $message, $propertyPath);
}
@@ -1017,13 +1105,17 @@ class Assertion
/**
* Assert that value is numeric.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert numeric $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function numeric($value, $message = null, $propertyPath = null)
+ public static function numeric($value, $message = null, string $propertyPath = null): bool
{
if (!\is_numeric($value)) {
$message = \sprintf(
@@ -1040,13 +1132,15 @@ class Assertion
/**
* Assert that value is a resource.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert resource $value
*
* @return bool
*/
- public static function isResource($value, $message = null, $propertyPath = null)
+ public static function isResource($value, $message = null, string $propertyPath = null): bool
{
if (!\is_resource($value)) {
$message = \sprintf(
@@ -1063,13 +1157,17 @@ class Assertion
/**
* Assert that value is an array.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert array $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isArray($value, $message = null, $propertyPath = null)
+ public static function isArray($value, $message = null, string $propertyPath = null): bool
{
if (!\is_array($value)) {
$message = \sprintf(
@@ -1086,15 +1184,19 @@ class Assertion
/**
* Assert that value is an array or a traversable object.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert iterable $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isTraversable($value, $message = null, $propertyPath = null)
+ public static function isTraversable($value, $message = null, string $propertyPath = null): bool
{
- if (!\is_array($value) && !$value instanceof \Traversable) {
+ if (!\is_array($value) && !$value instanceof Traversable) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" is not an array and does not implement Traversable.'),
static::stringify($value)
@@ -1109,15 +1211,14 @@ class Assertion
/**
* Assert that value is an array or an array-accessible object.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function isArrayAccessible($value, $message = null, $propertyPath = null)
+ public static function isArrayAccessible($value, $message = null, string $propertyPath = null): bool
{
- if (!\is_array($value) && !$value instanceof \ArrayAccess) {
+ if (!\is_array($value) && !$value instanceof ArrayAccess) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" is not an array and does not implement ArrayAccess.'),
static::stringify($value)
@@ -1132,18 +1233,22 @@ class Assertion
/**
* Assert that value is countable.
*
- * @param array|\Countable|\ResourceBundle|\SimpleXMLElement $value
- * @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param array|Countable|ResourceBundle|SimpleXMLElement $value
+ * @param string|callable|null $message
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert countable $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isCountable($value, $message = null, $propertyPath = null)
+ public static function isCountable($value, $message = null, string $propertyPath = null): bool
{
if (\function_exists('is_countable')) {
$assert = \is_countable($value);
} else {
- $assert = \is_array($value) || $value instanceof \Countable || $value instanceof \ResourceBundle || $value instanceof \SimpleXMLElement;
+ $assert = \is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXMLElement;
}
if (!$assert) {
@@ -1161,14 +1266,13 @@ class Assertion
/**
* Assert that key exists in an array.
*
- * @param mixed $value
- * @param string|int $key
+ * @param mixed $value
+ * @param string|int $key
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function keyExists($value, $key, $message = null, $propertyPath = null)
+ public static function keyExists($value, $key, $message = null, string $propertyPath = null): bool
{
static::isArray($value, $message, $propertyPath);
@@ -1187,14 +1291,13 @@ class Assertion
/**
* Assert that key does not exist in an array.
*
- * @param mixed $value
- * @param string|int $key
+ * @param mixed $value
+ * @param string|int $key
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function keyNotExists($value, $key, $message = null, $propertyPath = null)
+ public static function keyNotExists($value, $key, $message = null, string $propertyPath = null): bool
{
static::isArray($value, $message, $propertyPath);
@@ -1211,16 +1314,39 @@ class Assertion
}
/**
+ * Assert that values in array are unique (using strict equality).
+ *
+ * @param mixed[] $values
+ * @param string|callable|null $message
+ *
+ * @throws AssertionFailedException
+ */
+ public static function uniqueValues(array $values, $message = null, string $propertyPath = null): bool
+ {
+ foreach ($values as $key => $value) {
+ if (\array_search($value, $values, true) !== $key) {
+ $message = \sprintf(
+ static::generateMessage($message ?: 'Value "%s" occurs more than once in array'),
+ static::stringify($value)
+ );
+
+ throw static::createException($value, $message, static::INVALID_UNIQUE_VALUES, $propertyPath, ['value' => $value]);
+ }
+ }
+
+ return true;
+ }
+
+ /**
* Assert that key exists in an array/array-accessible object using isset().
*
- * @param mixed $value
- * @param string|int $key
+ * @param mixed $value
+ * @param string|int $key
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function keyIsset($value, $key, $message = null, $propertyPath = null)
+ public static function keyIsset($value, $key, $message = null, string $propertyPath = null): bool
{
static::isArrayAccessible($value, $message, $propertyPath);
@@ -1239,14 +1365,13 @@ class Assertion
/**
* Assert that key exists in an array/array-accessible object and its value is not empty.
*
- * @param mixed $value
- * @param string|int $key
+ * @param mixed $value
+ * @param string|int $key
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function notEmptyKey($value, $key, $message = null, $propertyPath = null)
+ public static function notEmptyKey($value, $key, $message = null, string $propertyPath = null): bool
{
static::keyIsset($value, $key, $message, $propertyPath);
static::notEmpty($value[$key], $message, $propertyPath);
@@ -1257,13 +1382,12 @@ class Assertion
/**
* Assert that value is not blank.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function notBlank($value, $message = null, $propertyPath = null)
+ public static function notBlank($value, $message = null, string $propertyPath = null): bool
{
if (false === $value || (empty($value) && '0' != $value) || (\is_string($value) && '' === \trim($value))) {
$message = \sprintf(
@@ -1280,14 +1404,20 @@ class Assertion
/**
* Assert that value is instance of given class-name.
*
- * @param mixed $value
- * @param string $className
+ * @param mixed $value
+ * @param string $className
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $className
+ * @psalm-assert ExpectedType $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isInstanceOf($value, $className, $message = null, $propertyPath = null)
+ public static function isInstanceOf($value, $className, $message = null, string $propertyPath = null): bool
{
if (!($value instanceof $className)) {
$message = \sprintf(
@@ -1305,14 +1435,20 @@ class Assertion
/**
* Assert that value is not instance of given class-name.
*
- * @param mixed $value
- * @param string $className
+ * @param mixed $value
+ * @param string $className
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-template ExpectedType of object
+ * @psalm-param class-string<ExpectedType> $className
+ * @psalm-assert !ExpectedType $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function notIsInstanceOf($value, $className, $message = null, $propertyPath = null)
+ public static function notIsInstanceOf($value, $className, $message = null, string $propertyPath = null): bool
{
if ($value instanceof $className) {
$message = \sprintf(
@@ -1330,14 +1466,13 @@ class Assertion
/**
* Assert that value is subclass of given class-name.
*
- * @param mixed $value
- * @param string $className
+ * @param mixed $value
+ * @param string $className
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function subclassOf($value, $className, $message = null, $propertyPath = null)
+ public static function subclassOf($value, $className, $message = null, string $propertyPath = null): bool
{
if (!\is_subclass_of($value, $className)) {
$message = \sprintf(
@@ -1355,15 +1490,19 @@ class Assertion
/**
* Assert that value is in range of numbers.
*
- * @param mixed $value
- * @param mixed $minValue
- * @param mixed $maxValue
+ * @param mixed $value
+ * @param mixed $minValue
+ * @param mixed $maxValue
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =numeric $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function range($value, $minValue, $maxValue, $message = null, $propertyPath = null)
+ public static function range($value, $minValue, $maxValue, $message = null, string $propertyPath = null): bool
{
static::numeric($value, $message, $propertyPath);
@@ -1384,14 +1523,18 @@ class Assertion
/**
* Assert that a value is at least as big as a given limit.
*
- * @param mixed $value
- * @param mixed $minValue
+ * @param mixed $value
+ * @param mixed $minValue
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =numeric $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function min($value, $minValue, $message = null, $propertyPath = null)
+ public static function min($value, $minValue, $message = null, string $propertyPath = null): bool
{
static::numeric($value, $message, $propertyPath);
@@ -1411,14 +1554,18 @@ class Assertion
/**
* Assert that a number is smaller as a given limit.
*
- * @param mixed $value
- * @param mixed $maxValue
+ * @param mixed $value
+ * @param mixed $maxValue
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =numeric $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function max($value, $maxValue, $message = null, $propertyPath = null)
+ public static function max($value, $maxValue, $message = null, string $propertyPath = null): bool
{
static::numeric($value, $message, $propertyPath);
@@ -1438,13 +1585,12 @@ class Assertion
/**
* Assert that a file exists.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function file($value, $message = null, $propertyPath = null)
+ public static function file($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
static::notEmpty($value, $message, $propertyPath);
@@ -1464,13 +1610,12 @@ class Assertion
/**
* Assert that a directory exists.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function directory($value, $message = null, $propertyPath = null)
+ public static function directory($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -1489,13 +1634,12 @@ class Assertion
/**
* Assert that the value is something readable.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function readable($value, $message = null, $propertyPath = null)
+ public static function readable($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -1514,13 +1658,12 @@ class Assertion
/**
* Assert that the value is something writeable.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function writeable($value, $message = null, $propertyPath = null)
+ public static function writeable($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -1539,13 +1682,17 @@ class Assertion
/**
* Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL).
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function email($value, $message = null, $propertyPath = null)
+ public static function email($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -1566,16 +1713,20 @@ class Assertion
*
* This code snipped was taken from the Symfony project and modified to the special demands of this method.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =string $value
*
* @return bool
*
+ * @throws AssertionFailedException
+ *
* @see https://github.com/symfony/Validator/blob/master/Constraints/UrlValidator.php
* @see https://github.com/symfony/Validator/blob/master/Constraints/Url.php
*/
- public static function url($value, $message = null, $propertyPath = null)
+ public static function url($value, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
@@ -1616,17 +1767,16 @@ class Assertion
/**
* Assert that value is alphanumeric.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function alnum($value, $message = null, $propertyPath = null)
+ public static function alnum($value, $message = null, string $propertyPath = null): bool
{
try {
static::regex($value, '(^([a-zA-Z]{1}[a-zA-Z0-9]*)$)', $message, $propertyPath);
- } catch (\Throwable $e) {
+ } catch (Throwable $e) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" is not alphanumeric, starting with letters and containing only letters and numbers.'),
static::stringify($value)
@@ -1641,13 +1791,17 @@ class Assertion
/**
* Assert that the value is boolean True.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert true $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function true($value, $message = null, $propertyPath = null)
+ public static function true($value, $message = null, string $propertyPath = null): bool
{
if (true !== $value) {
$message = \sprintf(
@@ -1664,13 +1818,17 @@ class Assertion
/**
* Assert that the value is boolean False.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert false $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function false($value, $message = null, $propertyPath = null)
+ public static function false($value, $message = null, string $propertyPath = null): bool
{
if (false !== $value) {
$message = \sprintf(
@@ -1687,13 +1845,17 @@ class Assertion
/**
* Assert that the class exists.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert class-string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function classExists($value, $message = null, $propertyPath = null)
+ public static function classExists($value, $message = null, string $propertyPath = null): bool
{
if (!\class_exists($value)) {
$message = \sprintf(
@@ -1710,13 +1872,17 @@ class Assertion
/**
* Assert that the interface exists.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert class-string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function interfaceExists($value, $message = null, $propertyPath = null)
+ public static function interfaceExists($value, $message = null, string $propertyPath = null): bool
{
if (!\interface_exists($value)) {
$message = \sprintf(
@@ -1733,17 +1899,16 @@ class Assertion
/**
* Assert that the class implements the interface.
*
- * @param mixed $class
- * @param string $interfaceName
+ * @param mixed $class
+ * @param string $interfaceName
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function implementsInterface($class, $interfaceName, $message = null, $propertyPath = null)
+ public static function implementsInterface($class, $interfaceName, $message = null, string $propertyPath = null): bool
{
try {
- $reflection = new \ReflectionClass($class);
+ $reflection = new ReflectionClass($class);
if (!$reflection->implementsInterface($interfaceName)) {
$message = \sprintf(
static::generateMessage($message ?: 'Class "%s" does not implement interface "%s".'),
@@ -1753,7 +1918,7 @@ class Assertion
throw static::createException($class, $message, static::INTERFACE_NOT_IMPLEMENTED, $propertyPath, ['interface' => $interfaceName]);
}
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
$message = \sprintf(
static::generateMessage($message ?: 'Class "%s" failed reflection.'),
static::stringify($class)
@@ -1773,13 +1938,17 @@ class Assertion
* content afterwards, just to decode and check for yourself instead
* of using this assertion.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert =string $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isJsonString($value, $message = null, $propertyPath = null)
+ public static function isJsonString($value, $message = null, string $propertyPath = null): bool
{
if (null === \json_decode($value) && JSON_ERROR_NONE !== \json_last_error()) {
$message = \sprintf(
@@ -1798,13 +1967,12 @@ class Assertion
*
* Uses code from {@link https://github.com/ramsey/uuid} that is MIT licensed.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function uuid($value, $message = null, $propertyPath = null)
+ public static function uuid($value, $message = null, string $propertyPath = null): bool
{
$value = \str_replace(['urn:', 'uuid:', '{', '}'], '', $value);
@@ -1829,13 +1997,12 @@ class Assertion
*
* @see https://en.wikipedia.org/wiki/E.164
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function e164($value, $message = null, $propertyPath = null)
+ public static function e164($value, $message = null, string $propertyPath = null): bool
{
if (!\preg_match('/^\+?[1-9]\d{1,14}$/', $value)) {
$message = \sprintf(
@@ -1852,14 +2019,16 @@ class Assertion
/**
* Assert that the count of countable is equal to count.
*
- * @param array|\Countable|\ResourceBundle|\SimpleXMLElement $countable
- * @param int $count
- * @param string|null $message
- * @param string|null $propertyPath
+ * @param array|Countable|ResourceBundle|SimpleXMLElement $countable
+ * @param int $count
+ * @param string|callable|null $message
+ * @param string|null $propertyPath
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function count($countable, $count, $message = null, $propertyPath = null)
+ public static function count($countable, $count, $message = null, string $propertyPath = null): bool
{
if ($count !== \count($countable)) {
$message = \sprintf(
@@ -1877,14 +2046,13 @@ class Assertion
/**
* Assert that the countable have at least $count elements.
*
- * @param array|\Countable|\ResourceBundle|\SimpleXMLElement $countable
- * @param int $count
- * @param string|null $message
- * @param string|null $propertyPath
+ * @param array|Countable|ResourceBundle|SimpleXMLElement $countable
+ * @param int $count
+ * @param string|callable|null $message
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function minCount($countable, $count, $message = null, $propertyPath = null)
+ public static function minCount($countable, $count, $message = null, string $propertyPath = null): bool
{
if ($count > \count($countable)) {
$message = \sprintf(
@@ -1902,14 +2070,13 @@ class Assertion
/**
* Assert that the countable have at most $count elements.
*
- * @param array|\Countable|\ResourceBundle|\SimpleXMLElement $countable
- * @param int $count
- * @param string|null $message
- * @param string|null $propertyPath
+ * @param array|Countable|ResourceBundle|SimpleXMLElement $countable
+ * @param int $count
+ * @param string|callable|null $message
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function maxCount($countable, $count, $message = null, $propertyPath = null)
+ public static function maxCount($countable, $count, $message = null, string $propertyPath = null): bool
{
if ($count < \count($countable)) {
$message = \sprintf(
@@ -1930,9 +2097,11 @@ class Assertion
* - "all" delegation.
*
* @param string $method
- * @param array $args
+ * @param array $args
*
* @return bool|mixed
+ *
+ * @throws AssertionFailedException
*/
public static function __callStatic($method, $args)
{
@@ -1974,14 +2143,11 @@ class Assertion
/**
* Determines if the values array has every choice as key and that this choice has content.
*
- * @param array $values
- * @param array $choices
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function choicesNotEmpty(array $values, array $choices, $message = null, $propertyPath = null)
+ public static function choicesNotEmpty(array $values, array $choices, $message = null, string $propertyPath = null): bool
{
static::notEmpty($values, $message, $propertyPath);
@@ -1995,14 +2161,13 @@ class Assertion
/**
* Determines that the named method is defined in the provided object.
*
- * @param string $value
- * @param mixed $object
+ * @param string $value
+ * @param mixed $object
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function methodExists($value, $object, $message = null, $propertyPath = null)
+ public static function methodExists($value, $object, $message = null, string $propertyPath = null): bool
{
static::isObject($object, $message, $propertyPath);
@@ -2021,13 +2186,17 @@ class Assertion
/**
* Determines that the provided value is an object.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert object $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isObject($value, $message = null, $propertyPath = null)
+ public static function isObject($value, $message = null, string $propertyPath = null): bool
{
if (!\is_object($value)) {
$message = \sprintf(
@@ -2044,14 +2213,13 @@ class Assertion
/**
* Determines if the value is less than given limit.
*
- * @param mixed $value
- * @param mixed $limit
+ * @param mixed $value
+ * @param mixed $limit
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function lessThan($value, $limit, $message = null, $propertyPath = null)
+ public static function lessThan($value, $limit, $message = null, string $propertyPath = null): bool
{
if ($value >= $limit) {
$message = \sprintf(
@@ -2069,14 +2237,13 @@ class Assertion
/**
* Determines if the value is less or equal than given limit.
*
- * @param mixed $value
- * @param mixed $limit
+ * @param mixed $value
+ * @param mixed $limit
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function lessOrEqualThan($value, $limit, $message = null, $propertyPath = null)
+ public static function lessOrEqualThan($value, $limit, $message = null, string $propertyPath = null): bool
{
if ($value > $limit) {
$message = \sprintf(
@@ -2094,14 +2261,13 @@ class Assertion
/**
* Determines if the value is greater than given limit.
*
- * @param mixed $value
- * @param mixed $limit
+ * @param mixed $value
+ * @param mixed $limit
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function greaterThan($value, $limit, $message = null, $propertyPath = null)
+ public static function greaterThan($value, $limit, $message = null, string $propertyPath = null): bool
{
if ($value <= $limit) {
$message = \sprintf(
@@ -2119,14 +2285,13 @@ class Assertion
/**
* Determines if the value is greater or equal than given limit.
*
- * @param mixed $value
- * @param mixed $limit
+ * @param mixed $value
+ * @param mixed $limit
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function greaterOrEqualThan($value, $limit, $message = null, $propertyPath = null)
+ public static function greaterOrEqualThan($value, $limit, $message = null, string $propertyPath = null): bool
{
if ($value < $limit) {
$message = \sprintf(
@@ -2144,15 +2309,15 @@ class Assertion
/**
* Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit.
*
- * @param mixed $value
- * @param mixed $lowerLimit
- * @param mixed $upperLimit
- * @param string $message
+ * @param mixed $value
+ * @param mixed $lowerLimit
+ * @param mixed $upperLimit
+ * @param string|callable|null $message
* @param string $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function between($value, $lowerLimit, $upperLimit, $message = null, $propertyPath = null)
+ public static function between($value, $lowerLimit, $upperLimit, $message = null, string $propertyPath = null): bool
{
if ($lowerLimit > $value || $value > $upperLimit) {
$message = \sprintf(
@@ -2171,15 +2336,15 @@ class Assertion
/**
* Assert that a value is greater than a lower limit, and less than an upper limit.
*
- * @param mixed $value
- * @param mixed $lowerLimit
- * @param mixed $upperLimit
- * @param string $message
+ * @param mixed $value
+ * @param mixed $lowerLimit
+ * @param mixed $upperLimit
+ * @param string|callable|null $message
* @param string $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function betweenExclusive($value, $lowerLimit, $upperLimit, $message = null, $propertyPath = null)
+ public static function betweenExclusive($value, $lowerLimit, $upperLimit, $message = null, string $propertyPath = null): bool
{
if ($lowerLimit >= $value || $value >= $upperLimit) {
$message = \sprintf(
@@ -2198,13 +2363,12 @@ class Assertion
/**
* Assert that extension is loaded.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function extensionLoaded($value, $message = null, $propertyPath = null)
+ public static function extensionLoaded($value, $message = null, string $propertyPath = null): bool
{
if (!\extension_loaded($value)) {
$message = \sprintf(
@@ -2221,22 +2385,21 @@ class Assertion
/**
* Assert that date is valid and corresponds to the given format.
*
- * @param string $value
- * @param string $format supports all of the options date(), except for the following:
- * N, w, W, t, L, o, B, a, A, g, h, I, O, P, Z, c, r
+ * @param string $value
+ * @param string $format supports all of the options date(), except for the following:
+ * N, w, W, t, L, o, B, a, A, g, h, I, O, P, Z, c, r
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*
* @see http://php.net/manual/function.date.php#refsect1-function.date-parameters
*/
- public static function date($value, $format, $message = null, $propertyPath = null)
+ public static function date($value, $format, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
static::string($format, $message, $propertyPath);
- $dateTime = \DateTime::createFromFormat('!'.$format, $value);
+ $dateTime = DateTime::createFromFormat('!'.$format, $value);
if (false === $dateTime || $value !== $dateTime->format($format)) {
$message = \sprintf(
@@ -2254,13 +2417,12 @@ class Assertion
/**
* Assert that the value is an object, or a class that exists.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function objectOrClass($value, $message = null, $propertyPath = null)
+ public static function objectOrClass($value, $message = null, string $propertyPath = null): bool
{
if (!\is_object($value)) {
static::classExists($value, $message, $propertyPath);
@@ -2272,14 +2434,13 @@ class Assertion
/**
* Assert that the value is an object or class, and that the property exists.
*
- * @param mixed $value
- * @param string $property
+ * @param mixed $value
+ * @param string $property
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function propertyExists($value, $property, $message = null, $propertyPath = null)
+ public static function propertyExists($value, $property, $message = null, string $propertyPath = null): bool
{
static::objectOrClass($value);
@@ -2299,14 +2460,12 @@ class Assertion
/**
* Assert that the value is an object or class, and that the properties all exist.
*
- * @param mixed $value
- * @param array $properties
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function propertiesExist($value, array $properties, $message = null, $propertyPath = null)
+ public static function propertiesExist($value, array $properties, $message = null, string $propertyPath = null): bool
{
static::objectOrClass($value);
static::allString($properties, $message, $propertyPath);
@@ -2334,15 +2493,14 @@ class Assertion
/**
* Assert comparison of two versions.
*
- * @param string $version1
- * @param string $operator
- * @param string $version2
+ * @param string $version1
+ * @param string $operator
+ * @param string $version2
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function version($version1, $operator, $version2, $message = null, $propertyPath = null)
+ public static function version($version1, $operator, $version2, $message = null, string $propertyPath = null): bool
{
static::notEmpty($operator, 'versionCompare operator is required and cannot be empty.');
@@ -2363,14 +2521,13 @@ class Assertion
/**
* Assert on PHP version.
*
- * @param string $operator
- * @param mixed $version
+ * @param string $operator
+ * @param mixed $version
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function phpVersion($operator, $version, $message = null, $propertyPath = null)
+ public static function phpVersion($operator, $version, $message = null, string $propertyPath = null): bool
{
static::defined('PHP_VERSION');
@@ -2380,15 +2537,14 @@ class Assertion
/**
* Assert that extension is loaded and a specific version is installed.
*
- * @param string $extension
- * @param string $operator
- * @param mixed $version
+ * @param string $extension
+ * @param string $operator
+ * @param mixed $version
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function extensionVersion($extension, $operator, $version, $message = null, $propertyPath = null)
+ public static function extensionVersion($extension, $operator, $version, $message = null, string $propertyPath = null): bool
{
static::extensionLoaded($extension, $message, $propertyPath);
@@ -2398,13 +2554,17 @@ class Assertion
/**
* Determines that the provided value is callable.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|callable|null $message
- * @param string|null $propertyPath
+ * @param string|null $propertyPath
+ *
+ * @psalm-assert callable $value
*
* @return bool
+ *
+ * @throws AssertionFailedException
*/
- public static function isCallable($value, $message = null, $propertyPath = null)
+ public static function isCallable($value, $message = null, string $propertyPath = null): bool
{
if (!\is_callable($value)) {
$message = \sprintf(
@@ -2423,14 +2583,13 @@ class Assertion
*
* If the callback returns `false` the assertion will fail.
*
- * @param mixed $value
- * @param callable $callback
+ * @param mixed $value
+ * @param callable $callback
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function satisfy($value, $callback, $message = null, $propertyPath = null)
+ public static function satisfy($value, $callback, $message = null, string $propertyPath = null): bool
{
static::isCallable($callback);
@@ -2450,19 +2609,23 @@ class Assertion
* Assert that value is an IPv4 or IPv6 address
* (using input_filter/FILTER_VALIDATE_IP).
*
- * @param string $value
- * @param int|null $flag
+ * @param string $value
+ * @param int|null $flag
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*
* @see http://php.net/manual/filter.filters.flags.php
*/
- public static function ip($value, $flag = null, $message = null, $propertyPath = null)
+ public static function ip($value, $flag = null, $message = null, string $propertyPath = null): bool
{
static::string($value, $message, $propertyPath);
- if (!\filter_var($value, FILTER_VALIDATE_IP, $flag)) {
+ if ($flag === null) {
+ $filterVarResult = \filter_var($value, FILTER_VALIDATE_IP);
+ } else {
+ $filterVarResult = \filter_var($value, FILTER_VALIDATE_IP, $flag);
+ }
+ if (!$filterVarResult) {
$message = \sprintf(
static::generateMessage($message ?: 'Value "%s" was expected to be a valid IP address.'),
static::stringify($value)
@@ -2477,16 +2640,15 @@ class Assertion
* Assert that value is an IPv4 address
* (using input_filter/FILTER_VALIDATE_IP).
*
- * @param string $value
- * @param int|null $flag
+ * @param string $value
+ * @param int|null $flag
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*
* @see http://php.net/manual/filter.filters.flags.php
*/
- public static function ipv4($value, $flag = null, $message = null, $propertyPath = null)
+ public static function ipv4($value, $flag = null, $message = null, string $propertyPath = null): bool
{
static::ip($value, $flag | FILTER_FLAG_IPV4, static::generateMessage($message ?: 'Value "%s" was expected to be a valid IPv4 address.'), $propertyPath);
@@ -2497,16 +2659,15 @@ class Assertion
* Assert that value is an IPv6 address
* (using input_filter/FILTER_VALIDATE_IP).
*
- * @param string $value
- * @param int|null $flag
+ * @param string $value
+ * @param int|null $flag
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*
* @see http://php.net/manual/filter.filters.flags.php
*/
- public static function ipv6($value, $flag = null, $message = null, $propertyPath = null)
+ public static function ipv6($value, $flag = null, $message = null, string $propertyPath = null): bool
{
static::ip($value, $flag | FILTER_FLAG_IPV6, static::generateMessage($message ?: 'Value "%s" was expected to be a valid IPv6 address.'), $propertyPath);
@@ -2516,13 +2677,10 @@ class Assertion
/**
* Assert that a constant is defined.
*
- * @param mixed $constant
+ * @param mixed $constant
* @param string|callable|null $message
- * @param string|null $propertyPath
- *
- * @return bool
*/
- public static function defined($constant, $message = null, $propertyPath = null)
+ public static function defined($constant, $message = null, string $propertyPath = null): bool
{
if (!\defined($constant)) {
$message = \sprintf(static::generateMessage($message ?: 'Value "%s" expected to be a defined constant.'), $constant);
@@ -2536,13 +2694,12 @@ class Assertion
/**
* Assert that a constant is defined.
*
- * @param string $value
+ * @param string $value
* @param string|callable|null $message
- * @param string|null $propertyPath
*
- * @return bool
+ * @throws AssertionFailedException
*/
- public static function base64($value, $message = null, $propertyPath = null)
+ public static function base64($value, $message = null, string $propertyPath = null): bool
{
if (false === \base64_decode($value, true)) {
$message = \sprintf(static::generateMessage($message ?: 'Value "%s" is not a valid base64 string.'), $value);
@@ -2558,11 +2715,9 @@ class Assertion
* They are returned from this method so that the stack trace still shows
* the assertions method.
*
- * @param mixed $value
- * @param string|callable $message
- * @param int $code
- * @param string|null $propertyPath
- * @param array $constraints
+ * @param mixed $value
+ * @param string|callable|null $message
+ * @param int $code
*
* @return mixed
*/
@@ -2577,20 +2732,18 @@ class Assertion
* Make a string version of a value.
*
* @param mixed $value
- *
- * @return string
*/
- protected static function stringify($value)
+ protected static function stringify($value): string
{
$result = \gettype($value);
if (\is_bool($value)) {
$result = $value ? '<TRUE>' : '<FALSE>';
} elseif (\is_scalar($value)) {
- $val = (string) $value;
+ $val = (string)$value;
- if (\strlen($val) > 100) {
- $val = \substr($val, 0, 97).'...';
+ if (\mb_strlen($val) > 100) {
+ $val = \mb_substr($val, 0, 97).'...';
}
$result = $val;
@@ -2610,9 +2763,7 @@ class Assertion
/**
* Generate the message.
*
- * @param string|callable $message
- *
- * @return string
+ * @param string|callable|null $message
*/
protected static function generateMessage($message): string
{
@@ -2622,7 +2773,7 @@ class Assertion
$parameters = [];
try {
- $reflection = new \ReflectionClass($traces[1]['class']);
+ $reflection = new ReflectionClass($traces[1]['class']);
$method = $reflection->getMethod($traces[1]['function']);
foreach ($method->getParameters() as $index => $parameter) {
if ('message' !== $parameter->getName()) {
@@ -2636,11 +2787,11 @@ class Assertion
$message = \call_user_func_array($message, [$parameters]);
} // @codeCoverageIgnoreStart
- catch (\Throwable $exception) {
+ catch (Throwable $exception) {
$message = \sprintf('Unable to generate message : %s', $exception->getMessage());
} // @codeCoverageIgnoreEnd
}
- return (string) $message;
+ return (string)$message;
}
}
diff --git a/vendor/beberlei/assert/lib/Assert/AssertionChain.php b/vendor/beberlei/assert/lib/Assert/AssertionChain.php
index 4d3ca1c01..4c444350f 100644
--- a/vendor/beberlei/assert/lib/Assert/AssertionChain.php
+++ b/vendor/beberlei/assert/lib/Assert/AssertionChain.php
@@ -15,7 +15,6 @@
namespace Assert;
use LogicException;
-use ReflectionClass;
/**
* Chaining builder for assertions.
@@ -24,15 +23,15 @@ use ReflectionClass;
*
* @method AssertionChain alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric.
* @method AssertionChain base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
- * @method AssertionChain between(mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit.
- * @method AssertionChain betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit.
+ * @method AssertionChain between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit.
+ * @method AssertionChain betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit.
* @method AssertionChain betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths.
* @method AssertionChain boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean.
* @method AssertionChain choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices.
* @method AssertionChain choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content.
* @method AssertionChain classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists.
* @method AssertionChain contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars.
- * @method AssertionChain count(int $count, string $message = null, string $propertyPath = null) Assert that the count of countable is equal to count.
+ * @method AssertionChain count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count.
* @method AssertionChain date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format.
* @method AssertionChain defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
* @method AssertionChain digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit.
@@ -73,23 +72,23 @@ use ReflectionClass;
* @method AssertionChain lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit.
* @method AssertionChain lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit.
* @method AssertionChain max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit.
- * @method AssertionChain maxCount(int $count, string $message = null, string $propertyPath = null) Assert that the countable have at most $count elements.
+ * @method AssertionChain maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements.
* @method AssertionChain maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars.
* @method AssertionChain methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object.
* @method AssertionChain min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit.
- * @method AssertionChain minCount(int $count, string $message = null, string $propertyPath = null) Assert that the countable have at least $count elements.
+ * @method AssertionChain minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements.
* @method AssertionChain minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long.
* @method AssertionChain noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty.
* @method AssertionChain notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank.
* @method AssertionChain notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars.
* @method AssertionChain notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty.
* @method AssertionChain notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty.
- * @method AssertionChain notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using == ).
+ * @method AssertionChain notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==).
* @method AssertionChain notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices.
* @method AssertionChain notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name.
* @method AssertionChain notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null.
* @method AssertionChain notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex.
- * @method AssertionChain notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using === ).
+ * @method AssertionChain notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===).
* @method AssertionChain null(string|callable $message = null, string $propertyPath = null) Assert that value is null.
* @method AssertionChain numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric.
* @method AssertionChain objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists.
@@ -106,6 +105,7 @@ use ReflectionClass;
* @method AssertionChain string(string|callable $message = null, string $propertyPath = null) Assert that value is a string.
* @method AssertionChain subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name.
* @method AssertionChain true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True.
+ * @method AssertionChain uniqueValues(string|callable $message = null, string $propertyPath = null) Assert that values in array are unique (using strict equality).
* @method AssertionChain url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL.
* @method AssertionChain uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID.
* @method AssertionChain version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions.
@@ -113,8 +113,19 @@ use ReflectionClass;
*/
class AssertionChain
{
+ /**
+ * @var mixed
+ */
private $value;
+
+ /**
+ * @var string|callable|null
+ */
private $defaultMessage;
+
+ /**
+ * @var string|null
+ */
private $defaultPropertyPath;
/**
@@ -134,7 +145,13 @@ class AssertionChain
/** @var string|Assertion Class to use for assertion calls */
private $assertionClassName = 'Assert\Assertion';
- public function __construct($value, $defaultMessage = null, $defaultPropertyPath = null)
+ /**
+ * AssertionChain constructor.
+ *
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
+ */
+ public function __construct($value, $defaultMessage = null, string $defaultPropertyPath = null)
{
$this->value = $value;
$this->defaultMessage = $defaultMessage;
@@ -145,23 +162,20 @@ class AssertionChain
* Call assertion on the current value in the chain.
*
* @param string $methodName
- * @param array $args
- *
- * @return \Assert\AssertionChain
+ * @param array $args
*/
- public function __call($methodName, $args)
+ public function __call($methodName, $args): AssertionChain
{
if (true === $this->alwaysValid) {
return $this;
}
- if (!\method_exists($this->assertionClassName, $methodName)) {
+ try {
+ $method = new \ReflectionMethod($this->assertionClassName, $methodName);
+ } catch (\ReflectionException $exception) {
throw new \RuntimeException("Assertion '".$methodName."' does not exist.");
}
- $reflClass = new ReflectionClass($this->assertionClassName);
- $method = $reflClass->getMethod($methodName);
-
\array_unshift($args, $this->value);
$params = $method->getParameters();
@@ -170,12 +184,13 @@ class AssertionChain
continue;
}
- if ('message' == $param->getName()) {
- $args[$idx] = $this->defaultMessage;
- }
-
- if ('propertyPath' == $param->getName()) {
- $args[$idx] = $this->defaultPropertyPath;
+ switch ($param->getName()) {
+ case 'message':
+ $args[$idx] = $this->defaultMessage;
+ break;
+ case 'propertyPath':
+ $args[$idx] = $this->defaultPropertyPath;
+ break;
}
}
@@ -190,10 +205,8 @@ class AssertionChain
/**
* Switch chain into validation mode for an array of values.
- *
- * @return \Assert\AssertionChain
*/
- public function all()
+ public function all(): AssertionChain
{
$this->all = true;
@@ -202,10 +215,8 @@ class AssertionChain
/**
* Switch chain into mode allowing nulls, ignoring further assertions.
- *
- * @return \Assert\AssertionChain
*/
- public function nullOr()
+ public function nullOr(): AssertionChain
{
if (null === $this->value) {
$this->alwaysValid = true;
@@ -219,7 +230,7 @@ class AssertionChain
*
* @return $this
*/
- public function setAssertionClassName($className)
+ public function setAssertionClassName($className): AssertionChain
{
if (!\is_string($className)) {
throw new LogicException('Exception class name must be passed as a string');
diff --git a/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php b/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php
index e895aa8e5..7e0b2ec3d 100644
--- a/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php
+++ b/vendor/beberlei/assert/lib/Assert/AssertionFailedException.php
@@ -18,9 +18,15 @@ use Throwable;
interface AssertionFailedException extends Throwable
{
+ /**
+ * @return string|null
+ */
public function getPropertyPath();
+ /**
+ * @return mixed
+ */
public function getValue();
- public function getConstraints();
+ public function getConstraints(): array;
}
diff --git a/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
index 20c890992..9516e0774 100644
--- a/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
+++ b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
@@ -16,11 +16,22 @@ namespace Assert;
class InvalidArgumentException extends \InvalidArgumentException implements AssertionFailedException
{
+ /**
+ * @var string|null
+ */
private $propertyPath;
+
+ /**
+ * @var mixed
+ */
private $value;
+
+ /**
+ * @var array
+ */
private $constraints;
- public function __construct($message, $code, $propertyPath, $value, array $constraints = [])
+ public function __construct($message, $code, string $propertyPath = null, $value = null, array $constraints = [])
{
parent::__construct($message, $code);
@@ -36,7 +47,7 @@ class InvalidArgumentException extends \InvalidArgumentException implements Asse
* Useful to transport information about the nature of the error
* back to higher layers.
*
- * @return string
+ * @return string|null
*/
public function getPropertyPath()
{
@@ -55,10 +66,8 @@ class InvalidArgumentException extends \InvalidArgumentException implements Asse
/**
* Get the constraints that applied to the failed assertion.
- *
- * @return array
*/
- public function getConstraints()
+ public function getConstraints(): array
{
return $this->constraints;
}
diff --git a/vendor/beberlei/assert/lib/Assert/LazyAssertion.php b/vendor/beberlei/assert/lib/Assert/LazyAssertion.php
index abbaf4bcb..b3052178b 100644
--- a/vendor/beberlei/assert/lib/Assert/LazyAssertion.php
+++ b/vendor/beberlei/assert/lib/Assert/LazyAssertion.php
@@ -21,96 +21,97 @@ use LogicException;
*
* @author Benjamin Eberlei <[email protected]>
*
- * @method $this alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric.
- * @method $this base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
- * @method $this between(mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit.
- * @method $this betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit.
- * @method $this betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths.
- * @method $this boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean.
- * @method $this choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices.
- * @method $this choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content.
- * @method $this classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists.
- * @method $this contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars.
- * @method $this count(int $count, string $message = null, string $propertyPath = null) Assert that the count of countable is equal to count.
- * @method $this date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format.
- * @method $this defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
- * @method $this digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit.
- * @method $this directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists.
- * @method $this e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number.
- * @method $this email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL).
- * @method $this endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars.
- * @method $this eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==).
- * @method $this eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset.
- * @method $this extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded.
- * @method $this extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed.
- * @method $this false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False.
- * @method $this file(string|callable $message = null, string $propertyPath = null) Assert that a file exists.
- * @method $this float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float.
- * @method $this greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit.
- * @method $this greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit.
- * @method $this implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface.
- * @method $this inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice().
- * @method $this integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer.
- * @method $this integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish.
- * @method $this interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists.
- * @method $this ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address.
- * @method $this ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address.
- * @method $this ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address.
- * @method $this isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array.
- * @method $this isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object.
- * @method $this isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable.
- * @method $this isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable.
- * @method $this isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name.
- * @method $this isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string.
- * @method $this isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object.
- * @method $this isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource.
- * @method $this isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object.
- * @method $this keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array.
- * @method $this keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset().
- * @method $this keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array.
- * @method $this length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length.
- * @method $this lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit.
- * @method $this lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit.
- * @method $this max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit.
- * @method $this maxCount(int $count, string $message = null, string $propertyPath = null) Assert that the countable have at most $count elements.
- * @method $this maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars.
- * @method $this methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object.
- * @method $this min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit.
- * @method $this minCount(int $count, string $message = null, string $propertyPath = null) Assert that the countable have at least $count elements.
- * @method $this minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long.
- * @method $this noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty.
- * @method $this notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank.
- * @method $this notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars.
- * @method $this notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty.
- * @method $this notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty.
- * @method $this notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using == ).
- * @method $this notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices.
- * @method $this notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name.
- * @method $this notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null.
- * @method $this notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex.
- * @method $this notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using === ).
- * @method $this null(string|callable $message = null, string $propertyPath = null) Assert that value is null.
- * @method $this numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric.
- * @method $this objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists.
- * @method $this phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version.
- * @method $this propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist.
- * @method $this propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists.
- * @method $this range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers.
- * @method $this readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable.
- * @method $this regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex.
- * @method $this same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===).
- * @method $this satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback.
- * @method $this scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar.
- * @method $this startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars.
- * @method $this string(string|callable $message = null, string $propertyPath = null) Assert that value is a string.
- * @method $this subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name.
- * @method $this true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True.
- * @method $this url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL.
- * @method $this uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID.
- * @method $this version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions.
- * @method $this writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable.
- * @method $this all() Switch chain into validation mode for an array of values.
- * @method $this nullOr() Switch chain into mode allowing nulls, ignoring further assertions.
+ * @method LazyAssertion alnum(string|callable $message = null, string $propertyPath = null) Assert that value is alphanumeric.
+ * @method LazyAssertion base64(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
+ * @method LazyAssertion between(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater or equal than a lower limit, and less than or equal to an upper limit.
+ * @method LazyAssertion betweenExclusive(mixed $lowerLimit, mixed $upperLimit, string|callable $message = null, string $propertyPath = null) Assert that a value is greater than a lower limit, and less than an upper limit.
+ * @method LazyAssertion betweenLength(int $minLength, int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string length is between min and max lengths.
+ * @method LazyAssertion boolean(string|callable $message = null, string $propertyPath = null) Assert that value is php boolean.
+ * @method LazyAssertion choice(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices.
+ * @method LazyAssertion choicesNotEmpty(array $choices, string|callable $message = null, string $propertyPath = null) Determines if the values array has every choice as key and that this choice has content.
+ * @method LazyAssertion classExists(string|callable $message = null, string $propertyPath = null) Assert that the class exists.
+ * @method LazyAssertion contains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string contains a sequence of chars.
+ * @method LazyAssertion count(int $count, string|callable $message = null, string $propertyPath = null) Assert that the count of countable is equal to count.
+ * @method LazyAssertion date(string $format, string|callable $message = null, string $propertyPath = null) Assert that date is valid and corresponds to the given format.
+ * @method LazyAssertion defined(string|callable $message = null, string $propertyPath = null) Assert that a constant is defined.
+ * @method LazyAssertion digit(string|callable $message = null, string $propertyPath = null) Validates if an integer or integerish is a digit.
+ * @method LazyAssertion directory(string|callable $message = null, string $propertyPath = null) Assert that a directory exists.
+ * @method LazyAssertion e164(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid E164 Phone Number.
+ * @method LazyAssertion email(string|callable $message = null, string $propertyPath = null) Assert that value is an email address (using input_filter/FILTER_VALIDATE_EMAIL).
+ * @method LazyAssertion endsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string ends with a sequence of chars.
+ * @method LazyAssertion eq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are equal (using ==).
+ * @method LazyAssertion eqArraySubset(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that the array contains the subset.
+ * @method LazyAssertion extensionLoaded(string|callable $message = null, string $propertyPath = null) Assert that extension is loaded.
+ * @method LazyAssertion extensionVersion(string $operator, mixed $version, string|callable $message = null, string $propertyPath = null) Assert that extension is loaded and a specific version is installed.
+ * @method LazyAssertion false(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean False.
+ * @method LazyAssertion file(string|callable $message = null, string $propertyPath = null) Assert that a file exists.
+ * @method LazyAssertion float(string|callable $message = null, string $propertyPath = null) Assert that value is a php float.
+ * @method LazyAssertion greaterOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater or equal than given limit.
+ * @method LazyAssertion greaterThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is greater than given limit.
+ * @method LazyAssertion implementsInterface(string $interfaceName, string|callable $message = null, string $propertyPath = null) Assert that the class implements the interface.
+ * @method LazyAssertion inArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is in array of choices. This is an alias of Assertion::choice().
+ * @method LazyAssertion integer(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer.
+ * @method LazyAssertion integerish(string|callable $message = null, string $propertyPath = null) Assert that value is a php integer'ish.
+ * @method LazyAssertion interfaceExists(string|callable $message = null, string $propertyPath = null) Assert that the interface exists.
+ * @method LazyAssertion ip(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 or IPv6 address.
+ * @method LazyAssertion ipv4(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv4 address.
+ * @method LazyAssertion ipv6(int $flag = null, string|callable $message = null, string $propertyPath = null) Assert that value is an IPv6 address.
+ * @method LazyAssertion isArray(string|callable $message = null, string $propertyPath = null) Assert that value is an array.
+ * @method LazyAssertion isArrayAccessible(string|callable $message = null, string $propertyPath = null) Assert that value is an array or an array-accessible object.
+ * @method LazyAssertion isCallable(string|callable $message = null, string $propertyPath = null) Determines that the provided value is callable.
+ * @method LazyAssertion isCountable(string|callable $message = null, string $propertyPath = null) Assert that value is countable.
+ * @method LazyAssertion isInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is instance of given class-name.
+ * @method LazyAssertion isJsonString(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid json string.
+ * @method LazyAssertion isObject(string|callable $message = null, string $propertyPath = null) Determines that the provided value is an object.
+ * @method LazyAssertion isResource(string|callable $message = null, string $propertyPath = null) Assert that value is a resource.
+ * @method LazyAssertion isTraversable(string|callable $message = null, string $propertyPath = null) Assert that value is an array or a traversable object.
+ * @method LazyAssertion keyExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array.
+ * @method LazyAssertion keyIsset(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object using isset().
+ * @method LazyAssertion keyNotExists(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key does not exist in an array.
+ * @method LazyAssertion length(int $length, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string has a given length.
+ * @method LazyAssertion lessOrEqualThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less or equal than given limit.
+ * @method LazyAssertion lessThan(mixed $limit, string|callable $message = null, string $propertyPath = null) Determines if the value is less than given limit.
+ * @method LazyAssertion max(mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that a number is smaller as a given limit.
+ * @method LazyAssertion maxCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at most $count elements.
+ * @method LazyAssertion maxLength(int $maxLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string value is not longer than $maxLength chars.
+ * @method LazyAssertion methodExists(mixed $object, string|callable $message = null, string $propertyPath = null) Determines that the named method is defined in the provided object.
+ * @method LazyAssertion min(mixed $minValue, string|callable $message = null, string $propertyPath = null) Assert that a value is at least as big as a given limit.
+ * @method LazyAssertion minCount(int $count, string|callable $message = null, string $propertyPath = null) Assert that the countable have at least $count elements.
+ * @method LazyAssertion minLength(int $minLength, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that a string is at least $minLength chars long.
+ * @method LazyAssertion noContent(string|callable $message = null, string $propertyPath = null) Assert that value is empty.
+ * @method LazyAssertion notBlank(string|callable $message = null, string $propertyPath = null) Assert that value is not blank.
+ * @method LazyAssertion notContains(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string does not contains a sequence of chars.
+ * @method LazyAssertion notEmpty(string|callable $message = null, string $propertyPath = null) Assert that value is not empty.
+ * @method LazyAssertion notEmptyKey(string|int $key, string|callable $message = null, string $propertyPath = null) Assert that key exists in an array/array-accessible object and its value is not empty.
+ * @method LazyAssertion notEq(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not equal (using ==).
+ * @method LazyAssertion notInArray(array $choices, string|callable $message = null, string $propertyPath = null) Assert that value is not in array of choices.
+ * @method LazyAssertion notIsInstanceOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is not instance of given class-name.
+ * @method LazyAssertion notNull(string|callable $message = null, string $propertyPath = null) Assert that value is not null.
+ * @method LazyAssertion notRegex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value does not match a regex.
+ * @method LazyAssertion notSame(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are not the same (using ===).
+ * @method LazyAssertion null(string|callable $message = null, string $propertyPath = null) Assert that value is null.
+ * @method LazyAssertion numeric(string|callable $message = null, string $propertyPath = null) Assert that value is numeric.
+ * @method LazyAssertion objectOrClass(string|callable $message = null, string $propertyPath = null) Assert that the value is an object, or a class that exists.
+ * @method LazyAssertion phpVersion(mixed $version, string|callable $message = null, string $propertyPath = null) Assert on PHP version.
+ * @method LazyAssertion propertiesExist(array $properties, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the properties all exist.
+ * @method LazyAssertion propertyExists(string $property, string|callable $message = null, string $propertyPath = null) Assert that the value is an object or class, and that the property exists.
+ * @method LazyAssertion range(mixed $minValue, mixed $maxValue, string|callable $message = null, string $propertyPath = null) Assert that value is in range of numbers.
+ * @method LazyAssertion readable(string|callable $message = null, string $propertyPath = null) Assert that the value is something readable.
+ * @method LazyAssertion regex(string $pattern, string|callable $message = null, string $propertyPath = null) Assert that value matches a regex.
+ * @method LazyAssertion same(mixed $value2, string|callable $message = null, string $propertyPath = null) Assert that two values are the same (using ===).
+ * @method LazyAssertion satisfy(callable $callback, string|callable $message = null, string $propertyPath = null) Assert that the provided value is valid according to a callback.
+ * @method LazyAssertion scalar(string|callable $message = null, string $propertyPath = null) Assert that value is a PHP scalar.
+ * @method LazyAssertion startsWith(string $needle, string|callable $message = null, string $propertyPath = null, string $encoding = 'utf8') Assert that string starts with a sequence of chars.
+ * @method LazyAssertion string(string|callable $message = null, string $propertyPath = null) Assert that value is a string.
+ * @method LazyAssertion subclassOf(string $className, string|callable $message = null, string $propertyPath = null) Assert that value is subclass of given class-name.
+ * @method LazyAssertion true(string|callable $message = null, string $propertyPath = null) Assert that the value is boolean True.
+ * @method LazyAssertion uniqueValues(string|callable $message = null, string $propertyPath = null) Assert that values in array are unique (using strict equality).
+ * @method LazyAssertion url(string|callable $message = null, string $propertyPath = null) Assert that value is an URL.
+ * @method LazyAssertion uuid(string|callable $message = null, string $propertyPath = null) Assert that the given string is a valid UUID.
+ * @method LazyAssertion version(string $operator, string $version2, string|callable $message = null, string $propertyPath = null) Assert comparison of two versions.
+ * @method LazyAssertion writeable(string|callable $message = null, string $propertyPath = null) Assert that the value is something writeable.
+ * @method LazyAssertion all() Switch chain into validation mode for an array of values.
+ * @method LazyAssertion nullOr() Switch chain into mode allowing nulls, ignoring further assertions.
*/
class LazyAssertion
{
@@ -127,9 +128,12 @@ class LazyAssertion
private $exceptionClass = LazyAssertionException::class;
/**
- * @return $this
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
+ *
+ * @return static
*/
- public function that($value, $propertyPath, $defaultMessage = null)
+ public function that($value, string $propertyPath = null, $defaultMessage = null)
{
$this->currentChainFailed = false;
$this->thisChainTryAll = false;
@@ -140,7 +144,7 @@ class LazyAssertion
}
/**
- * @return $this
+ * @return static
*/
public function tryAll()
{
@@ -153,6 +157,12 @@ class LazyAssertion
return $this;
}
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return static
+ */
public function __call($method, $args)
{
if (false === $this->alwaysTryAll
@@ -174,10 +184,8 @@ class LazyAssertion
/**
* @throws LazyAssertionException
- *
- * @return bool
*/
- public function verifyNow()
+ public function verifyNow(): bool
{
if ($this->errors) {
throw \call_user_func([$this->exceptionClass, 'fromErrors'], $this->errors);
@@ -189,12 +197,12 @@ class LazyAssertion
/**
* @param string $className
*
- * @return $this
+ * @return static
*/
- public function setAssertClass(string $className)
+ public function setAssertClass(string $className): LazyAssertion
{
if (Assert::class !== $className && !\is_subclass_of($className, Assert::class)) {
- throw new LogicException($className.' is not (a subclass of) '. Assert::class);
+ throw new LogicException($className.' is not (a subclass of) '.Assert::class);
}
$this->assertClass = $className;
@@ -205,9 +213,9 @@ class LazyAssertion
/**
* @param string $className
*
- * @return $this
+ * @return static
*/
- public function setExceptionClass(string $className)
+ public function setExceptionClass(string $className): LazyAssertion
{
if (LazyAssertionException::class !== $className && !\is_subclass_of($className, LazyAssertionException::class)) {
throw new LogicException($className.' is not (a subclass of) '.LazyAssertionException::class);
diff --git a/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php b/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php
index 0a834c1cb..2ba59dd7c 100644
--- a/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php
+++ b/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php
@@ -23,10 +23,8 @@ class LazyAssertionException extends InvalidArgumentException
/**
* @param InvalidArgumentException[] $errors
- *
- * @return self
*/
- public static function fromErrors(array $errors)
+ public static function fromErrors(array $errors): self
{
$message = \sprintf('The following %d assertions failed:', \count($errors))."\n";
@@ -45,7 +43,10 @@ class LazyAssertionException extends InvalidArgumentException
$this->errors = $errors;
}
- public function getErrorExceptions()
+ /**
+ * @return InvalidArgumentException[]
+ */
+ public function getErrorExceptions(): array
{
return $this->errors;
}
diff --git a/vendor/beberlei/assert/lib/Assert/functions.php b/vendor/beberlei/assert/lib/Assert/functions.php
index 67bb6315e..1a4e84d92 100644
--- a/vendor/beberlei/assert/lib/Assert/functions.php
+++ b/vendor/beberlei/assert/lib/Assert/functions.php
@@ -20,6 +20,10 @@ namespace Assert;
* The invocation of this method starts an assertion chain
* that is happening on the passed value.
*
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
+ * @param string $defaultPropertyPath
+ *
* @example
*
* \Assert\that($value)->notEmpty()->integer();
@@ -27,14 +31,8 @@ namespace Assert;
*
* The assertion chain can be stateful, that means be careful when you reuse
* it. You should never pass around the chain.
- *
- * @param mixed $value
- * @param string $defaultMessage
- * @param string $defaultPropertyPath
- *
- * @return \Assert\AssertionChain
*/
-function that($value, $defaultMessage = null, $defaultPropertyPath = null)
+function that($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return Assert::that($value, $defaultMessage, $defaultPropertyPath);
}
@@ -42,13 +40,11 @@ function that($value, $defaultMessage = null, $defaultPropertyPath = null)
/**
* Start validation on a set of values, returns {@link AssertionChain}.
*
- * @param mixed $values
- * @param string $defaultMessage
+ * @param mixed $values
+ * @param string|callable|null $defaultMessage
* @param string $defaultPropertyPath
- *
- * @return \Assert\AssertionChain
*/
-function thatAll($values, $defaultMessage = null, $defaultPropertyPath = null)
+function thatAll($values, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return Assert::thatAll($values, $defaultMessage, $defaultPropertyPath);
}
@@ -56,25 +52,21 @@ function thatAll($values, $defaultMessage = null, $defaultPropertyPath = null)
/**
* Start validation and allow NULL, returns {@link AssertionChain}.
*
- * @param mixed $value
- * @param string $defaultMessage
+ * @param mixed $value
+ * @param string|callable|null $defaultMessage
* @param string $defaultPropertyPath
*
- * @return \Assert\AssertionChain
- *
* @deprecated In favour of Assert::thatNullOr($value, $defaultMessage = null, $defaultPropertyPath = null)
*/
-function thatNullOr($value, $defaultMessage = null, $defaultPropertyPath = null)
+function thatNullOr($value, $defaultMessage = null, string $defaultPropertyPath = null): AssertionChain
{
return Assert::thatNullOr($value, $defaultMessage, $defaultPropertyPath);
}
/**
* Create a lazy assertion object.
- *
- * @return \Assert\LazyAssertion
*/
-function lazy()
+function lazy(): LazyAssertion
{
return Assert::lazy();
}
diff --git a/vendor/beberlei/assert/phpstan-code.neon b/vendor/beberlei/assert/phpstan-code.neon
deleted file mode 100644
index 630379dbe..000000000
--- a/vendor/beberlei/assert/phpstan-code.neon
+++ /dev/null
@@ -1,3 +0,0 @@
-parameters:
- autoload_files:
- - bin/MethodDocGenerator.php
diff --git a/vendor/beberlei/assert/phpstan-tests.neon b/vendor/beberlei/assert/phpstan-tests.neon
deleted file mode 100644
index e9ab0bcf9..000000000
--- a/vendor/beberlei/assert/phpstan-tests.neon
+++ /dev/null
@@ -1,10 +0,0 @@
-parameters:
- ignoreErrors:
- # The following errors are ignored as they are testing for errors and exceptions that static analysis correctly identifies as problems.
- - '#Call to an undefined method Assert\\AssertionChain::unknownAssertion\(\)#'
- - '#Call to an undefined static method Assert\\Assertion::nullOrAssertionDoesNotExist\(\)#'
- - '#Class Foo not found#'
- - '#Parameter \#1 $value of static method Assert\\Assertion::isCountable\(\) expects array|Countable|ResourceBundle|SimpleXMLElement, string given#'
- - '#Parameter \#2 \$operator of static method Assert\\Assertion::version\(\) expects string, null given#'
- - '#Static method Assert\\Assertion::allTrue\(\) invoked with 0 parameters, 1-3 required#'
- - '#Static method Assert\\Assertion::nullOrMax\(\) invoked with 0 parameters, 2-4 required#'
diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse
index 062d66a3e..1bd2c838c 120000..100755
--- a/vendor/bin/php-parse
+++ b/vendor/bin/php-parse
@@ -1 +1,120 @@
-../nikic/php-parser/bin/php-parse \ No newline at end of file
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';
diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan
index 959384f7f..20451337e 120000..100755
--- a/vendor/bin/phpstan
+++ b/vendor/bin/phpstan
@@ -1 +1,120 @@
-../phpstan/phpstan/phpstan \ No newline at end of file
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../phpstan/phpstan/phpstan)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/phpstan/phpstan/phpstan';
diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar
index 502769bef..caa3e24f8 120000..100755
--- a/vendor/bin/phpstan.phar
+++ b/vendor/bin/phpstan.phar
@@ -1 +1,120 @@
-../phpstan/phpstan/phpstan.phar \ No newline at end of file
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../phpstan/phpstan/phpstan.phar)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar';
diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit
index 2c4893031..e92cddc50 120000..100755
--- a/vendor/bin/phpunit
+++ b/vendor/bin/phpunit
@@ -1 +1,123 @@
-../phpunit/phpunit/phpunit \ No newline at end of file
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../phpunit/phpunit/phpunit)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/phpunit/phpunit/phpunit'));
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = 'phpvfscomposer://'.$this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+ $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
+ $data = str_replace('__FILE__', var_export($this->realpath, true), $data);
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/phpunit/phpunit/phpunit';
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 0cd6055d1..afef3fa2a 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -149,7 +149,7 @@ class ClassLoader
/**
* @return string[] Array of classname => path
- * @psalm-var array<string, string>
+ * @psalm-return array<string, string>
*/
public function getClassMap()
{
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index d50e0c9fc..c6b54af7b 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
- * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
@@ -37,7 +39,7 @@ class InstalledVersions
/**
* @var array[]
- * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
@@ -241,7 +243,7 @@ class InstalledVersions
/**
* @return array
- * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
@@ -255,7 +257,7 @@ class InstalledVersions
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
- * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@@ -278,7 +280,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
@@ -301,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
@@ -311,7 +313,7 @@ class InstalledVersions
/**
* @return array[]
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index fe7d8c4c5..0f1bbc310 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 08a5dedbd..6cdb4a017 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -2,14 +2,13 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
- '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => $vendorDir . '/beberlei/assert/lib/Assert/functions.php',
+ '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => $vendorDir . '/thecodingmachine/safe/deprecated/apc.php',
'47f619d9197b36cf5ab70738d7743fe2' => $vendorDir . '/thecodingmachine/safe/deprecated/libevent.php',
'ea6bb8a12ef9b68f6ada99058e530760' => $vendorDir . '/thecodingmachine/safe/deprecated/mssql.php',
@@ -99,5 +98,6 @@ return array(
'4af1dca6db8c527c6eed27bff85ff0e5' => $vendorDir . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => $vendorDir . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => $vendorDir . '/thecodingmachine/safe/generated/zlib.php',
- '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index b7fc0125d..15a2ff3ad 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 8df0d9930..d818c3598 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -2,11 +2,11 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
- 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'),
+ 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'),
'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 34b3b7ad0..f6be2dd43 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -25,38 +25,15 @@ class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056', 'loadClassLoader'));
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require __DIR__ . '/autoload_static.php';
-
- call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
- } else {
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
-
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
-
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
- }
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::getInitializer($loader));
$loader->register(true);
- if ($useStaticLoader) {
- $includeFiles = Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
- } else {
- $includeFiles = require __DIR__ . '/autoload_files.php';
- }
+ $includeFiles = \Composer\Autoload\ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file);
}
@@ -65,11 +42,16 @@ class ComposerAutoloaderInit19fc2ff1c0f9a92279c7979386bb2056
}
}
+/**
+ * @param string $fileIdentifier
+ * @param string $file
+ * @return void
+ */
function composerRequire19fc2ff1c0f9a92279c7979386bb2056($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
}
}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index de23ec4b4..14f635b92 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -7,10 +7,9 @@ namespace Composer\Autoload;
class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
{
public static $files = array (
- '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
- 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'a4ecaeafb8cfb009ad0e052c90355e98' => __DIR__ . '/..' . '/beberlei/assert/lib/Assert/functions.php',
+ '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'51fcf4e06c07cc00c920b44bcd900e7a' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/apc.php',
'47f619d9197b36cf5ab70738d7743fe2' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/libevent.php',
'ea6bb8a12ef9b68f6ada99058e530760' => __DIR__ . '/..' . '/thecodingmachine/safe/deprecated/mssql.php',
@@ -100,7 +99,8 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'4af1dca6db8c527c6eed27bff85ff0e5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/yaz.php',
'fe43ca06499ac37bc2dedd823af71eb5' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zip.php',
'356736db98a6834f0a886b8d509b0ecd' => __DIR__ . '/..' . '/thecodingmachine/safe/generated/zlib.php',
- '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
+ '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
+ 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
);
public static $prefixLengthsPsr4 = array (
@@ -147,8 +147,8 @@ class ComposerStaticInit19fc2ff1c0f9a92279c7979386bb2056
'phpDocumentor\\Reflection\\' =>
array (
0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
- 1 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
- 2 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
+ 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
+ 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
),
'chillerlan\\Settings\\' =>
array (
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 3a8cda28e..3b8373d07 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2,37 +2,45 @@
"packages": [
{
"name": "beberlei/assert",
- "version": "v3.2.2",
- "version_normalized": "3.2.2.0",
+ "version": "v3.3.2",
+ "version_normalized": "3.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/beberlei/assert.git",
- "reference": "5547e7d03f8c6be121b8b9db6d6ed5a22ffdcb01"
+ "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/beberlei/assert/zipball/5547e7d03f8c6be121b8b9db6d6ed5a22ffdcb01",
- "reference": "5547e7d03f8c6be121b8b9db6d6ed5a22ffdcb01",
+ "url": "https://api.github.com/repos/beberlei/assert/zipball/cb70015c04be1baee6f5f5c953703347c0ac1655",
+ "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655",
"shasum": ""
},
"require": {
- "php": "^7"
+ "ext-ctype": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-simplexml": "*",
+ "php": "^7.0 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
- "phpstan/phpstan-shim": "*",
- "phpunit/phpunit": ">=6.0.0 <8"
+ "phpstan/phpstan": "*",
+ "phpunit/phpunit": ">=6.0.0",
+ "yoast/phpunit-polyfills": "^0.1.0"
+ },
+ "suggest": {
+ "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles"
},
- "time": "2019-08-23T16:04:58+00:00",
+ "time": "2021-12-16T21:41:27+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
- "psr-4": {
- "Assert\\": "lib/Assert"
- },
"files": [
"lib/Assert/functions.php"
- ]
+ ],
+ "psr-4": {
+ "Assert\\": "lib/Assert"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -56,6 +64,10 @@
"assertion",
"validation"
],
+ "support": {
+ "issues": "https://github.com/beberlei/assert/issues",
+ "source": "https://github.com/beberlei/assert/tree/v3.3.2"
+ },
"install-path": "../beberlei/assert"
},
{
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 9441de7c6..de9c0f9c0 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,409 +1,409 @@
<?php return array(
'root' => array(
+ 'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
+ 'reference' => 'b148d2f5153f9711120b3a3ac50ee84509c9cdfb',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => '711662948768492e8d05b778a7d80eacaec368d2',
- 'name' => '__root__',
'dev' => true,
),
'versions' => array(
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
+ 'reference' => 'b148d2f5153f9711120b3a3ac50ee84509c9cdfb',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'reference' => '711662948768492e8d05b778a7d80eacaec368d2',
'dev_requirement' => false,
),
'beberlei/assert' => array(
- 'pretty_version' => 'v3.2.2',
- 'version' => '3.2.2.0',
+ 'pretty_version' => 'v3.3.2',
+ 'version' => '3.3.2.0',
+ 'reference' => 'cb70015c04be1baee6f5f5c953703347c0ac1655',
'type' => 'library',
'install_path' => __DIR__ . '/../beberlei/assert',
'aliases' => array(),
- 'reference' => '5547e7d03f8c6be121b8b9db6d6ed5a22ffdcb01',
'dev_requirement' => false,
),
'chillerlan/php-qrcode' => array(
'pretty_version' => '3.4.1',
'version' => '3.4.1.0',
+ 'reference' => '468603b687a5fe75c1ff33857a45f1726c7b95a9',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-qrcode',
'aliases' => array(),
- 'reference' => '468603b687a5fe75c1ff33857a45f1726c7b95a9',
'dev_requirement' => false,
),
'chillerlan/php-settings-container' => array(
'pretty_version' => '1.2.2',
'version' => '1.2.2.0',
+ 'reference' => 'd1b5284d6eb3a767459738bb0b20073f0cb3eeaf',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-settings-container',
'aliases' => array(),
- 'reference' => 'd1b5284d6eb3a767459738bb0b20073f0cb3eeaf',
'dev_requirement' => false,
),
'doctrine/instantiator' => array(
'pretty_version' => '1.4.1',
'version' => '1.4.1.0',
+ 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/instantiator',
'aliases' => array(),
- 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
'dev_requirement' => true,
),
'j4mie/idiorm' => array(
'pretty_version' => 'v1.5.7',
'version' => '1.5.7.0',
+ 'reference' => 'd23f97053ef5d0b988a02c6a71eb5c6118b2f5b4',
'type' => 'library',
'install_path' => __DIR__ . '/../j4mie/idiorm',
'aliases' => array(),
- 'reference' => 'd23f97053ef5d0b988a02c6a71eb5c6118b2f5b4',
'dev_requirement' => false,
),
'mervick/material-design-icons' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
+ 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
'type' => 'library',
'install_path' => __DIR__ . '/../mervick/material-design-icons',
'aliases' => array(),
- 'reference' => '635435c8d3df3a6da3241648caf8a65d1c07cc1a',
'dev_requirement' => false,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.11.0',
'version' => '1.11.0.0',
+ 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(),
- 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
'dev_requirement' => true,
),
'nikic/php-parser' => array(
'pretty_version' => 'v4.13.2',
'version' => '4.13.2.0',
+ 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
- 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077',
'dev_requirement' => true,
),
'paragonie/constant_time_encoding' => array(
'pretty_version' => 'v2.4.0',
'version' => '2.4.0.0',
+ 'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c',
'type' => 'library',
'install_path' => __DIR__ . '/../paragonie/constant_time_encoding',
'aliases' => array(),
- 'reference' => 'f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c',
'dev_requirement' => false,
),
'phar-io/manifest' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
+ 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/manifest',
'aliases' => array(),
- 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53',
'dev_requirement' => true,
),
'phar-io/version' => array(
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
+ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/version',
'aliases' => array(),
- 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
'dev_requirement' => true,
),
'phpdocumentor/reflection-common' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
+ 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-common',
'aliases' => array(),
- 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
'dev_requirement' => true,
),
'phpdocumentor/reflection-docblock' => array(
'pretty_version' => '5.3.0',
'version' => '5.3.0.0',
+ 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock',
'aliases' => array(),
- 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
'dev_requirement' => true,
),
'phpdocumentor/type-resolver' => array(
'pretty_version' => '1.6.0',
'version' => '1.6.0.0',
+ 'reference' => '93ebd0014cab80c4ea9f5e297ea48672f1b87706',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/type-resolver',
'aliases' => array(),
- 'reference' => '93ebd0014cab80c4ea9f5e297ea48672f1b87706',
'dev_requirement' => true,
),
'phpspec/prophecy' => array(
'pretty_version' => 'v1.15.0',
'version' => '1.15.0.0',
+ 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
'type' => 'library',
'install_path' => __DIR__ . '/../phpspec/prophecy',
'aliases' => array(),
- 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13',
'dev_requirement' => true,
),
'phpstan/phpstan' => array(
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
+ 'reference' => 'bcea0ae85868a89d5789c75f012c93129f842934',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpstan',
'aliases' => array(),
- 'reference' => 'bcea0ae85868a89d5789c75f012c93129f842934',
'dev_requirement' => true,
),
'phpunit/php-code-coverage' => array(
'pretty_version' => '9.2.15',
'version' => '9.2.15.0',
+ 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(),
- 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
'dev_requirement' => true,
),
'phpunit/php-file-iterator' => array(
'pretty_version' => '3.0.6',
'version' => '3.0.6.0',
+ 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
'aliases' => array(),
- 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
'dev_requirement' => true,
),
'phpunit/php-invoker' => array(
'pretty_version' => '3.1.1',
'version' => '3.1.1.0',
+ 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-invoker',
'aliases' => array(),
- 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
'dev_requirement' => true,
),
'phpunit/php-text-template' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
+ 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-text-template',
'aliases' => array(),
- 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
'dev_requirement' => true,
),
'phpunit/php-timer' => array(
'pretty_version' => '5.0.3',
'version' => '5.0.3.0',
+ 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-timer',
'aliases' => array(),
- 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '9.5.16',
'version' => '9.5.16.0',
+ 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
- 'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc',
'dev_requirement' => true,
),
'sebastian/cli-parser' => array(
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
+ 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/cli-parser',
'aliases' => array(),
- 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2',
'dev_requirement' => true,
),
'sebastian/code-unit' => array(
'pretty_version' => '1.0.8',
'version' => '1.0.8.0',
+ 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit',
'aliases' => array(),
- 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
'dev_requirement' => true,
),
'sebastian/code-unit-reverse-lookup' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
+ 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
'aliases' => array(),
- 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
'dev_requirement' => true,
),
'sebastian/comparator' => array(
'pretty_version' => '4.0.6',
'version' => '4.0.6.0',
+ 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
- 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382',
'dev_requirement' => true,
),
'sebastian/complexity' => array(
'pretty_version' => '2.0.2',
'version' => '2.0.2.0',
+ 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/complexity',
'aliases' => array(),
- 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88',
'dev_requirement' => true,
),
'sebastian/diff' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
+ 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(),
- 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d',
'dev_requirement' => true,
),
'sebastian/environment' => array(
'pretty_version' => '5.1.3',
'version' => '5.1.3.0',
+ 'reference' => '388b6ced16caa751030f6a69e588299fa09200ac',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/environment',
'aliases' => array(),
- 'reference' => '388b6ced16caa751030f6a69e588299fa09200ac',
'dev_requirement' => true,
),
'sebastian/exporter' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
+ 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/exporter',
'aliases' => array(),
- 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9',
'dev_requirement' => true,
),
'sebastian/global-state' => array(
'pretty_version' => '5.0.5',
'version' => '5.0.5.0',
+ 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/global-state',
'aliases' => array(),
- 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2',
'dev_requirement' => true,
),
'sebastian/lines-of-code' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
+ 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/lines-of-code',
'aliases' => array(),
- 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc',
'dev_requirement' => true,
),
'sebastian/object-enumerator' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
+ 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-enumerator',
'aliases' => array(),
- 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
'dev_requirement' => true,
),
'sebastian/object-reflector' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
+ 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-reflector',
'aliases' => array(),
- 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
'dev_requirement' => true,
),
'sebastian/recursion-context' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
+ 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/recursion-context',
'aliases' => array(),
- 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172',
'dev_requirement' => true,
),
'sebastian/resource-operations' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
+ 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/resource-operations',
'aliases' => array(),
- 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8',
'dev_requirement' => true,
),
'sebastian/type' => array(
'pretty_version' => '2.3.4',
'version' => '2.3.4.0',
+ 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/type',
'aliases' => array(),
- 'reference' => 'b8cd8a1c753c90bc1a0f5372170e3e489136f914',
'dev_requirement' => true,
),
'sebastian/version' => array(
'pretty_version' => '3.0.2',
'version' => '3.0.2.0',
+ 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/version',
'aliases' => array(),
- 'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
'dev_requirement' => true,
),
'spomky-labs/otphp' => array(
'pretty_version' => 'v10.0.1',
'version' => '10.0.1.0',
+ 'reference' => 'f44cce5a9db4b8da410215d992110482c931232f',
'type' => 'library',
'install_path' => __DIR__ . '/../spomky-labs/otphp',
'aliases' => array(),
- 'reference' => 'f44cce5a9db4b8da410215d992110482c931232f',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.25.0',
'version' => '1.25.0.0',
+ 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
- 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
'dev_requirement' => true,
),
'thecodingmachine/safe' => array(
'pretty_version' => 'v1.3.3',
'version' => '1.3.3.0',
+ 'reference' => 'a8ab0876305a4cdaef31b2350fcb9811b5608dbc',
'type' => 'library',
'install_path' => __DIR__ . '/../thecodingmachine/safe',
'aliases' => array(),
- 'reference' => 'a8ab0876305a4cdaef31b2350fcb9811b5608dbc',
'dev_requirement' => false,
),
'theseer/tokenizer' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
+ 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
'type' => 'library',
'install_path' => __DIR__ . '/../theseer/tokenizer',
'aliases' => array(),
- 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
'dev_requirement' => true,
),
'webmozart/assert' => array(
'pretty_version' => '1.10.0',
'version' => '1.10.0.0',
+ 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25',
'type' => 'library',
'install_path' => __DIR__ . '/../webmozart/assert',
'aliases' => array(),
- 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25',
'dev_requirement' => true,
),
),
diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/nikic/php-parser/bin/php-parse
index bb3e46df4..bb3e46df4 100644..100755
--- a/vendor/nikic/php-parser/bin/php-parse
+++ b/vendor/nikic/php-parser/bin/php-parse
diff --git a/vendor/phpstan/phpstan/phpstan b/vendor/phpstan/phpstan/phpstan
index 7a08ef485..7a08ef485 100644..100755
--- a/vendor/phpstan/phpstan/phpstan
+++ b/vendor/phpstan/phpstan/phpstan
diff --git a/vendor/phpstan/phpstan/phpstan.phar b/vendor/phpstan/phpstan/phpstan.phar
index 306020e3a..306020e3a 100644..100755
--- a/vendor/phpstan/phpstan/phpstan.phar
+++ b/vendor/phpstan/phpstan/phpstan.phar
Binary files differ
diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit
index c80295668..c80295668 100644..100755
--- a/vendor/phpunit/phpunit/phpunit
+++ b/vendor/phpunit/phpunit/phpunit