ArrayOrTraversableGuardTrait
Provide a guard method for array or Traversable data
Table of Contents
Methods
- guardForArrayOrTraversable() : void
- Verifies that the data is an array or Traversable
Methods
guardForArrayOrTraversable()
Verifies that the data is an array or Traversable
protected
guardForArrayOrTraversable(mixed $data[, string $dataName = 'Argument' ][, string $exceptionClass = InvalidArgumentException::class ]) : void
Parameters
- $data : mixed
-
the data to verify
- $dataName : string = 'Argument'
-
the data name
- $exceptionClass : string = InvalidArgumentException::class
-
FQCN for the exception