API - XOOPS 2.5.11 Beta 2
By monxoops.fr
Assert Class Reference
Inheritance diagram for Assert:

Static Public Member Functions

static string ($value, $message='')
 
static stringNotEmpty ($value, $message='')
 
static integer ($value, $message='')
 
static integerish ($value, $message='')
 
static float ($value, $message='')
 
static numeric ($value, $message='')
 
static natural ($value, $message='')
 
static boolean ($value, $message='')
 
static scalar ($value, $message='')
 
static object ($value, $message='')
 
static resource ($value, $type=null, $message='')
 
static isCallable ($value, $message='')
 
static isArray ($value, $message='')
 
static isTraversable ($value, $message='')
 
static isArrayAccessible ($value, $message='')
 
static isCountable ($value, $message='')
 
static isIterable ($value, $message='')
 
static isInstanceOf ($value, $class, $message='')
 
static notInstanceOf ($value, $class, $message='')
 
static isInstanceOfAny ($value, array $classes, $message='')
 
static isAOf ($value, $class, $message='')
 
static isNotA ($value, $class, $message='')
 
static isAnyOf ($value, array $classes, $message='')
 
static isEmpty ($value, $message='')
 
static notEmpty ($value, $message='')
 
static null ($value, $message='')
 
static notNull ($value, $message='')
 
static true ($value, $message='')
 
static false ($value, $message='')
 
static notFalse ($value, $message='')
 
static ip ($value, $message='')
 
static ipv4 ($value, $message='')
 
static ipv6 ($value, $message='')
 
static email ($value, $message='')
 
static uniqueValues (array $values, $message='')
 
static eq ($value, $expect, $message='')
 
static notEq ($value, $expect, $message='')
 
static same ($value, $expect, $message='')
 
static notSame ($value, $expect, $message='')
 
static greaterThan ($value, $limit, $message='')
 
static greaterThanEq ($value, $limit, $message='')
 
static lessThan ($value, $limit, $message='')
 
static lessThanEq ($value, $limit, $message='')
 
static range ($value, $min, $max, $message='')
 
static oneOf ($value, array $values, $message='')
 
static inArray ($value, array $values, $message='')
 
static contains ($value, $subString, $message='')
 
static notContains ($value, $subString, $message='')
 
static notWhitespaceOnly ($value, $message='')
 
static startsWith ($value, $prefix, $message='')
 
static notStartsWith ($value, $prefix, $message='')
 
static startsWithLetter ($value, $message='')
 
static endsWith ($value, $suffix, $message='')
 
static notEndsWith ($value, $suffix, $message='')
 
static regex ($value, $pattern, $message='')
 
static notRegex ($value, $pattern, $message='')
 
static unicodeLetters ($value, $message='')
 
static alpha ($value, $message='')
 
static digits ($value, $message='')
 
static alnum ($value, $message='')
 
static lower ($value, $message='')
 
static upper ($value, $message='')
 
static length ($value, $length, $message='')
 
static minLength ($value, $min, $message='')
 
static maxLength ($value, $max, $message='')
 
static lengthBetween ($value, $min, $max, $message='')
 
static fileExists ($value, $message='')
 
static file ($value, $message='')
 
static directory ($value, $message='')
 
static readable ($value, $message='')
 
static writable ($value, $message='')
 
static classExists ($value, $message='')
 
static subclassOf ($value, $class, $message='')
 
static interfaceExists ($value, $message='')
 
static implementsInterface ($value, $interface, $message='')
 
static propertyExists ($classOrObject, $property, $message='')
 
static propertyNotExists ($classOrObject, $property, $message='')
 
static methodExists ($classOrObject, $method, $message='')
 
static methodNotExists ($classOrObject, $method, $message='')
 
static keyExists ($array, $key, $message='')
 
static keyNotExists ($array, $key, $message='')
 
static validArrayKey ($value, $message='')
 
static count ($array, $number, $message='')
 
static minCount ($array, $min, $message='')
 
static maxCount ($array, $max, $message='')
 
static countBetween ($array, $min, $max, $message='')
 
static isList ($array, $message='')
 
static isNonEmptyList ($array, $message='')
 
static isMap ($array, $message='')
 
