<?php public static function invalidPlatformType($invalidPlatform): self
{
if (is_object($invalidPlatform)) {
return new self(
sprintf(
"Option 'platform' must be a subtype of '%s', instance of '%s' given",
<?php return new self(sprintf(
'Could not convert PHP value of type %s to type %s. Expected one of the following types: %s',
is_object($value) ? get_class($value) : gettype($value),
$toType,
implode(', ', $possibleTypes)
), 0, $previous);
<?php public static function conversionFailedSerialization($value, $format, $error)
{
$actualType = is_object($value) ? get_class($value) : gettype($value);
return new self(sprintf(
"Could not convert PHP type '%s' to '%s', as an '%s' error was triggered by the serialization",