UnexpectedTypeException

Extends \InvalidArgumentException

package

Default

Methods

__construct

__construct(mixed $actual, string $expectedType, integer $code, \Exception $previous = null) 

Arguments

$actual

mixed

The thing that was given. For example: $myVar

$expectedType

string

What it was expected to be. For example: 'array'

$code

integer

[optional] The Exception code.

$previous

\Exception

[optional] The previous exception used for the exception chaining. Since 5.3.0