TypeError
extends RuntimeException
in package
FinalYes
Exception for an invalid argument type passed.
Tags
Table of Contents
Methods
Methods
create()
Create a new TypeError exception with a standardized text.
public
static create(int $position, string $name, string $expected, mixed $received) : TypeError
Parameters
- $position : int
-
The argument position in the function signature. 1-based.
- $name : string
-
The argument name in the function signature.
- $expected : string
-
The argument type expected as a string.
- $received : mixed
-
The actual argument received.