public static function fromOption($option)
    {
        $message = sprintf(
            'Could not add invalid Option of type "%1$s" to option repository.',
            is_object($option)
                ? get_class($option)
                : gettype($option)
        );

        return new static($message);
    }
public static function fromOption($option)
    {
        $message = sprintf(
            'Could not add invalid Option of type "%1$s" to option repository.',
            is_object($option)
                ? get_class($option)
                : gettype($option)
        );

        return new static($message);
    }
public static function fromOption ( $ option ) { $ message = sprintf ( 'Could not add invalid Option of type "%1$s" to option repository.' , is_object ( $ option ) ? get_class ( $ option ) : gettype ( $ option ) ) ; return new static ( $ message ) ; }
Get a new exception based on the type of an invalid option.

@since 0.1.0

@param mixed $option Option that was tried to be added.

@return static
Get a new exception based on the type of an invalid option .