src/Incoming/Structure/Exception/InvalidStructuralTypeException.php
public static function withTypeInfo($value, int $code = 0, Throwable $previous = null): self
    {
        $message = self::DEFAULT_MESSAGE;

        $message .= sprintf(
            self::MESSAGE_EXTENSION_TYPE_FORMAT,
            is_object($value) ? get_class($value) : gettype($value)
        );

        return new static($message, $code, $previous);
    }
public static function withTypeInfo($value, int $code = 0, Throwable $previous = null): self
    {
        $message = self::DEFAULT_MESSAGE;

        $message .= sprintf(
            self::MESSAGE_EXTENSION_TYPE_FORMAT,
            is_object($value) ? get_class($value) : gettype($value)
        );

        return new static($message, $code, $previous);
    }
public static function withTypeInfo ( $ value , int $ code = 0 , Throwable $ previous = null ) : self { $ message = self :: DEFAULT_MESSAGE ; $ message .= sprintf ( self :: MESSAGE_EXTENSION_TYPE_FORMAT , is_object ( $ value ) ? get_class ( $ value ) : gettype ( $ value ) ) ; return new static ( $ message , $ code , $ previous ) ; }
Create an exception instance with type information.

The type is automatically inspected based on the passed value.

@param mixed $value The value to inspect type information of.
@param int $code The exception code.
@param Throwable|null $previous A previous exception used for chaining.
@return static The newly created exception.
Create an exception instance with type information .