src/Primitive/Support/Traits/RetrievableTrait.php
public function getStringable($value, $default = null)
    {
        switch (true)
        {
            case is_string($value):
            case $value instanceof StringContract:
            case $value instanceof BooleanContract:
            case $value instanceof IntegerContract:
            case $value instanceof FloatContract:
                return (string) $value;

            case is_array($value):
            case $value instanceof ContainerContract:
            case $value instanceof ArrayableContract:
                return (string) container($value)->join();

            case is_bool($value):
                return (string) bool($value);

            case is_numeric($value):
            case is_object($value) && method_exists($value, '__toString'):
                return (string) $value;

            default:
                return value($default);
        }
    }
public function getStringable($value, $default = null)
    {
        switch (true)
        {
            case is_string($value):
            case $value instanceof StringContract:
            case $value instanceof BooleanContract:
            case $value instanceof IntegerContract:
            case $value instanceof FloatContract:
                return (string) $value;

            case is_array($value):
            case $value instanceof ContainerContract:
            case $value instanceof ArrayableContract:
                return (string) container($value)->join();

            case is_bool($value):
                return (string) bool($value);

            case is_numeric($value):
            case is_object($value) && method_exists($value, '__toString'):
                return (string) $value;

            default:
                return value($default);
        }
    }
Retrieve string from number, string, bool, array,  FloatContract, IntegerContract
StringContract, BooleanContract, ContainerContract, ArrayableContract or
object that has __toString method, otherwise return $default.

@param mixed $value
@param mixed $default
@return string