src/Util/Env.php
public static function bool(string $key, bool $default = false): bool
    {
        if (isset($_ENV[$key]) === false) {
            return $default;
        }

        $value = trim(strtolower($_ENV[$key]));

        switch ($value) {
            case '1':
            case 'true':
                return true;
            case '':
            case '0':
            case 'false':
                return false;
        }

        throw TypeErrorException::invalidType($value, 'boolean');
    }
public static function bool(string $key, bool $default = false): bool
    {
        if (isset($_ENV[$key]) === false) {
            return $default;
        }

        $value = trim(strtolower($_ENV[$key]));

        switch ($value) {
            case '1':
            case 'true':
                return true;
            case '':
            case '0':
            case 'false':
                return false;
        }

        throw TypeErrorException::invalidType($value, 'boolean');
    }
@param string $key
@param bool $default

@throws TypeErrorException

@return bool