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

@param string $context
@param string $property
@param mixed $value
@param string $expectedType
@return UnserializationException
Creates an UnserializationException for a property with an invalid type .