src/GeoJson/Exception/UnserializationException.php
public static function invalidValue($context, $value, $expectedType)
    {
        return new self(sprintf(
            '%s expected value of type %s, %s given',
            $context,
            $expectedType,
            is_object($value) ? get_class($value) : gettype($value)
        ));
    }
public static function invalidValue($context, $value, $expectedType)
    {
        return new self(sprintf(
            '%s expected value of type %s, %s given',
            $context,
            $expectedType,
            is_object($value) ? get_class($value) : gettype($value)
        ));
    }
Creates an UnserializationException for a value with an invalid type.

@param string $context
@param mixed $value
@param string $expectedType
@return UnserializationException