Assert in package Default Uses Mixin Efficient assertions to validate the input/output of your methods. Tags since 1.0 author Bernhard Schussek bschussek@gmail.com Table of Contents __callStatic() : mixed allAlnum() : void allAlpha() : void allBoolean() : void allClassExists() : void allContains() : void allCount() : void allCountBetween() : void allDigits() : void allDirectory() : void allEmail() : void allEndsWith() : void allEq() : void allFalse() : void allFile() : void allFileExists() : void allFloat() : void allGreaterThan() : void allGreaterThanEq() : void allImplementsInterface() : void allInArray() : void allInteger() : void allIntegerish() : void allInterfaceExists() : void allIp() : void allIpv4() : void allIpv6() : void allIsAnyOf() : void allIsAOf() : void allIsArray() : void allIsArrayAccessible() : void allIsCallable() : void allIsCountable() : void allIsEmpty() : void allIsInstanceOf() : void allIsInstanceOfAny() : void allIsIterable() : void allIsList() : void allIsMap() : void allIsNonEmptyList() : void allIsNonEmptyMap() : void allIsNotA() : void allIsTraversable() : void allKeyExists() : void allKeyNotExists() : void allLength() : void allLengthBetween() : void allLessThan() : void allLessThanEq() : void allLower() : void allMaxCount() : void allMaxLength() : void allMethodExists() : void allMethodNotExists() : void allMinCount() : void allMinLength() : void allNatural() : void allNotContains() : void allNotEmpty() : void allNotEndsWith() : void allNotEq() : void allNotFalse() : void allNotInstanceOf() : void allNotNull() : void allNotRegex() : void allNotSame() : void allNotStartsWith() : void allNotWhitespaceOnly() : void allNull() : void allNumeric() : void allObject() : void allOneOf() : void allPositiveInteger() : void allPropertyExists() : void allPropertyNotExists() : void allRange() : void allReadable() : void allRegex() : void allResource() : void allSame() : void allScalar() : void allStartsWith() : void allStartsWithLetter() : void allString() : void allStringNotEmpty() : void allSubclassOf() : void allThrows() : void allTrue() : void allUnicodeLetters() : void allUniqueValues() : void allUpper() : void allUuid() : void allValidArrayKey() : void allWritable() : void alnum() : mixed alpha() : mixed boolean() : mixed classExists() : mixed contains() : mixed count() : mixed Does not check if $array is countable, this can generate a warning on php versions after 7.2. countBetween() : mixed Does not check if $array is countable, this can generate a warning on php versions after 7.2. digits() : mixed directory() : mixed email() : mixed endsWith() : mixed eq() : mixed false() : mixed file() : mixed fileExists() : mixed Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. float() : mixed greaterThan() : mixed greaterThanEq() : mixed implementsInterface() : mixed inArray() : mixed Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. integer() : mixed integerish() : mixed interfaceExists() : mixed ip() : mixed ipv4() : mixed ipv6() : mixed isAnyOf() : mixed isAOf() : mixed isArray() : mixed isArrayAccessible() : mixed isCallable() : mixed isCountable() : mixed isEmpty() : mixed isInstanceOf() : mixed isInstanceOfAny() : mixed isIterable() : mixed isList() : mixed isMap() : mixed isNonEmptyList() : mixed isNonEmptyMap() : mixed isNotA() : mixed isTraversable() : mixed keyExists() : mixed keyNotExists() : mixed length() : mixed lengthBetween() : mixed Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. lessThan() : mixed lessThanEq() : mixed lower() : mixed maxCount() : mixed Does not check if $array is countable, this can generate a warning on php versions after 7.2. maxLength() : mixed Inclusive max. methodExists() : mixed methodNotExists() : mixed minCount() : mixed Does not check if $array is countable, this can generate a warning on php versions after 7.2. minLength() : mixed Inclusive min. natural() : mixed notContains() : mixed notEmpty() : mixed notEndsWith() : mixed notEq() : mixed notFalse() : mixed notInstanceOf() : mixed notNull() : mixed notRegex() : mixed notSame() : mixed notStartsWith() : mixed notWhitespaceOnly() : mixed null() : mixed nullOrAlnum() : void nullOrAlpha() : void nullOrBoolean() : void nullOrClassExists() : void nullOrContains() : void nullOrCount() : void nullOrCountBetween() : void nullOrDigits() : void nullOrDirectory() : void nullOrEmail() : void nullOrEndsWith() : void nullOrEq() : void nullOrFalse() : void nullOrFile() : void nullOrFileExists() : void nullOrFloat() : void nullOrGreaterThan() : void nullOrGreaterThanEq() : void nullOrImplementsInterface() : void nullOrInArray() : void nullOrInteger() : void nullOrIntegerish() : void nullOrInterfaceExists() : void nullOrIp() : void nullOrIpv4() : void nullOrIpv6() : void nullOrIsAnyOf() : void nullOrIsAOf() : void nullOrIsArray() : void nullOrIsArrayAccessible() : void nullOrIsCallable() : void nullOrIsCountable() : void nullOrIsEmpty() : void nullOrIsInstanceOf() : void nullOrIsInstanceOfAny() : void nullOrIsIterable() : void nullOrIsList() : void nullOrIsMap() : void nullOrIsNonEmptyList() : void nullOrIsNonEmptyMap() : void nullOrIsNotA() : void nullOrIsTraversable() : void nullOrKeyExists() : void nullOrKeyNotExists() : void nullOrLength() : void nullOrLengthBetween() : void nullOrLessThan() : void nullOrLessThanEq() : void nullOrLower() : void nullOrMaxCount() : void nullOrMaxLength() : void nullOrMethodExists() : void nullOrMethodNotExists() : void nullOrMinCount() : void nullOrMinLength() : void nullOrNatural() : void nullOrNotContains() : void nullOrNotEmpty() : void nullOrNotEndsWith() : void nullOrNotEq() : void nullOrNotFalse() : void nullOrNotInstanceOf() : void nullOrNotRegex() : void nullOrNotSame() : void nullOrNotStartsWith() : void nullOrNotWhitespaceOnly() : void nullOrNumeric() : void nullOrObject() : void nullOrOneOf() : void nullOrPositiveInteger() : void nullOrPropertyExists() : void nullOrPropertyNotExists() : void nullOrRange() : void nullOrReadable() : void nullOrRegex() : void nullOrResource() : void nullOrSame() : void nullOrScalar() : void nullOrStartsWith() : void nullOrStartsWithLetter() : void nullOrString() : void nullOrStringNotEmpty() : void nullOrSubclassOf() : void nullOrThrows() : void nullOrTrue() : void nullOrUnicodeLetters() : void nullOrUniqueValues() : void nullOrUpper() : void nullOrUuid() : void nullOrValidArrayKey() : void nullOrWritable() : void numeric() : mixed object() : mixed oneOf() : mixed A more human-readable alias of Assert::inArray(). positiveInteger() : mixed propertyExists() : mixed propertyNotExists() : mixed range() : mixed Inclusive range, so Assert::(3, 3, 5) passes. readable() : mixed regex() : mixed resource() : mixed same() : mixed scalar() : mixed startsWith() : mixed startsWithLetter() : mixed string() : mixed stringNotEmpty() : mixed subclassOf() : mixed throws() : mixed true() : mixed unicodeLetters() : mixed uniqueValues() : mixed Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. upper() : mixed uuid() : mixed validArrayKey() : mixed Checks if a value is a valid array key (int or string). writable() : mixed reportInvalidArgument() : mixed strlen() : mixed typeToString() : string valueToString() : string __construct() : mixed Methods __callStatic() public static __callStatic(mixed $name, mixed $arguments) : mixed Parameters $name : mixed $arguments : mixed Tags throws BadMethodCallException Return values mixed — allAlnum() public static allAlnum(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allAlpha() public static allAlpha(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allBoolean() public static allBoolean(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allClassExists() public static allClassExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert iterable $value throws InvalidArgumentException Return values void — allContains() public static allContains(iteratable<string|int, string> $value, string $subString[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allCount() public static allCount(iteratable<string|int, \Countable|array> $array, int $number[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $number : int $message : string = '' Tags throws InvalidArgumentException Return values void — allCountBetween() public static allCountBetween(iteratable<string|int, \Countable|array> $array, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — allDigits() public static allDigits(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allDirectory() public static allDirectory(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allEmail() public static allEmail(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allEndsWith() public static allEndsWith(iteratable<string|int, string> $value, string $suffix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allEq() public static allEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allFalse() public static allFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allFile() public static allFile(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allFileExists() public static allFileExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allFloat() public static allFloat(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allGreaterThan() public static allGreaterThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allGreaterThanEq() public static allGreaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allImplementsInterface() public static allImplementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : void Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert iterable<class-string> $value throws InvalidArgumentException Return values void — allInArray() public static allInArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allInteger() public static allInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIntegerish() public static allIntegerish(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allInterfaceExists() public static allInterfaceExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert iterable $value throws InvalidArgumentException Return values void — allIp() public static allIp(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allIpv4() public static allIpv4(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allIpv6() public static allIpv6(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allIsAnyOf() public static allIsAnyOf(iteratable<string|int, object|string> $value, array<string|int, string> $classes[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — allIsAOf() public static allIsAOf(iteratable<string|int, object|string> $value, string $class[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable<ExpectedType|class-string> $value throws InvalidArgumentException Return values void — allIsArray() public static allIsArray(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsArrayAccessible() public static allIsArrayAccessible(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable<array|ArrayAccess> $value throws InvalidArgumentException Return values void — allIsCallable() public static allIsCallable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsCountable() public static allIsCountable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsEmpty() public static allIsEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsInstanceOf() public static allIsInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsInstanceOfAny() public static allIsInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : void Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — allIsIterable() public static allIsIterable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allIsList() public static allIsList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $array throws InvalidArgumentException Return values void — allIsMap() public static allIsMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param iterable<mixed|array> $array psalm-assert iterable<array<string, T>> $array throws InvalidArgumentException Return values void — allIsNonEmptyList() public static allIsNonEmptyList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $array throws InvalidArgumentException Return values void — allIsNonEmptyMap() public static allIsNonEmptyMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param iterable<mixed|array> $array throws InvalidArgumentException Return values void — allIsNotA() public static allIsNotA(iteratable<string|int, object|string> $value, string $class[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — allIsTraversable() public static allIsTraversable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values void — allKeyExists() public static allKeyExists(iteratable<string|int, array<string|int, mixed>> $array, string|int $key[, string $message = '' ]) : void Parameters $array : iteratable<string|int, array<string|int, mixed>> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allKeyNotExists() public static allKeyNotExists(iteratable<string|int, array<string|int, mixed>> $array, string|int $key[, string $message = '' ]) : void Parameters $array : iteratable<string|int, array<string|int, mixed>> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allLength() public static allLength(iteratable<string|int, string> $value, int $length[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allLengthBetween() public static allLengthBetween(iteratable<string|int, string> $value, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allLessThan() public static allLessThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allLessThanEq() public static allLessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allLower() public static allLower(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allMaxCount() public static allMaxCount(iteratable<string|int, \Countable|array> $array, int|float $max[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — allMaxLength() public static allMaxLength(iteratable<string|int, string> $value, int|float $max[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allMethodExists() public static allMethodExists(iteratable<string|int, string|object> $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $method : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allMethodNotExists() public static allMethodNotExists(iteratable<string|int, string|object> $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $method : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allMinCount() public static allMinCount(iteratable<string|int, \Countable|array> $array, int|float $min[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — allMinLength() public static allMinLength(iteratable<string|int, string> $value, int|float $min[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNatural() public static allNatural(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable<positive-int|0> $value throws InvalidArgumentException Return values void — allNotContains() public static allNotContains(iteratable<string|int, string> $value, string $subString[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotEmpty() public static allNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotEndsWith() public static allNotEndsWith(iteratable<string|int, string> $value, string $suffix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotEq() public static allNotEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — allNotFalse() public static allNotFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotInstanceOf() public static allNotInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — allNotNull() public static allNotNull(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotRegex() public static allNotRegex(iteratable<string|int, string> $value, string $pattern[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotSame() public static allNotSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotStartsWith() public static allNotStartsWith(iteratable<string|int, string> $value, string $prefix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNotWhitespaceOnly() public static allNotWhitespaceOnly(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allNull() public static allNull(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allNumeric() public static allNumeric(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allObject() public static allObject(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allOneOf() public static allOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allPositiveInteger() public static allPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allPropertyExists() public static allPropertyExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allPropertyNotExists() public static allPropertyNotExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allRange() public static allRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allReadable() public static allReadable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void — allRegex() public static allRegex(iteratable<string|int, string> $value, string $pattern[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allResource() public static allResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allSame() public static allSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allScalar() public static allScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allStartsWith() public static allStartsWith(iteratable<string|int, string> $value, string $prefix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allStartsWithLetter() public static allStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allString() public static allString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allStringNotEmpty() public static allStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allSubclassOf() public static allSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable<class-string|ExpectedType> $value throws InvalidArgumentException Return values void — allThrows() public static allThrows(iteratable<string|int, Closure> $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : iteratable<string|int, Closure> $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void — allTrue() public static allTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allUnicodeLetters() public static allUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allUniqueValues() public static allUniqueValues(iteratable<string|int, array<string|int, mixed>> $values[, string $message = '' ]) : void Parameters $values : iteratable<string|int, array<string|int, mixed>> $message : string = '' Tags throws InvalidArgumentException Return values void — allUpper() public static allUpper(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allUuid() public static allUuid(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allValidArrayKey() public static allValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allWritable() public static allWritable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void — alnum() public static alnum(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — alpha() public static alpha(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — boolean() public static boolean(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool $value throws InvalidArgumentException Return values mixed — classExists() public static classExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed — contains() public static contains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — count() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static count(Countable|array<string|int, mixed> $array, int $number[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $number : int $message : string = '' Tags throws InvalidArgumentException Return values mixed — countBetween() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static countBetween(Countable|array<string|int, mixed> $array, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — digits() public static digits(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — directory() public static directory(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — email() public static email(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — endsWith() public static endsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — eq() public static eq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — false() public static false(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false $value throws InvalidArgumentException Return values mixed — file() public static file(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — fileExists() Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. public static fileExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — float() public static float(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float $value throws InvalidArgumentException Return values mixed — greaterThan() public static greaterThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — greaterThanEq() public static greaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — implementsInterface() public static implementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : mixed Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string $value throws InvalidArgumentException Return values mixed — inArray() Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. public static inArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — integer() public static integer(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int $value throws InvalidArgumentException Return values mixed — integerish() public static integerish(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed — interfaceExists() public static interfaceExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed — ip() public static ip(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — ipv4() public static ipv4(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — ipv6() public static ipv6(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — isAnyOf() public static isAnyOf(object|string $value, array<string|int, string> $classes[, string $message = '' ]) : mixed Parameters $value : object|string $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed — isAOf() public static isAOf(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string $value throws InvalidArgumentException Return values mixed — isArray() public static isArray(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array $value throws InvalidArgumentException Return values mixed — isArrayAccessible() public static isArrayAccessible(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess $value throws InvalidArgumentException Return values mixed — isCallable() public static isCallable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable $value throws InvalidArgumentException Return values mixed — isCountable() public static isCountable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable $value throws InvalidArgumentException Return values mixed — isEmpty() public static isEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values mixed — isInstanceOf() public static isInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType $value throws InvalidArgumentException Return values mixed — isInstanceOfAny() public static isInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : mixed Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed — isIterable() public static isIterable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values mixed — isList() public static isList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list $array throws InvalidArgumentException Return values mixed — isMap() public static isMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array throws InvalidArgumentException Return values mixed — isNonEmptyList() public static isNonEmptyList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list $array throws InvalidArgumentException Return values mixed — isNonEmptyMap() public static isNonEmptyMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array psalm-assert !empty $array throws InvalidArgumentException Return values mixed — isNotA() public static isNotA(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class psalm-assert !UnexpectedType $value psalm-assert !class-string $value throws InvalidArgumentException Return values mixed — isTraversable() public static isTraversable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values mixed — keyExists() public static keyExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — keyNotExists() public static keyNotExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — length() public static length(string $value, int $length[, string $message = '' ]) : mixed Parameters $value : string $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lengthBetween() Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. public static lengthBetween(string $value, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lessThan() public static lessThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lessThanEq() public static lessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lower() public static lower(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert lowercase-string $value throws InvalidArgumentException Return values mixed — maxCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static maxCount(Countable|array<string|int, mixed> $array, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — maxLength() Inclusive max. public static maxLength(string $value, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — methodExists() public static methodExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — methodNotExists() public static methodNotExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — minCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static minCount(Countable|array<string|int, mixed> $array, int|float $min[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — minLength() Inclusive min. public static minLength(string $value, int|float $min[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — natural() public static natural(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0 $value throws InvalidArgumentException Return values mixed — notContains() public static notContains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notEmpty() public static notEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !empty $value throws InvalidArgumentException Return values mixed — notEndsWith() public static notEndsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notEq() public static notEq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — notFalse() public static notFalse(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !false $value throws InvalidArgumentException Return values mixed — notInstanceOf() public static notInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert !ExpectedType $value throws InvalidArgumentException Return values mixed — notNull() public static notNull(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !null $value throws InvalidArgumentException Return values mixed — notRegex() public static notRegex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notSame() public static notSame(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notStartsWith() public static notStartsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notWhitespaceOnly() public static notWhitespaceOnly(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — null() public static null(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert null $value throws InvalidArgumentException Return values mixed — nullOrAlnum() public static nullOrAlnum(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrAlpha() public static nullOrAlpha(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrBoolean() public static nullOrBoolean(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool|null $value throws InvalidArgumentException Return values void — nullOrClassExists() public static nullOrClassExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrContains() public static nullOrContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrCount() public static nullOrCount(Countable|array<string|int, mixed>|null $array, int $number[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $number : int $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrCountBetween() public static nullOrCountBetween(Countable|array<string|int, mixed>|null $array, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrDigits() public static nullOrDigits(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrDirectory() public static nullOrDirectory(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrEmail() public static nullOrEmail(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrEndsWith() public static nullOrEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrEq() public static nullOrEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFalse() public static nullOrFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false|null $value throws InvalidArgumentException Return values void — nullOrFile() public static nullOrFile(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFileExists() public static nullOrFileExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFloat() public static nullOrFloat(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float|null $value throws InvalidArgumentException Return values void — nullOrGreaterThan() public static nullOrGreaterThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrGreaterThanEq() public static nullOrGreaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrImplementsInterface() public static nullOrImplementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : void Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrInArray() public static nullOrInArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrInteger() public static nullOrInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int|null $value throws InvalidArgumentException Return values void — nullOrIntegerish() public static nullOrIntegerish(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void — nullOrInterfaceExists() public static nullOrInterfaceExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrIp() public static nullOrIp(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIpv4() public static nullOrIpv4(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIpv6() public static nullOrIpv6(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIsAnyOf() public static nullOrIsAnyOf(object|string|null $value, array<string|int, string> $classes[, string $message = '' ]) : void Parameters $value : object|string|null $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — nullOrIsAOf() public static nullOrIsAOf(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string|null $value throws InvalidArgumentException Return values void — nullOrIsArray() public static nullOrIsArray(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|null $value throws InvalidArgumentException Return values void — nullOrIsArrayAccessible() public static nullOrIsArrayAccessible(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess|null $value throws InvalidArgumentException Return values void — nullOrIsCallable() public static nullOrIsCallable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable|null $value throws InvalidArgumentException Return values void — nullOrIsCountable() public static nullOrIsCountable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable|null $value throws InvalidArgumentException Return values void — nullOrIsEmpty() public static nullOrIsEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values void — nullOrIsInstanceOf() public static nullOrIsInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|null $value throws InvalidArgumentException Return values void — nullOrIsInstanceOfAny() public static nullOrIsInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : void Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — nullOrIsIterable() public static nullOrIsIterable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value throws InvalidArgumentException Return values void — nullOrIsList() public static nullOrIsList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list|null $array throws InvalidArgumentException Return values void — nullOrIsMap() public static nullOrIsMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array psalm-assert array<string, T>|null $array throws InvalidArgumentException Return values void — nullOrIsNonEmptyList() public static nullOrIsNonEmptyList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list|null $array throws InvalidArgumentException Return values void — nullOrIsNonEmptyMap() public static nullOrIsNonEmptyMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array throws InvalidArgumentException Return values void — nullOrIsNotA() public static nullOrIsNotA(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrIsTraversable() public static nullOrIsTraversable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values void — nullOrKeyExists() public static nullOrKeyExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrKeyNotExists() public static nullOrKeyNotExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLength() public static nullOrLength(string|null $value, int $length[, string $message = '' ]) : void Parameters $value : string|null $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLengthBetween() public static nullOrLengthBetween(string|null $value, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLessThan() public static nullOrLessThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLessThanEq() public static nullOrLessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLower() public static nullOrLower(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure psalm-assert lowercase-string|null $value throws InvalidArgumentException Return values void — nullOrMaxCount() public static nullOrMaxCount(Countable|array<string|int, mixed>|null $array, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrMaxLength() public static nullOrMaxLength(string|null $value, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrMethodExists() public static nullOrMethodExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrMethodNotExists() public static nullOrMethodNotExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrMinCount() public static nullOrMinCount(Countable|array<string|int, mixed>|null $array, int|float $min[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrMinLength() public static nullOrMinLength(string|null $value, int|float $min[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNatural() public static nullOrNatural(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0|null $value throws InvalidArgumentException Return values void — nullOrNotContains() public static nullOrNotContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEmpty() public static nullOrNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEndsWith() public static nullOrNotEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEq() public static nullOrNotEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrNotFalse() public static nullOrNotFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotInstanceOf() public static nullOrNotInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrNotRegex() public static nullOrNotRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotSame() public static nullOrNotSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotStartsWith() public static nullOrNotStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotWhitespaceOnly() public static nullOrNotWhitespaceOnly(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNumeric() public static nullOrNumeric(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void — nullOrObject() public static nullOrObject(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object|null $value throws InvalidArgumentException Return values void — nullOrOneOf() public static nullOrOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrPositiveInteger() public static nullOrPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|null $value throws InvalidArgumentException Return values void — nullOrPropertyExists() public static nullOrPropertyExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrPropertyNotExists() public static nullOrPropertyNotExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrRange() public static nullOrRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrReadable() public static nullOrReadable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrRegex() public static nullOrRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrResource() public static nullOrResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource|null $value throws InvalidArgumentException Return values void — nullOrSame() public static nullOrSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrScalar() public static nullOrScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar|null $value throws InvalidArgumentException Return values void — nullOrStartsWith() public static nullOrStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrStartsWithLetter() public static nullOrStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrString() public static nullOrString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string|null $value throws InvalidArgumentException Return values void — nullOrStringNotEmpty() public static nullOrStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string|null $value throws InvalidArgumentException Return values void — nullOrSubclassOf() public static nullOrSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType|null $value throws InvalidArgumentException Return values void — nullOrThrows() public static nullOrThrows(Closure|null $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : Closure|null $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrTrue() public static nullOrTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true|null $value throws InvalidArgumentException Return values void — nullOrUnicodeLetters() public static nullOrUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrUniqueValues() public static nullOrUniqueValues(array<string|int, mixed>|null $values[, string $message = '' ]) : void Parameters $values : array<string|int, mixed>|null $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrUpper() public static nullOrUpper(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrUuid() public static nullOrUuid(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrValidArrayKey() public static nullOrValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key|null $value throws InvalidArgumentException Return values void — nullOrWritable() public static nullOrWritable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void — numeric() public static numeric(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed — object() public static object(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object $value throws InvalidArgumentException Return values mixed — oneOf() A more human-readable alias of Assert::inArray(). public static oneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — positiveInteger() public static positiveInteger(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int $value throws InvalidArgumentException Return values mixed — propertyExists() public static propertyExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — propertyNotExists() public static propertyNotExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — range() Inclusive range, so Assert::(3, 3, 5) passes. public static range(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : mixed Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — readable() public static readable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed — regex() public static regex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — resource() public static resource(mixed $value[, string|null $type = null ][, string $message = '' ]) : mixed Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource $value throws InvalidArgumentException Return values mixed — same() public static same(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — scalar() public static scalar(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar $value throws InvalidArgumentException Return values mixed — startsWith() public static startsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — startsWithLetter() public static startsWithLetter(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — string() public static string(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string $value throws InvalidArgumentException Return values mixed — stringNotEmpty() public static stringNotEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string $value throws InvalidArgumentException Return values mixed — subclassOf() public static subclassOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType $value throws InvalidArgumentException Return values mixed — throws() public static throws(Closure $expression[, string $class = 'Exception' ][, string $message = '' ]) : mixed Parameters $expression : Closure $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values mixed — true() public static true(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true $value throws InvalidArgumentException Return values mixed — unicodeLetters() public static unicodeLetters(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — uniqueValues() Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. public static uniqueValues(array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $values : array<string|int, mixed> $message : string = '' Tags throws InvalidArgumentException Return values mixed — upper() public static upper(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert !lowercase-string $value throws InvalidArgumentException Return values mixed — uuid() public static uuid(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — validArrayKey() Checks if a value is a valid array key (int or string). public static validArrayKey(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key $value throws InvalidArgumentException Return values mixed — writable() public static writable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed — reportInvalidArgument() protected static reportInvalidArgument(string $message) : mixed Parameters $message : string Tags throws InvalidArgumentException psalm-pure this method is not supposed to perform side-effects Return values mixed — strlen() protected static strlen(mixed $value) : mixed Parameters $value : mixed Return values mixed — typeToString() protected static typeToString(mixed $value) : string Parameters $value : mixed Return values string — valueToString() protected static valueToString(mixed $value) : string Parameters $value : mixed Return values string — __construct() private __construct() : mixed Return values mixed — Search results
__callStatic() public static __callStatic(mixed $name, mixed $arguments) : mixed Parameters $name : mixed $arguments : mixed Tags throws BadMethodCallException Return values mixed —
allAlnum() public static allAlnum(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allAlpha() public static allAlpha(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allBoolean() public static allBoolean(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allClassExists() public static allClassExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert iterable $value throws InvalidArgumentException Return values void —
allContains() public static allContains(iteratable<string|int, string> $value, string $subString[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allCount() public static allCount(iteratable<string|int, \Countable|array> $array, int $number[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $number : int $message : string = '' Tags throws InvalidArgumentException Return values void —
allCountBetween() public static allCountBetween(iteratable<string|int, \Countable|array> $array, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
allDigits() public static allDigits(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allDirectory() public static allDirectory(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allEmail() public static allEmail(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allEndsWith() public static allEndsWith(iteratable<string|int, string> $value, string $suffix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allEq() public static allEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allFalse() public static allFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allFile() public static allFile(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allFileExists() public static allFileExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allFloat() public static allFloat(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allGreaterThan() public static allGreaterThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allGreaterThanEq() public static allGreaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allImplementsInterface() public static allImplementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : void Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert iterable<class-string> $value throws InvalidArgumentException Return values void —
allInArray() public static allInArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allInteger() public static allInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIntegerish() public static allIntegerish(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allInterfaceExists() public static allInterfaceExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIp() public static allIp(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allIpv4() public static allIpv4(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allIpv6() public static allIpv6(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allIsAnyOf() public static allIsAnyOf(iteratable<string|int, object|string> $value, array<string|int, string> $classes[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void —
allIsAOf() public static allIsAOf(iteratable<string|int, object|string> $value, string $class[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable<ExpectedType|class-string> $value throws InvalidArgumentException Return values void —
allIsArray() public static allIsArray(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsArrayAccessible() public static allIsArrayAccessible(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable<array|ArrayAccess> $value throws InvalidArgumentException Return values void —
allIsCallable() public static allIsCallable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsCountable() public static allIsCountable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsEmpty() public static allIsEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsInstanceOf() public static allIsInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsInstanceOfAny() public static allIsInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : void Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void —
allIsIterable() public static allIsIterable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allIsList() public static allIsList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $array throws InvalidArgumentException Return values void —
allIsMap() public static allIsMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param iterable<mixed|array> $array psalm-assert iterable<array<string, T>> $array throws InvalidArgumentException Return values void —
allIsNonEmptyList() public static allIsNonEmptyList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $array throws InvalidArgumentException Return values void —
allIsNonEmptyMap() public static allIsNonEmptyMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param iterable<mixed|array> $array throws InvalidArgumentException Return values void —
allIsNotA() public static allIsNotA(iteratable<string|int, object|string> $value, string $class[, string $message = '' ]) : void Parameters $value : iteratable<string|int, object|string> $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void —
allIsTraversable() public static allIsTraversable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values void —
allKeyExists() public static allKeyExists(iteratable<string|int, array<string|int, mixed>> $array, string|int $key[, string $message = '' ]) : void Parameters $array : iteratable<string|int, array<string|int, mixed>> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allKeyNotExists() public static allKeyNotExists(iteratable<string|int, array<string|int, mixed>> $array, string|int $key[, string $message = '' ]) : void Parameters $array : iteratable<string|int, array<string|int, mixed>> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allLength() public static allLength(iteratable<string|int, string> $value, int $length[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allLengthBetween() public static allLengthBetween(iteratable<string|int, string> $value, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allLessThan() public static allLessThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allLessThanEq() public static allLessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allLower() public static allLower(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allMaxCount() public static allMaxCount(iteratable<string|int, \Countable|array> $array, int|float $max[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
allMaxLength() public static allMaxLength(iteratable<string|int, string> $value, int|float $max[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allMethodExists() public static allMethodExists(iteratable<string|int, string|object> $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $method : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void —
allMethodNotExists() public static allMethodNotExists(iteratable<string|int, string|object> $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $method : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void —
allMinCount() public static allMinCount(iteratable<string|int, \Countable|array> $array, int|float $min[, string $message = '' ]) : void Parameters $array : iteratable<string|int, \Countable|array> $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
allMinLength() public static allMinLength(iteratable<string|int, string> $value, int|float $min[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNatural() public static allNatural(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable<positive-int|0> $value throws InvalidArgumentException Return values void —
allNotContains() public static allNotContains(iteratable<string|int, string> $value, string $subString[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotEmpty() public static allNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotEndsWith() public static allNotEndsWith(iteratable<string|int, string> $value, string $suffix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotEq() public static allNotEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
allNotFalse() public static allNotFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotInstanceOf() public static allNotInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void —
allNotNull() public static allNotNull(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotRegex() public static allNotRegex(iteratable<string|int, string> $value, string $pattern[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotSame() public static allNotSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotStartsWith() public static allNotStartsWith(iteratable<string|int, string> $value, string $prefix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNotWhitespaceOnly() public static allNotWhitespaceOnly(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allNull() public static allNull(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allNumeric() public static allNumeric(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allObject() public static allObject(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allOneOf() public static allOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allPositiveInteger() public static allPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allPropertyExists() public static allPropertyExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allPropertyNotExists() public static allPropertyNotExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void — allRange() public static allRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allReadable() public static allReadable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void — allRegex() public static allRegex(iteratable<string|int, string> $value, string $pattern[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allResource() public static allResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allSame() public static allSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allScalar() public static allScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allStartsWith() public static allStartsWith(iteratable<string|int, string> $value, string $prefix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allStartsWithLetter() public static allStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allString() public static allString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allStringNotEmpty() public static allStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allSubclassOf() public static allSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable<class-string|ExpectedType> $value throws InvalidArgumentException Return values void — allThrows() public static allThrows(iteratable<string|int, Closure> $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : iteratable<string|int, Closure> $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void — allTrue() public static allTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allUnicodeLetters() public static allUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allUniqueValues() public static allUniqueValues(iteratable<string|int, array<string|int, mixed>> $values[, string $message = '' ]) : void Parameters $values : iteratable<string|int, array<string|int, mixed>> $message : string = '' Tags throws InvalidArgumentException Return values void — allUpper() public static allUpper(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allUuid() public static allUuid(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — allValidArrayKey() public static allValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void — allWritable() public static allWritable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void — alnum() public static alnum(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — alpha() public static alpha(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — boolean() public static boolean(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool $value throws InvalidArgumentException Return values mixed — classExists() public static classExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed — contains() public static contains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — count() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static count(Countable|array<string|int, mixed> $array, int $number[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $number : int $message : string = '' Tags throws InvalidArgumentException Return values mixed — countBetween() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static countBetween(Countable|array<string|int, mixed> $array, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — digits() public static digits(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — directory() public static directory(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — email() public static email(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — endsWith() public static endsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — eq() public static eq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — false() public static false(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false $value throws InvalidArgumentException Return values mixed — file() public static file(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — fileExists() Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. public static fileExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — float() public static float(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float $value throws InvalidArgumentException Return values mixed — greaterThan() public static greaterThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — greaterThanEq() public static greaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — implementsInterface() public static implementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : mixed Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string $value throws InvalidArgumentException Return values mixed — inArray() Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. public static inArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — integer() public static integer(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int $value throws InvalidArgumentException Return values mixed — integerish() public static integerish(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed — interfaceExists() public static interfaceExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed — ip() public static ip(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — ipv4() public static ipv4(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — ipv6() public static ipv6(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — isAnyOf() public static isAnyOf(object|string $value, array<string|int, string> $classes[, string $message = '' ]) : mixed Parameters $value : object|string $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed — isAOf() public static isAOf(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string $value throws InvalidArgumentException Return values mixed — isArray() public static isArray(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array $value throws InvalidArgumentException Return values mixed — isArrayAccessible() public static isArrayAccessible(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess $value throws InvalidArgumentException Return values mixed — isCallable() public static isCallable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable $value throws InvalidArgumentException Return values mixed — isCountable() public static isCountable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable $value throws InvalidArgumentException Return values mixed — isEmpty() public static isEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values mixed — isInstanceOf() public static isInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType $value throws InvalidArgumentException Return values mixed — isInstanceOfAny() public static isInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : mixed Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed — isIterable() public static isIterable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values mixed — isList() public static isList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list $array throws InvalidArgumentException Return values mixed — isMap() public static isMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array throws InvalidArgumentException Return values mixed — isNonEmptyList() public static isNonEmptyList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list $array throws InvalidArgumentException Return values mixed — isNonEmptyMap() public static isNonEmptyMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array psalm-assert !empty $array throws InvalidArgumentException Return values mixed — isNotA() public static isNotA(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class psalm-assert !UnexpectedType $value psalm-assert !class-string $value throws InvalidArgumentException Return values mixed — isTraversable() public static isTraversable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values mixed — keyExists() public static keyExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — keyNotExists() public static keyNotExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — length() public static length(string $value, int $length[, string $message = '' ]) : mixed Parameters $value : string $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lengthBetween() Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. public static lengthBetween(string $value, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lessThan() public static lessThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lessThanEq() public static lessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — lower() public static lower(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert lowercase-string $value throws InvalidArgumentException Return values mixed — maxCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static maxCount(Countable|array<string|int, mixed> $array, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — maxLength() Inclusive max. public static maxLength(string $value, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — methodExists() public static methodExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — methodNotExists() public static methodNotExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — minCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static minCount(Countable|array<string|int, mixed> $array, int|float $min[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed — minLength() Inclusive min. public static minLength(string $value, int|float $min[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — natural() public static natural(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0 $value throws InvalidArgumentException Return values mixed — notContains() public static notContains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notEmpty() public static notEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !empty $value throws InvalidArgumentException Return values mixed — notEndsWith() public static notEndsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notEq() public static notEq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed — notFalse() public static notFalse(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !false $value throws InvalidArgumentException Return values mixed — notInstanceOf() public static notInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert !ExpectedType $value throws InvalidArgumentException Return values mixed — notNull() public static notNull(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !null $value throws InvalidArgumentException Return values mixed — notRegex() public static notRegex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notSame() public static notSame(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notStartsWith() public static notStartsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — notWhitespaceOnly() public static notWhitespaceOnly(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — null() public static null(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert null $value throws InvalidArgumentException Return values mixed — nullOrAlnum() public static nullOrAlnum(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrAlpha() public static nullOrAlpha(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrBoolean() public static nullOrBoolean(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool|null $value throws InvalidArgumentException Return values void — nullOrClassExists() public static nullOrClassExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrContains() public static nullOrContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrCount() public static nullOrCount(Countable|array<string|int, mixed>|null $array, int $number[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $number : int $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrCountBetween() public static nullOrCountBetween(Countable|array<string|int, mixed>|null $array, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrDigits() public static nullOrDigits(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrDirectory() public static nullOrDirectory(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrEmail() public static nullOrEmail(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrEndsWith() public static nullOrEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrEq() public static nullOrEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFalse() public static nullOrFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false|null $value throws InvalidArgumentException Return values void — nullOrFile() public static nullOrFile(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFileExists() public static nullOrFileExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrFloat() public static nullOrFloat(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float|null $value throws InvalidArgumentException Return values void — nullOrGreaterThan() public static nullOrGreaterThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrGreaterThanEq() public static nullOrGreaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrImplementsInterface() public static nullOrImplementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : void Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrInArray() public static nullOrInArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrInteger() public static nullOrInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int|null $value throws InvalidArgumentException Return values void — nullOrIntegerish() public static nullOrIntegerish(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void — nullOrInterfaceExists() public static nullOrInterfaceExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void — nullOrIp() public static nullOrIp(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIpv4() public static nullOrIpv4(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIpv6() public static nullOrIpv6(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrIsAnyOf() public static nullOrIsAnyOf(object|string|null $value, array<string|int, string> $classes[, string $message = '' ]) : void Parameters $value : object|string|null $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — nullOrIsAOf() public static nullOrIsAOf(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string|null $value throws InvalidArgumentException Return values void — nullOrIsArray() public static nullOrIsArray(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|null $value throws InvalidArgumentException Return values void — nullOrIsArrayAccessible() public static nullOrIsArrayAccessible(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess|null $value throws InvalidArgumentException Return values void — nullOrIsCallable() public static nullOrIsCallable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable|null $value throws InvalidArgumentException Return values void — nullOrIsCountable() public static nullOrIsCountable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable|null $value throws InvalidArgumentException Return values void — nullOrIsEmpty() public static nullOrIsEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values void — nullOrIsInstanceOf() public static nullOrIsInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|null $value throws InvalidArgumentException Return values void — nullOrIsInstanceOfAny() public static nullOrIsInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : void Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void — nullOrIsIterable() public static nullOrIsIterable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value throws InvalidArgumentException Return values void — nullOrIsList() public static nullOrIsList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list|null $array throws InvalidArgumentException Return values void — nullOrIsMap() public static nullOrIsMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array psalm-assert array<string, T>|null $array throws InvalidArgumentException Return values void — nullOrIsNonEmptyList() public static nullOrIsNonEmptyList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list|null $array throws InvalidArgumentException Return values void — nullOrIsNonEmptyMap() public static nullOrIsNonEmptyMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array throws InvalidArgumentException Return values void — nullOrIsNotA() public static nullOrIsNotA(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrIsTraversable() public static nullOrIsTraversable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values void — nullOrKeyExists() public static nullOrKeyExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrKeyNotExists() public static nullOrKeyNotExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLength() public static nullOrLength(string|null $value, int $length[, string $message = '' ]) : void Parameters $value : string|null $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLengthBetween() public static nullOrLengthBetween(string|null $value, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLessThan() public static nullOrLessThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLessThanEq() public static nullOrLessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrLower() public static nullOrLower(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure psalm-assert lowercase-string|null $value throws InvalidArgumentException Return values void — nullOrMaxCount() public static nullOrMaxCount(Countable|array<string|int, mixed>|null $array, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrMaxLength() public static nullOrMaxLength(string|null $value, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrMethodExists() public static nullOrMethodExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrMethodNotExists() public static nullOrMethodNotExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrMinCount() public static nullOrMinCount(Countable|array<string|int, mixed>|null $array, int|float $min[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrMinLength() public static nullOrMinLength(string|null $value, int|float $min[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNatural() public static nullOrNatural(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0|null $value throws InvalidArgumentException Return values void — nullOrNotContains() public static nullOrNotContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEmpty() public static nullOrNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEndsWith() public static nullOrNotEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotEq() public static nullOrNotEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrNotFalse() public static nullOrNotFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotInstanceOf() public static nullOrNotInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrNotRegex() public static nullOrNotRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotSame() public static nullOrNotSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotStartsWith() public static nullOrNotStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNotWhitespaceOnly() public static nullOrNotWhitespaceOnly(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrNumeric() public static nullOrNumeric(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void — nullOrObject() public static nullOrObject(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object|null $value throws InvalidArgumentException Return values void — nullOrOneOf() public static nullOrOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrPositiveInteger() public static nullOrPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|null $value throws InvalidArgumentException Return values void — nullOrPropertyExists() public static nullOrPropertyExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrPropertyNotExists() public static nullOrPropertyNotExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void — nullOrRange() public static nullOrRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrReadable() public static nullOrReadable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrRegex() public static nullOrRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrResource() public static nullOrResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource|null $value throws InvalidArgumentException Return values void — nullOrSame() public static nullOrSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrScalar() public static nullOrScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar|null $value throws InvalidArgumentException Return values void — nullOrStartsWith() public static nullOrStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrStartsWithLetter() public static nullOrStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrString() public static nullOrString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string|null $value throws InvalidArgumentException Return values void — nullOrStringNotEmpty() public static nullOrStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string|null $value throws InvalidArgumentException Return values void — nullOrSubclassOf() public static nullOrSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType|null $value throws InvalidArgumentException Return values void — nullOrThrows() public static nullOrThrows(Closure|null $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : Closure|null $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void — nullOrTrue() public static nullOrTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true|null $value throws InvalidArgumentException Return values void — nullOrUnicodeLetters() public static nullOrUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrUniqueValues() public static nullOrUniqueValues(array<string|int, mixed>|null $values[, string $message = '' ]) : void Parameters $values : array<string|int, mixed>|null $message : string = '' Tags throws InvalidArgumentException Return values void — nullOrUpper() public static nullOrUpper(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrUuid() public static nullOrUuid(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void — nullOrValidArrayKey() public static nullOrValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key|null $value throws InvalidArgumentException Return values void — nullOrWritable() public static nullOrWritable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void — numeric() public static numeric(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed — object() public static object(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object $value throws InvalidArgumentException Return values mixed — oneOf() A more human-readable alias of Assert::inArray(). public static oneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — positiveInteger() public static positiveInteger(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int $value throws InvalidArgumentException Return values mixed — propertyExists() public static propertyExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — propertyNotExists() public static propertyNotExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed — range() Inclusive range, so Assert::(3, 3, 5) passes. public static range(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : mixed Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — readable() public static readable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed — regex() public static regex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — resource() public static resource(mixed $value[, string|null $type = null ][, string $message = '' ]) : mixed Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource $value throws InvalidArgumentException Return values mixed — same() public static same(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — scalar() public static scalar(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar $value throws InvalidArgumentException Return values mixed — startsWith() public static startsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — startsWithLetter() public static startsWithLetter(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — string() public static string(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string $value throws InvalidArgumentException Return values mixed — stringNotEmpty() public static stringNotEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string $value throws InvalidArgumentException Return values mixed — subclassOf() public static subclassOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType $value throws InvalidArgumentException Return values mixed — throws() public static throws(Closure $expression[, string $class = 'Exception' ][, string $message = '' ]) : mixed Parameters $expression : Closure $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values mixed — true() public static true(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true $value throws InvalidArgumentException Return values mixed — unicodeLetters() public static unicodeLetters(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — uniqueValues() Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. public static uniqueValues(array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $values : array<string|int, mixed> $message : string = '' Tags throws InvalidArgumentException Return values mixed — upper() public static upper(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert !lowercase-string $value throws InvalidArgumentException Return values mixed — uuid() public static uuid(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed — validArrayKey() Checks if a value is a valid array key (int or string). public static validArrayKey(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key $value throws InvalidArgumentException Return values mixed — writable() public static writable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed — reportInvalidArgument() protected static reportInvalidArgument(string $message) : mixed Parameters $message : string Tags throws InvalidArgumentException psalm-pure this method is not supposed to perform side-effects Return values mixed — strlen() protected static strlen(mixed $value) : mixed Parameters $value : mixed Return values mixed — typeToString() protected static typeToString(mixed $value) : string Parameters $value : mixed Return values string — valueToString() protected static valueToString(mixed $value) : string Parameters $value : mixed Return values string — __construct() private __construct() : mixed Return values mixed — Search results
allOneOf() public static allOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allPositiveInteger() public static allPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allPropertyExists() public static allPropertyExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void —
allPropertyNotExists() public static allPropertyNotExists(iteratable<string|int, string|object> $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : iteratable<string|int, string|object> $property : mixed $message : string = '' Tags psalm-pure psalm-param iterable<class-string|object> $classOrObject throws InvalidArgumentException Return values void —
allRange() public static allRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allReadable() public static allReadable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void —
allRegex() public static allRegex(iteratable<string|int, string> $value, string $pattern[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allResource() public static allResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allSame() public static allSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allScalar() public static allScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allStartsWith() public static allStartsWith(iteratable<string|int, string> $value, string $prefix[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allStartsWithLetter() public static allStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allString() public static allString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allStringNotEmpty() public static allStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allSubclassOf() public static allSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert iterable<class-string|ExpectedType> $value throws InvalidArgumentException Return values void —
allThrows() public static allThrows(iteratable<string|int, Closure> $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : iteratable<string|int, Closure> $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void —
allTrue() public static allTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allUnicodeLetters() public static allUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allUniqueValues() public static allUniqueValues(iteratable<string|int, array<string|int, mixed>> $values[, string $message = '' ]) : void Parameters $values : iteratable<string|int, array<string|int, mixed>> $message : string = '' Tags throws InvalidArgumentException Return values void —
allUpper() public static allUpper(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allUuid() public static allUuid(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
allValidArrayKey() public static allValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values void —
allWritable() public static allWritable(iteratable<string|int, string> $value[, string $message = '' ]) : void Parameters $value : iteratable<string|int, string> $message : string = '' Tags throws InvalidArgumentException Return values void —
alnum() public static alnum(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
alpha() public static alpha(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
boolean() public static boolean(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool $value throws InvalidArgumentException Return values mixed —
classExists() public static classExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed —
contains() public static contains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
count() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static count(Countable|array<string|int, mixed> $array, int $number[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $number : int $message : string = '' Tags throws InvalidArgumentException Return values mixed —
countBetween() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static countBetween(Countable|array<string|int, mixed> $array, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed —
digits() public static digits(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
directory() public static directory(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
email() public static email(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
endsWith() public static endsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
eq() public static eq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
false() public static false(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false $value throws InvalidArgumentException Return values mixed —
file() public static file(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
fileExists() Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. public static fileExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
float() public static float(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float $value throws InvalidArgumentException Return values mixed —
greaterThan() public static greaterThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
greaterThanEq() public static greaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
implementsInterface() public static implementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : mixed Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string $value throws InvalidArgumentException Return values mixed —
inArray() Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. public static inArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
integer() public static integer(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int $value throws InvalidArgumentException Return values mixed —
integerish() public static integerish(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed —
interfaceExists() public static interfaceExists(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-assert class-string $value throws InvalidArgumentException Return values mixed —
ip() public static ip(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
ipv4() public static ipv4(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
ipv6() public static ipv6(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
isAnyOf() public static isAnyOf(object|string $value, array<string|int, string> $classes[, string $message = '' ]) : mixed Parameters $value : object|string $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed —
isAOf() public static isAOf(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string $value throws InvalidArgumentException Return values mixed —
isArray() public static isArray(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array $value throws InvalidArgumentException Return values mixed —
isArrayAccessible() public static isArrayAccessible(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess $value throws InvalidArgumentException Return values mixed —
isCallable() public static isCallable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable $value throws InvalidArgumentException Return values mixed —
isCountable() public static isCountable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable $value throws InvalidArgumentException Return values mixed —
isEmpty() public static isEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values mixed —
isInstanceOf() public static isInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType $value throws InvalidArgumentException Return values mixed —
isInstanceOfAny() public static isInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : mixed Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values mixed —
isIterable() public static isIterable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value throws InvalidArgumentException Return values mixed —
isList() public static isList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list $array throws InvalidArgumentException Return values mixed —
isMap() public static isMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array throws InvalidArgumentException Return values mixed —
isNonEmptyList() public static isNonEmptyList(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list $array throws InvalidArgumentException Return values mixed —
isNonEmptyMap() public static isNonEmptyMap(mixed $array[, string $message = '' ]) : mixed Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array $array psalm-assert array<string, T> $array psalm-assert !empty $array throws InvalidArgumentException Return values mixed —
isNotA() public static isNotA(object|string $value, string $class[, string $message = '' ]) : mixed Parameters $value : object|string $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class psalm-assert !UnexpectedType $value psalm-assert !class-string $value throws InvalidArgumentException Return values mixed —
isTraversable() public static isTraversable(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values mixed —
keyExists() public static keyExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
keyNotExists() public static keyNotExists(array<string|int, mixed> $array, string|int $key[, string $message = '' ]) : mixed Parameters $array : array<string|int, mixed> $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
length() public static length(string $value, int $length[, string $message = '' ]) : mixed Parameters $value : string $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
lengthBetween() Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. public static lengthBetween(string $value, int|float $min, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
lessThan() public static lessThan(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
lessThanEq() public static lessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : mixed Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
lower() public static lower(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert lowercase-string $value throws InvalidArgumentException Return values mixed —
maxCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static maxCount(Countable|array<string|int, mixed> $array, int|float $max[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed —
maxLength() Inclusive max. public static maxLength(string $value, int|float $max[, string $message = '' ]) : mixed Parameters $value : string $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
methodExists() public static methodExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed —
methodNotExists() public static methodNotExists(string|object $classOrObject, mixed $method[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed —
minCount() Does not check if $array is countable, this can generate a warning on php versions after 7.2. public static minCount(Countable|array<string|int, mixed> $array, int|float $min[, string $message = '' ]) : mixed Parameters $array : Countable|array<string|int, mixed> $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values mixed —
minLength() Inclusive min. public static minLength(string $value, int|float $min[, string $message = '' ]) : mixed Parameters $value : string $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
natural() public static natural(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0 $value throws InvalidArgumentException Return values mixed —
notContains() public static notContains(string $value, string $subString[, string $message = '' ]) : mixed Parameters $value : string $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
notEmpty() public static notEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !empty $value throws InvalidArgumentException Return values mixed —
notEndsWith() public static notEndsWith(string $value, string $suffix[, string $message = '' ]) : mixed Parameters $value : string $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
notEq() public static notEq(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values mixed —
notFalse() public static notFalse(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !false $value throws InvalidArgumentException Return values mixed —
notInstanceOf() public static notInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert !ExpectedType $value throws InvalidArgumentException Return values mixed —
notNull() public static notNull(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert !null $value throws InvalidArgumentException Return values mixed —
notRegex() public static notRegex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
notSame() public static notSame(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
notStartsWith() public static notStartsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
notWhitespaceOnly() public static notWhitespaceOnly(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
null() public static null(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert null $value throws InvalidArgumentException Return values mixed —
nullOrAlnum() public static nullOrAlnum(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrAlpha() public static nullOrAlpha(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrBoolean() public static nullOrBoolean(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert bool|null $value throws InvalidArgumentException Return values void —
nullOrClassExists() public static nullOrClassExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void —
nullOrContains() public static nullOrContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrCount() public static nullOrCount(Countable|array<string|int, mixed>|null $array, int $number[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $number : int $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrCountBetween() public static nullOrCountBetween(Countable|array<string|int, mixed>|null $array, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrDigits() public static nullOrDigits(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrDirectory() public static nullOrDirectory(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrEmail() public static nullOrEmail(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrEndsWith() public static nullOrEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrEq() public static nullOrEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrFalse() public static nullOrFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert false|null $value throws InvalidArgumentException Return values void —
nullOrFile() public static nullOrFile(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrFileExists() public static nullOrFileExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrFloat() public static nullOrFloat(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert float|null $value throws InvalidArgumentException Return values void —
nullOrGreaterThan() public static nullOrGreaterThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrGreaterThanEq() public static nullOrGreaterThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrImplementsInterface() public static nullOrImplementsInterface(mixed $value, mixed $interface[, string $message = '' ]) : void Parameters $value : mixed $interface : mixed $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $interface psalm-assert class-string|null $value throws InvalidArgumentException Return values void —
nullOrInArray() public static nullOrInArray(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrInteger() public static nullOrInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert int|null $value throws InvalidArgumentException Return values void —
nullOrIntegerish() public static nullOrIntegerish(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void —
nullOrInterfaceExists() public static nullOrInterfaceExists(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-assert class-string|null $value throws InvalidArgumentException Return values void —
nullOrIp() public static nullOrIp(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrIpv4() public static nullOrIpv4(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrIpv6() public static nullOrIpv6(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrIsAnyOf() public static nullOrIsAnyOf(object|string|null $value, array<string|int, string> $classes[, string $message = '' ]) : void Parameters $value : object|string|null $classes : array<string|int, string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void —
nullOrIsAOf() public static nullOrIsAOf(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|class-string|null $value throws InvalidArgumentException Return values void —
nullOrIsArray() public static nullOrIsArray(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|null $value throws InvalidArgumentException Return values void —
nullOrIsArrayAccessible() public static nullOrIsArrayAccessible(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array|ArrayAccess|null $value throws InvalidArgumentException Return values void —
nullOrIsCallable() public static nullOrIsCallable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert callable|null $value throws InvalidArgumentException Return values void —
nullOrIsCountable() public static nullOrIsCountable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert countable|null $value throws InvalidArgumentException Return values void —
nullOrIsEmpty() public static nullOrIsEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert empty $value throws InvalidArgumentException Return values void —
nullOrIsInstanceOf() public static nullOrIsInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert ExpectedType|null $value throws InvalidArgumentException Return values void —
nullOrIsInstanceOfAny() public static nullOrIsInstanceOfAny(mixed $value, array<string|int, object|string> $classes[, string $message = '' ]) : void Parameters $value : mixed $classes : array<string|int, object|string> $message : string = '' Tags psalm-pure psalm-param array $classes throws InvalidArgumentException Return values void —
nullOrIsIterable() public static nullOrIsIterable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value throws InvalidArgumentException Return values void —
nullOrIsList() public static nullOrIsList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert list|null $array throws InvalidArgumentException Return values void —
nullOrIsMap() public static nullOrIsMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array psalm-assert array<string, T>|null $array throws InvalidArgumentException Return values void —
nullOrIsNonEmptyList() public static nullOrIsNonEmptyList(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-list|null $array throws InvalidArgumentException Return values void —
nullOrIsNonEmptyMap() public static nullOrIsNonEmptyMap(mixed $array[, string $message = '' ]) : void Parameters $array : mixed $message : string = '' Tags psalm-pure psalm-template T psalm-param mixed|array|null $array throws InvalidArgumentException Return values void —
nullOrIsNotA() public static nullOrIsNotA(object|string|null $value, string $class[, string $message = '' ]) : void Parameters $value : object|string|null $class : string $message : string = '' Tags psalm-pure psalm-template UnexpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void —
nullOrIsTraversable() public static nullOrIsTraversable(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert iterable|null $value deprecated use "isIterable" or "isInstanceOf" instead throws InvalidArgumentException Return values void —
nullOrKeyExists() public static nullOrKeyExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrKeyNotExists() public static nullOrKeyNotExists(array<string|int, mixed>|null $array, string|int $key[, string $message = '' ]) : void Parameters $array : array<string|int, mixed>|null $key : string|int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrLength() public static nullOrLength(string|null $value, int $length[, string $message = '' ]) : void Parameters $value : string|null $length : int $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrLengthBetween() public static nullOrLengthBetween(string|null $value, int|float $min, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrLessThan() public static nullOrLessThan(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrLessThanEq() public static nullOrLessThanEq(mixed $value, mixed $limit[, string $message = '' ]) : void Parameters $value : mixed $limit : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrLower() public static nullOrLower(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure psalm-assert lowercase-string|null $value throws InvalidArgumentException Return values void —
nullOrMaxCount() public static nullOrMaxCount(Countable|array<string|int, mixed>|null $array, int|float $max[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $max : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrMaxLength() public static nullOrMaxLength(string|null $value, int|float $max[, string $message = '' ]) : void Parameters $value : string|null $max : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrMethodExists() public static nullOrMethodExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void —
nullOrMethodNotExists() public static nullOrMethodNotExists(string|object|null $classOrObject, mixed $method[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $method : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void —
nullOrMinCount() public static nullOrMinCount(Countable|array<string|int, mixed>|null $array, int|float $min[, string $message = '' ]) : void Parameters $array : Countable|array<string|int, mixed>|null $min : int|float $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrMinLength() public static nullOrMinLength(string|null $value, int|float $min[, string $message = '' ]) : void Parameters $value : string|null $min : int|float $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNatural() public static nullOrNatural(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|0|null $value throws InvalidArgumentException Return values void —
nullOrNotContains() public static nullOrNotContains(string|null $value, string $subString[, string $message = '' ]) : void Parameters $value : string|null $subString : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotEmpty() public static nullOrNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotEndsWith() public static nullOrNotEndsWith(string|null $value, string $suffix[, string $message = '' ]) : void Parameters $value : string|null $suffix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotEq() public static nullOrNotEq(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrNotFalse() public static nullOrNotFalse(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotInstanceOf() public static nullOrNotInstanceOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class throws InvalidArgumentException Return values void —
nullOrNotRegex() public static nullOrNotRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotSame() public static nullOrNotSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotStartsWith() public static nullOrNotStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNotWhitespaceOnly() public static nullOrNotWhitespaceOnly(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrNumeric() public static nullOrNumeric(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric|null $value throws InvalidArgumentException Return values void —
nullOrObject() public static nullOrObject(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object|null $value throws InvalidArgumentException Return values void —
nullOrOneOf() public static nullOrOneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : void Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrPositiveInteger() public static nullOrPositiveInteger(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int|null $value throws InvalidArgumentException Return values void —
nullOrPropertyExists() public static nullOrPropertyExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void —
nullOrPropertyNotExists() public static nullOrPropertyNotExists(string|object|null $classOrObject, mixed $property[, string $message = '' ]) : void Parameters $classOrObject : string|object|null $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object|null $classOrObject throws InvalidArgumentException Return values void —
nullOrRange() public static nullOrRange(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : void Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrReadable() public static nullOrReadable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrRegex() public static nullOrRegex(string|null $value, string $pattern[, string $message = '' ]) : void Parameters $value : string|null $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrResource() public static nullOrResource(mixed $value[, string|null $type = null ][, string $message = '' ]) : void Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource|null $value throws InvalidArgumentException Return values void —
nullOrSame() public static nullOrSame(mixed $value, mixed $expect[, string $message = '' ]) : void Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrScalar() public static nullOrScalar(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar|null $value throws InvalidArgumentException Return values void —
nullOrStartsWith() public static nullOrStartsWith(string|null $value, string $prefix[, string $message = '' ]) : void Parameters $value : string|null $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrStartsWithLetter() public static nullOrStartsWithLetter(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrString() public static nullOrString(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string|null $value throws InvalidArgumentException Return values void —
nullOrStringNotEmpty() public static nullOrStringNotEmpty(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string|null $value throws InvalidArgumentException Return values void —
nullOrSubclassOf() public static nullOrSubclassOf(mixed $value, string|object $class[, string $message = '' ]) : void Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType|null $value throws InvalidArgumentException Return values void —
nullOrThrows() public static nullOrThrows(Closure|null $expression[, string $class = 'Exception' ][, string $message = '' ]) : void Parameters $expression : Closure|null $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values void —
nullOrTrue() public static nullOrTrue(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true|null $value throws InvalidArgumentException Return values void —
nullOrUnicodeLetters() public static nullOrUnicodeLetters(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrUniqueValues() public static nullOrUniqueValues(array<string|int, mixed>|null $values[, string $message = '' ]) : void Parameters $values : array<string|int, mixed>|null $message : string = '' Tags throws InvalidArgumentException Return values void —
nullOrUpper() public static nullOrUpper(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrUuid() public static nullOrUuid(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values void —
nullOrValidArrayKey() public static nullOrValidArrayKey(mixed $value[, string $message = '' ]) : void Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key|null $value throws InvalidArgumentException Return values void —
nullOrWritable() public static nullOrWritable(string|null $value[, string $message = '' ]) : void Parameters $value : string|null $message : string = '' Tags throws InvalidArgumentException Return values void —
numeric() public static numeric(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert numeric $value throws InvalidArgumentException Return values mixed —
object() public static object(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert object $value throws InvalidArgumentException Return values mixed —
oneOf() A more human-readable alias of Assert::inArray(). public static oneOf(mixed $value, array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $value : mixed $values : array<string|int, mixed> $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
positiveInteger() public static positiveInteger(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert positive-int $value throws InvalidArgumentException Return values mixed —
propertyExists() public static propertyExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed —
propertyNotExists() public static propertyNotExists(string|object $classOrObject, mixed $property[, string $message = '' ]) : mixed Parameters $classOrObject : string|object $property : mixed $message : string = '' Tags psalm-pure psalm-param class-string|object $classOrObject throws InvalidArgumentException Return values mixed —
range() Inclusive range, so Assert::(3, 3, 5) passes. public static range(mixed $value, mixed $min, mixed $max[, string $message = '' ]) : mixed Parameters $value : mixed $min : mixed $max : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
readable() public static readable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed —
regex() public static regex(string $value, string $pattern[, string $message = '' ]) : mixed Parameters $value : string $pattern : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
resource() public static resource(mixed $value[, string|null $type = null ][, string $message = '' ]) : mixed Parameters $value : mixed $type : string|null = null type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php $message : string = '' Tags psalm-pure psalm-assert resource $value throws InvalidArgumentException Return values mixed —
same() public static same(mixed $value, mixed $expect[, string $message = '' ]) : mixed Parameters $value : mixed $expect : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
scalar() public static scalar(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert scalar $value throws InvalidArgumentException Return values mixed —
startsWith() public static startsWith(string $value, string $prefix[, string $message = '' ]) : mixed Parameters $value : string $prefix : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
startsWithLetter() public static startsWithLetter(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
string() public static string(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert string $value throws InvalidArgumentException Return values mixed —
stringNotEmpty() public static stringNotEmpty(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert non-empty-string $value throws InvalidArgumentException Return values mixed —
subclassOf() public static subclassOf(mixed $value, string|object $class[, string $message = '' ]) : mixed Parameters $value : mixed $class : string|object $message : string = '' Tags psalm-pure psalm-template ExpectedType of object psalm-param class-string $class psalm-assert class-string|ExpectedType $value throws InvalidArgumentException Return values mixed —
throws() public static throws(Closure $expression[, string $class = 'Exception' ][, string $message = '' ]) : mixed Parameters $expression : Closure $class : string = 'Exception' $message : string = '' Tags psalm-param class-string $class throws InvalidArgumentException Return values mixed —
true() public static true(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert true $value throws InvalidArgumentException Return values mixed —
unicodeLetters() public static unicodeLetters(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
uniqueValues() Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. public static uniqueValues(array<string|int, mixed> $values[, string $message = '' ]) : mixed Parameters $values : array<string|int, mixed> $message : string = '' Tags throws InvalidArgumentException Return values mixed —
upper() public static upper(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure psalm-assert !lowercase-string $value throws InvalidArgumentException Return values mixed —
uuid() public static uuid(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags psalm-pure throws InvalidArgumentException Return values mixed —
validArrayKey() Checks if a value is a valid array key (int or string). public static validArrayKey(mixed $value[, string $message = '' ]) : mixed Parameters $value : mixed $message : string = '' Tags psalm-pure psalm-assert array-key $value throws InvalidArgumentException Return values mixed —
writable() public static writable(string $value[, string $message = '' ]) : mixed Parameters $value : string $message : string = '' Tags throws InvalidArgumentException Return values mixed —
reportInvalidArgument() protected static reportInvalidArgument(string $message) : mixed Parameters $message : string Tags throws InvalidArgumentException psalm-pure this method is not supposed to perform side-effects Return values mixed —
strlen() protected static strlen(mixed $value) : mixed Parameters $value : mixed Return values mixed —
typeToString() protected static typeToString(mixed $value) : string Parameters $value : mixed Return values string —
valueToString() protected static valueToString(mixed $value) : string Parameters $value : mixed Return values string —