Efficient assertions to validate the input/output of your methods.

Cloneable
Methods
public static __callStatic( $name, $arguments)
 
  • throws BadMethodCallException
public static alnum( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static alpha( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static boolean( $value, $message = '')
 
  • psalm-pure
  • psalm-assert bool $value
  • throws InvalidArgumentException
public static classExists( $value, $message = '')
 
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static contains( $value, $subString, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static count( $array, $number, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static countBetween( $array, $min, $max, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static digits( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static directory( $value, $message = '')
 
  • throws InvalidArgumentException
public static email( $value, $message = '')
 
  • throws InvalidArgumentException
public static endsWith( $value, $suffix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static eq( $value, $expect, $message = '')
 
  • throws InvalidArgumentException
public static false( $value, $message = '')
 
  • psalm-pure
  • psalm-assert false $value
  • throws InvalidArgumentException
public static file( $value, $message = '')
 
  • throws InvalidArgumentException
public static fileExists( $value, $message = '')
 

Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file.

  • throws InvalidArgumentException
public static float( $value, $message = '')
 
  • psalm-pure
  • psalm-assert float $value
  • throws InvalidArgumentException
public static greaterThan( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static greaterThanEq( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static implementsInterface( $value, $interface, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $interface
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static inArray( $value, array $values, $message = '')
 

Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion.

  • psalm-pure
  • throws InvalidArgumentException
public static integer( $value, $message = '')
 
  • psalm-pure
  • psalm-assert int $value
  • throws InvalidArgumentException
public static integerish( $value, $message = '')
 
  • psalm-pure
  • psalm-assert numeric $value
  • throws InvalidArgumentException
public static interfaceExists( $value, $message = '')
 
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static ip( $value, $message = '')
 
  • throws InvalidArgumentException
public static ipv4( $value, $message = '')
 
  • throws InvalidArgumentException
public static ipv6( $value, $message = '')
 
  • throws InvalidArgumentException
public static isAnyOf( $value, array $classes, $message = '')
 
  • psalm-pure
  • psalm-param array $classes
  • throws InvalidArgumentException
public static isAOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert ExpectedType|class-string $value
  • throws InvalidArgumentException
public static isArray( $value, $message = '')
 
  • psalm-pure
  • psalm-assert array $value
  • throws InvalidArgumentException
public static isArrayAccessible( $value, $message = '')
 
  • psalm-pure
  • psalm-assert array|ArrayAccess $value
  • throws InvalidArgumentException
public static isCallable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert callable $value
  • throws InvalidArgumentException
public static isCountable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert countable $value
  • throws InvalidArgumentException
public static isEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert empty $value
  • throws InvalidArgumentException
public static isInstanceOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert ExpectedType $value
  • throws InvalidArgumentException
public static isInstanceOfAny( $value, array $classes, $message = '')
 
  • psalm-pure
  • psalm-param array $classes
  • throws InvalidArgumentException
public static isIterable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert iterable $value
  • throws InvalidArgumentException
public static isList( $array, $message = '')
 
  • psalm-pure
  • psalm-assert list $array
  • throws InvalidArgumentException
public static isMap( $array, $message = '')
 
  • psalm-pure
  • psalm-template T
  • psalm-param mixed|array $array
  • psalm-assert array $array
  • throws InvalidArgumentException
public static isNonEmptyList( $array, $message = '')
 
  • psalm-pure
  • psalm-assert non-empty-list $array
  • throws InvalidArgumentException
public static isNonEmptyMap( $array, $message = '')
 
  • psalm-pure
  • psalm-template T
  • psalm-param mixed|array $array
  • psalm-assert array $array
  • psalm-assert !empty $array
  • throws InvalidArgumentException
public static isNotA( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template UnexpectedType of object
  • psalm-param class-string $class
  • psalm-assert !UnexpectedType $value
  • psalm-assert !class-string $value
  • throws InvalidArgumentException
public static isTraversable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert iterable $value
  • deprecated use "isIterable" or "isInstanceOf" instead
  • throws InvalidArgumentException
public static keyExists( $array, $key, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static keyNotExists( $array, $key, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static length( $value, $length, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lengthBetween( $value, $min, $max, $message = '')
 

Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion.

  • psalm-pure
  • throws InvalidArgumentException
public static lessThan( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lessThanEq( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lower( $value, $message = '')
 
  • psalm-pure
  • psalm-assert lowercase-string $value
  • throws InvalidArgumentException
public static maxCount( $array, $max, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static maxLength( $value, $max, $message = '')
 

Inclusive max.

  • psalm-pure
  • throws InvalidArgumentException
public static methodExists( $classOrObject, $method, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static methodNotExists( $classOrObject, $method, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static minCount( $array, $min, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static minLength( $value, $min, $message = '')
 

Inclusive min.

  • psalm-pure
  • throws InvalidArgumentException
public static natural( $value, $message = '')
 
  • psalm-pure
  • psalm-assert int $value
  • throws InvalidArgumentException
public static notContains( $value, $subString, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !empty $value
  • throws InvalidArgumentException
public static notEndsWith( $value, $suffix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notEq( $value, $expect, $message = '')
 
  • throws InvalidArgumentException
public static notFalse( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !false $value
  • throws InvalidArgumentException
public static notInstanceOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert !ExpectedType $value
  • throws InvalidArgumentException
public static notNull( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !null $value
  • throws InvalidArgumentException
public static notRegex( $value, $pattern, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notSame( $value, $expect, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notStartsWith( $value, $prefix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notWhitespaceOnly( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static null( $value, $message = '')
 
  • psalm-pure
  • psalm-assert null $value
  • throws InvalidArgumentException
public static numeric( $value, $message = '')
 
  • psalm-pure
  • psalm-assert numeric $value
  • throws InvalidArgumentException
public static object( $value, $message = '')
 
  • psalm-pure
  • psalm-assert object $value
  • throws InvalidArgumentException
public static oneOf( $value, array $values, $message = '')
 

A more human-readable alias of Assert::inArray().

  • psalm-pure
  • throws InvalidArgumentException
public static propertyExists( $classOrObject, $property, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static propertyNotExists( $classOrObject, $property, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static range( $value, $min, $max, $message = '')
 

Inclusive range, so Assert::(3, 3, 5) passes.

  • psalm-pure
  • throws InvalidArgumentException
public static readable( $value, $message = '')
 
  • throws InvalidArgumentException
public static regex( $value, $pattern, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static resource( $value, $type = NULL, $message = '')
 
  • psalm-pure
  • psalm-assert resource $value
  • throws InvalidArgumentException
public static same( $value, $expect, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static scalar( $value, $message = '')
 
  • psalm-pure
  • psalm-assert scalar $value
  • throws InvalidArgumentException
public static startsWith( $value, $prefix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static startsWithLetter( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static string( $value, $message = '')
 
  • psalm-pure
  • psalm-assert string $value
  • throws InvalidArgumentException
public static stringNotEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert non-empty-string $value
  • throws InvalidArgumentException
public static subclassOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert class-string|ExpectedType $value
  • throws InvalidArgumentException
public static throws(Closure $expression, $class = 'Exception', $message = '')
 
  • psalm-param class-string $class
  • throws InvalidArgumentException
public static true( $value, $message = '')
 
  • psalm-pure
  • psalm-assert true $value
  • throws InvalidArgumentException
public static unicodeLetters( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static uniqueValues(array $values, $message = '')
 

Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.

  • throws InvalidArgumentException
public static upper( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !lowercase-string $value
  • throws InvalidArgumentException
public static uuid( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static validArrayKey( $value, $message = '')
 

Checks if a value is a valid array key (int or string).

  • psalm-pure
  • psalm-assert array-key $value
  • throws InvalidArgumentException
public static writable( $value, $message = '')
 
  • throws InvalidArgumentException
Methods
protected static reportInvalidArgument( $message)
 
  • throws InvalidArgumentException
  • psalm-pure this method is not supposed to perform side-effects
protected static strlen( $value)
protected static typeToString( $value)
 
  • return string
protected static valueToString( $value)
 
  • return string
Methods
private __construct()
Methods
public static __callStatic( $name, $arguments)
 
  • throws BadMethodCallException
public static alnum( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static alpha( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static boolean( $value, $message = '')
 
  • psalm-pure
  • psalm-assert bool $value
  • throws InvalidArgumentException
public static classExists( $value, $message = '')
 
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static contains( $value, $subString, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static count( $array, $number, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static countBetween( $array, $min, $max, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static digits( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static directory( $value, $message = '')
 
  • throws InvalidArgumentException
public static email( $value, $message = '')
 
  • throws InvalidArgumentException
public static endsWith( $value, $suffix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static eq( $value, $expect, $message = '')
 
  • throws InvalidArgumentException
public static false( $value, $message = '')
 
  • psalm-pure
  • psalm-assert false $value
  • throws InvalidArgumentException
public static file( $value, $message = '')
 
  • throws InvalidArgumentException
public static fileExists( $value, $message = '')
 

Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file.

  • throws InvalidArgumentException
public static float( $value, $message = '')
 
  • psalm-pure
  • psalm-assert float $value
  • throws InvalidArgumentException
public static greaterThan( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static greaterThanEq( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static implementsInterface( $value, $interface, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $interface
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static inArray( $value, array $values, $message = '')
 

Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion.

  • psalm-pure
  • throws InvalidArgumentException
public static integer( $value, $message = '')
 
  • psalm-pure
  • psalm-assert int $value
  • throws InvalidArgumentException
public static integerish( $value, $message = '')
 
  • psalm-pure
  • psalm-assert numeric $value
  • throws InvalidArgumentException
public static interfaceExists( $value, $message = '')
 
  • psalm-assert class-string $value
  • throws InvalidArgumentException
public static ip( $value, $message = '')
 
  • throws InvalidArgumentException
public static ipv4( $value, $message = '')
 
  • throws InvalidArgumentException
public static ipv6( $value, $message = '')
 
  • throws InvalidArgumentException
public static isAnyOf( $value, array $classes, $message = '')
 
  • psalm-pure
  • psalm-param array $classes
  • throws InvalidArgumentException
public static isAOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert ExpectedType|class-string $value
  • throws InvalidArgumentException
public static isArray( $value, $message = '')
 
  • psalm-pure
  • psalm-assert array $value
  • throws InvalidArgumentException
public static isArrayAccessible( $value, $message = '')
 
  • psalm-pure
  • psalm-assert array|ArrayAccess $value
  • throws InvalidArgumentException
public static isCallable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert callable $value
  • throws InvalidArgumentException
public static isCountable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert countable $value
  • throws InvalidArgumentException
public static isEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert empty $value
  • throws InvalidArgumentException
public static isInstanceOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert ExpectedType $value
  • throws InvalidArgumentException
public static isInstanceOfAny( $value, array $classes, $message = '')
 
  • psalm-pure
  • psalm-param array $classes
  • throws InvalidArgumentException
public static isIterable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert iterable $value
  • throws InvalidArgumentException
public static isList( $array, $message = '')
 
  • psalm-pure
  • psalm-assert list $array
  • throws InvalidArgumentException
public static isMap( $array, $message = '')
 
  • psalm-pure
  • psalm-template T
  • psalm-param mixed|array $array
  • psalm-assert array $array
  • throws InvalidArgumentException
public static isNonEmptyList( $array, $message = '')
 
  • psalm-pure
  • psalm-assert non-empty-list $array
  • throws InvalidArgumentException
public static isNonEmptyMap( $array, $message = '')
 
  • psalm-pure
  • psalm-template T
  • psalm-param mixed|array $array
  • psalm-assert array $array
  • psalm-assert !empty $array
  • throws InvalidArgumentException
public static isNotA( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template UnexpectedType of object
  • psalm-param class-string $class
  • psalm-assert !UnexpectedType $value
  • psalm-assert !class-string $value
  • throws InvalidArgumentException
public static isTraversable( $value, $message = '')
 
  • psalm-pure
  • psalm-assert iterable $value
  • deprecated use "isIterable" or "isInstanceOf" instead
  • throws InvalidArgumentException
public static keyExists( $array, $key, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static keyNotExists( $array, $key, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static length( $value, $length, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lengthBetween( $value, $min, $max, $message = '')
 

Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion.

  • psalm-pure
  • throws InvalidArgumentException
public static lessThan( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lessThanEq( $value, $limit, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static lower( $value, $message = '')
 
  • psalm-pure
  • psalm-assert lowercase-string $value
  • throws InvalidArgumentException
public static maxCount( $array, $max, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static maxLength( $value, $max, $message = '')
 

Inclusive max.

  • psalm-pure
  • throws InvalidArgumentException
public static methodExists( $classOrObject, $method, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static methodNotExists( $classOrObject, $method, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static minCount( $array, $min, $message = '')
 

Does not check if $array is countable, this can generate a warning on php versions after 7.2.

  • throws InvalidArgumentException
public static minLength( $value, $min, $message = '')
 

Inclusive min.

  • psalm-pure
  • throws InvalidArgumentException
public static natural( $value, $message = '')
 
  • psalm-pure
  • psalm-assert int $value
  • throws InvalidArgumentException
public static notContains( $value, $subString, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !empty $value
  • throws InvalidArgumentException
public static notEndsWith( $value, $suffix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notEq( $value, $expect, $message = '')
 
  • throws InvalidArgumentException
public static notFalse( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !false $value
  • throws InvalidArgumentException
public static notInstanceOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert !ExpectedType $value
  • throws InvalidArgumentException
public static notNull( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !null $value
  • throws InvalidArgumentException
public static notRegex( $value, $pattern, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notSame( $value, $expect, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notStartsWith( $value, $prefix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static notWhitespaceOnly( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static null( $value, $message = '')
 
  • psalm-pure
  • psalm-assert null $value
  • throws InvalidArgumentException
public static numeric( $value, $message = '')
 
  • psalm-pure
  • psalm-assert numeric $value
  • throws InvalidArgumentException
public static object( $value, $message = '')
 
  • psalm-pure
  • psalm-assert object $value
  • throws InvalidArgumentException
public static oneOf( $value, array $values, $message = '')
 

A more human-readable alias of Assert::inArray().

  • psalm-pure
  • throws InvalidArgumentException
public static propertyExists( $classOrObject, $property, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static propertyNotExists( $classOrObject, $property, $message = '')
 
  • psalm-pure
  • psalm-param class-string|object $classOrObject
  • throws InvalidArgumentException
public static range( $value, $min, $max, $message = '')
 

Inclusive range, so Assert::(3, 3, 5) passes.

  • psalm-pure
  • throws InvalidArgumentException
public static readable( $value, $message = '')
 
  • throws InvalidArgumentException
public static regex( $value, $pattern, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
protected static reportInvalidArgument( $message)
 
  • throws InvalidArgumentException
  • psalm-pure this method is not supposed to perform side-effects
public static resource( $value, $type = NULL, $message = '')
 
  • psalm-pure
  • psalm-assert resource $value
  • throws InvalidArgumentException
public static same( $value, $expect, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static scalar( $value, $message = '')
 
  • psalm-pure
  • psalm-assert scalar $value
  • throws InvalidArgumentException
public static startsWith( $value, $prefix, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static startsWithLetter( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static string( $value, $message = '')
 
  • psalm-pure
  • psalm-assert string $value
  • throws InvalidArgumentException
public static stringNotEmpty( $value, $message = '')
 
  • psalm-pure
  • psalm-assert non-empty-string $value
  • throws InvalidArgumentException
protected static strlen( $value)
public static subclassOf( $value, $class, $message = '')
 
  • psalm-pure
  • psalm-template ExpectedType of object
  • psalm-param class-string $class
  • psalm-assert class-string|ExpectedType $value
  • throws InvalidArgumentException
public static throws(Closure $expression, $class = 'Exception', $message = '')
 
  • psalm-param class-string $class
  • throws InvalidArgumentException
public static true( $value, $message = '')
 
  • psalm-pure
  • psalm-assert true $value
  • throws InvalidArgumentException
protected static typeToString( $value)
 
  • return string
public static unicodeLetters( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static uniqueValues(array $values, $message = '')
 

Does non strict comparisons on the items, so ['3', 3] will not pass the assertion.

  • throws InvalidArgumentException
public static upper( $value, $message = '')
 
  • psalm-pure
  • psalm-assert !lowercase-string $value
  • throws InvalidArgumentException
public static uuid( $value, $message = '')
 
  • psalm-pure
  • throws InvalidArgumentException
public static validArrayKey( $value, $message = '')
 

Checks if a value is a valid array key (int or string).

  • psalm-pure
  • psalm-assert array-key $value
  • throws InvalidArgumentException
protected static valueToString( $value)
 
  • return string
public static writable( $value, $message = '')
 
  • throws InvalidArgumentException
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only