src/Primitive/Support/Traits/RetrievableTrait.php
public function getBoolable($value, $default = null)
    {
        switch (true)
        {
            case is_bool($value):
                return $value;

            case is_numeric($value):
                return (bool) ((int) $value);

            case is_string($value):
            case $value instanceof StringContract:
                return $this->boolFromString($value);

            case $value instanceof BooleanContract:
                return $value->value();

            case $value instanceof IntegerContract:
            case $value instanceof FloatContract:
                return $value->toBool()->value();

            case $value instanceof ContainerContract:
                return $value->isNotEmpty();

            default:
                return value($default);
        }
    }
public function getBoolable($value, $default = null)
    {
        switch (true)
        {
            case is_bool($value):
                return $value;

            case is_numeric($value):
                return (bool) ((int) $value);

            case is_string($value):
            case $value instanceof StringContract:
                return $this->boolFromString($value);

            case $value instanceof BooleanContract:
                return $value->value();

            case $value instanceof IntegerContract:
            case $value instanceof FloatContract:
                return $value->toBool()->value();

            case $value instanceof ContainerContract:
                return $value->isNotEmpty();

            default:
                return value($default);
        }
    }
Retrieve bool from number, string, bool, FloatContract, IntegerContract
StringContract, BooleanContract, ContainerContract, otherwise return $default.

@param mixed $value
@param mixed $default
@return bool