N98\Util\VerifyOrDie::argumentType PHP Method

argumentType() public static method

public static argumentType ( string $name, string $internalType, mixed $subject )
$name string
$internalType string
$subject mixed
    public static function argumentType($name, $internalType, $subject)
    {
        $actual = gettype($subject);
        if ($actual !== $internalType) {
            throw new InvalidArgumentException(sprintf('Parameter %s must be of type %s, %s given', $name, $internalType, $actual));
        }
    }