src/Environment.php
public function get(string $name, string $default = ''): string
    {
        $val = \trim($this->data[$name] ?? '');
        
        if ($val !== '') {
            return $val;
        }
        
        $val = \getenv($name);
        
        if (!\is_string($val)) {
            return $default;
        }
        
        return ('' === ($val = \trim($val))) ? $default : $val;
    }
public function get(string $name, string $default = ''): string
    {
        $val = \trim($this->data[$name] ?? '');
        
        if ($val !== '') {
            return $val;
        }
        
        $val = \getenv($name);
        
        if (!\is_string($val)) {
            return $default;
        }
        
        return ('' === ($val = \trim($val))) ? $default : $val;
    }
Get the (string) value of an environment variable.

@param string $name Name of the environment variable.
@param string $default Default value to be used if no string value is set in env.
@return string Value of the requested env var.