static isNonEmptyMap ($array, $message='')
 
static uuid ($value, $message='')
 
static throws (Closure $expression, $class='Exception', $message='')
 
static __callStatic ($name, $arguments)
 

Static Protected Member Functions

static valueToString ($value)
 
static typeToString ($value)
 
static strlen ($value)
 
static reportInvalidArgument ($message)
 

Detailed Description

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

@mixin Mixin

Since
1.0
Author
Bernhard Schussek bschu.nosp@m.ssek.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Member Function Documentation

◆ __callStatic()

static __callStatic (   $name,
  $arguments 
)
static
Exceptions
BadMethodCallException

◆ alnum()

static alnum (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ alpha()

static alpha (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ boolean()

static boolean (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert bool $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ classExists()

static classExists (   $value,
  $message = '' 
)
static

@psalm-assert class-string $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ contains()

static contains (   $value,
  $subString,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$subString
string$message
Exceptions
InvalidArgumentException

◆ count()

static count (   $array,
  $number,
  $message = '' 
)
static

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

Parameters
Countable | array$array
int$number
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:
Here is the caller graph for this function:

◆ countBetween()

static countBetween (   $array,
  $min,
  $max,
  $message = '' 
)
static

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

Parameters
Countable | array$array
int | float$min
int | float$max
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ digits()

static digits (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ directory()

static directory (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ email()

static email (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ endsWith()

static endsWith (   $value,
  $suffix,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$suffix
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ eq()

static eq (   $value,
  $expect,
  $message = '' 
)
static
Parameters
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ false()

static false (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert false $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ file()

static file (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ fileExists()

static fileExists (   $value,
  $message = '' 
)
static

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

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ float()

static float (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert float $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ greaterThan()

static greaterThan (   $value,
  $limit,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ greaterThanEq()

static greaterThanEq (   $value,
  $limit,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ implementsInterface()

static implementsInterface (   $value,
  $interface,
  $message = '' 
)
static

@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $interface @psalm-assert class-string<ExpectedType> $value

Parameters
mixed$value
mixed$interface
string$message
Exceptions
InvalidArgumentException

◆ inArray()

static inArray (   $value,
array  $values,
  $message = '' 
)
static

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

@psalm-pure

Parameters
mixed$value
array$values
string$message
Exceptions
InvalidArgumentException

◆ integer()

static integer (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert int $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ integerish()

static integerish (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert numeric $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ interfaceExists()

static interfaceExists (   $value,
  $message = '' 
)
static

@psalm-assert class-string $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ip()

static ip (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ipv4()

static ipv4 (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ ipv6()

static ipv6 (   $value,
  $message = '' 
)
static
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isAnyOf()

static isAnyOf (   $value,
array  $classes,
  $message = '' 
)
static

@psalm-pure @psalm-param array<class-string> $classes

Parameters
object | string$value
string[]$classes
string$message
Exceptions
InvalidArgumentException

◆ isAOf()

static isAOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType|class-string<ExpectedType> $value

Parameters
object | string$value
string$class
string$message
Exceptions
InvalidArgumentException

◆ isArray()

static isArray (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert array $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isArrayAccessible()

static isArrayAccessible (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert array|ArrayAccess $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isCallable()

static isCallable (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert callable $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isCountable()

static isCountable (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert countable $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isEmpty()

static isEmpty (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert empty $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isInstanceOf()

static isInstanceOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert ExpectedType $value

Parameters
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ isInstanceOfAny()

static isInstanceOfAny (   $value,
array  $classes,
  $message = '' 
)
static

@psalm-pure @psalm-param array<class-string> $classes

Parameters
mixed$value
array<object|string>$classes
string$message
Exceptions
InvalidArgumentException

◆ isIterable()

static isIterable (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert iterable $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ isList()

static isList (   $array,
  $message = '' 
)
static

@psalm-pure @psalm-assert list $array

Parameters
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isMap()

static isMap (   $array,
  $message = '' 
)
static

@psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array

Parameters
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isNonEmptyList()

static isNonEmptyList (   $array,
  $message = '' 
)
static

@psalm-pure @psalm-assert non-empty-list $array

Parameters
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isNonEmptyMap()

static isNonEmptyMap (   $array,
  $message = '' 
)
static

@psalm-pure @psalm-template T @psalm-param mixed|array<T> $array @psalm-assert array<string, T> $array @psalm-assert !empty $array

Parameters
mixed$array
string$message
Exceptions
InvalidArgumentException

◆ isNotA()

static isNotA (   $value,
  $class,
  $message = '' 
)
static

@psalm-pure @psalm-template UnexpectedType of object @psalm-param class-string<UnexpectedType> $class @psalm-assert !UnexpectedType $value @psalm-assert !class-string<UnexpectedType> $value

Parameters
object | string$value
string$class
string$message
Exceptions
InvalidArgumentException

◆ isTraversable()

static isTraversable (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert iterable $value

Deprecated:
use "isIterable" or "isInstanceOf" instead
Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ keyExists()

static keyExists (   $array,
  $key,
  $message = '' 
)
static

@psalm-pure

Parameters
array$array
string | int$key
string$message
Exceptions
InvalidArgumentException

◆ keyNotExists()

static keyNotExists (   $array,
  $key,
  $message = '' 
)
static

@psalm-pure

Parameters
array$array
string | int$key
string$message
Exceptions
InvalidArgumentException

◆ length()

static length (   $value,
  $length,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
int$length
string$message
Exceptions
InvalidArgumentException

◆ lengthBetween()

static lengthBetween (   $value,
  $min,
  $max,
  $message = '' 
)
static

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

@psalm-pure

Parameters
string$value
int | float$min
int | float$max
string$message
Exceptions
InvalidArgumentException

◆ lessThan()

static lessThan (   $value,
  $limit,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ lessThanEq()

static lessThanEq (   $value,
  $limit,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$limit
string$message
Exceptions
InvalidArgumentException

◆ lower()

static lower (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert lowercase-string $value

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ maxCount()

static maxCount (   $array,
  $max,
  $message = '' 
)
static

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

Parameters
Countable | array$array
int | float$max
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ maxLength()

static maxLength (   $value,
  $max,
  $message = '' 
)
static

Inclusive max.

@psalm-pure

Parameters
string$value
int | float$max
string$message
Exceptions
InvalidArgumentException

◆ methodExists()

static methodExists (   $classOrObject,
  $method,
  $message = '' 
)
static

@psalm-pure @psalm-param class-string|object $classOrObject

Parameters
string | object$classOrObject
mixed$method
string$message
Exceptions
InvalidArgumentException

◆ methodNotExists()

static methodNotExists (   $classOrObject,
  $method,
  $message = '' 
)
static

@psalm-pure @psalm-param class-string|object $classOrObject

Parameters
string | object$classOrObject
mixed$method
string$message
Exceptions
InvalidArgumentException

◆ minCount()

static minCount (   $array,
  $min,
  $message = '' 
)
static

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

Parameters
Countable | array$array
int | float$min
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ minLength()

static minLength (   $value,
  $min,
  $message = '' 
)
static

Inclusive min.

@psalm-pure

Parameters
string$value
int | float$min
string$message
Exceptions
InvalidArgumentException

◆ natural()

static natural (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert int $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notContains()

static notContains (   $value,
  $subString,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$subString
string$message
Exceptions
InvalidArgumentException

◆ notEmpty()

static notEmpty (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert !empty $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notEndsWith()

static notEndsWith (   $value,
  $suffix,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$suffix
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ notEq()

static notEq (   $value,
  $expect,
  $message = '' 
)
static
Parameters
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ notFalse()

static notFalse (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert !false $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notInstanceOf()

static notInstanceOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert !ExpectedType $value

Parameters
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ notNull()

static notNull (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert !null $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ notRegex()

static notRegex (   $value,
  $pattern,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$pattern
string$message
Exceptions
InvalidArgumentException

◆ notSame()

static notSame (   $value,
  $expect,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ notStartsWith()

static notStartsWith (   $value,
  $prefix,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$prefix
string$message
Exceptions
InvalidArgumentException

◆ notWhitespaceOnly()

static notWhitespaceOnly (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ null()

static null (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert null $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ numeric()

static numeric (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert numeric $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ object()

static object (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert object $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ oneOf()

static oneOf (   $value,
array  $values,
  $message = '' 
)
static

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

@psalm-pure

Parameters
mixed$value
array$values
string$message
Exceptions
InvalidArgumentException

◆ propertyExists()

static propertyExists (   $classOrObject,
  $property,
  $message = '' 
)
static

@psalm-pure @psalm-param class-string|object $classOrObject

Parameters
string | object$classOrObject
mixed$property
string$message
Exceptions
InvalidArgumentException

◆ propertyNotExists()

static propertyNotExists (   $classOrObject,
  $property,
  $message = '' 
)
static

@psalm-pure @psalm-param class-string|object $classOrObject

Parameters
string | object$classOrObject
mixed$property
string$message
Exceptions
InvalidArgumentException

◆ range()

static range (   $value,
  $min,
  $max,
  $message = '' 
)
static

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

@psalm-pure

Parameters
mixed$value
mixed$min
mixed$max
string$message
Exceptions
InvalidArgumentException

◆ readable()

static readable (   $value,
  $message = '' 
)
static
Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ regex()

static regex (   $value,
  $pattern,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$pattern
string$message
Exceptions
InvalidArgumentException

◆ reportInvalidArgument()

static reportInvalidArgument (   $message)
staticprotected
Parameters
string$message
Exceptions
InvalidArgumentException

@psalm-pure this method is not supposed to perform side-effects

◆ resource()

static resource (   $value,
  $type = null,
  $message = '' 
)
static

@psalm-pure @psalm-assert resource $value

Parameters
mixed$value
string | null$typetype of resource this should be.
See also
https://www.php.net/manual/en/function.get-resource-type.php
Parameters
string$message
Exceptions
InvalidArgumentException

◆ same()

static same (   $value,
  $expect,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
mixed$expect
string$message
Exceptions
InvalidArgumentException

◆ scalar()

static scalar (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert scalar $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ startsWith()

static startsWith (   $value,
  $prefix,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$prefix
string$message
Exceptions
InvalidArgumentException

◆ startsWithLetter()

static startsWithLetter (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ string()

static string (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert string $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ stringNotEmpty()

static stringNotEmpty (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert non-empty-string $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ strlen()

static strlen (   $value)
staticprotected
Here is the caller graph for this function:

◆ subclassOf()

static subclassOf (   $value,
  $class,
  $message = '' 
)
static

@psalm-pure @psalm-template ExpectedType of object @psalm-param class-string<ExpectedType> $class @psalm-assert class-string<ExpectedType>|ExpectedType $value

Parameters
mixed$value
string | object$class
string$message
Exceptions
InvalidArgumentException

◆ throws()

static throws ( Closure  $expression,
  $class = 'Exception',
  $message = '' 
)
static

@psalm-param class-string<Throwable> $class

Parameters
Closure$expression
string$class
string$message
Exceptions
InvalidArgumentException

◆ true()

static true (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert true $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ typeToString()

static typeToString (   $value)
staticprotected
Parameters
mixed$value
Returns
string

◆ unicodeLetters()

static unicodeLetters (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ uniqueValues()

static uniqueValues ( array  $values,
  $message = '' 
)
static

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

Parameters
array$values
string$message
Exceptions
InvalidArgumentException
Here is the call graph for this function:

◆ upper()

static upper (   $value,
  $message = '' 
)
static

@psalm-pure @psalm-assert !lowercase-string $value

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ uuid()

static uuid (   $value,
  $message = '' 
)
static

@psalm-pure

Parameters
string$value
string$message
Exceptions
InvalidArgumentException

◆ validArrayKey()

static validArrayKey (   $value,
  $message = '' 
)
static

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

@psalm-pure @psalm-assert array-key $value

Parameters
mixed$value
string$message
Exceptions
InvalidArgumentException

◆ valueToString()

static valueToString (   $value)
staticprotected
Parameters
mixed$value
Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writable()

static writable (   $value,
  $message = '' 
)
static
Parameters
string$value
string$message
Exceptions
InvalidArgumentException

The documentation for this class was generated from the following file: