original_string: protected function parseEnv(string $param, array $variables, int $key): string
      {
          $env = getenv($variables[1][$key]);
          if (false === $env && !empty($variables[3][$key])) {
              return str_replace($variables[0][$key], $variables[3][$key], $param);
          }
          if (false === $env) {
              throw new Exception\EnvVariableNotFound('env variable '.$variables[1][$key].' required but it is neither set not a default value exists');
          }
  
          return str_replace($variables[0][$key], $env, $param);
      }
code: protected function parseEnv(string $param, array $variables, int $key): string
      {
          $env = getenv($variables[1][$key]);
          if (false === $env && !empty($variables[3][$key])) {
              return str_replace($variables[0][$key], $variables[3][$key], $param);
          }
          if (false === $env) {
              throw new Exception\EnvVariableNotFound('env variable '.$variables[1][$key].' required but it is neither set not a default value exists');
          }
  
          return str_replace($variables[0][$key], $env, $param);
      }
code_tokens: protected function parseEnv ( string $ param , array $ variables , int $ key ) : string { $ env = getenv ( $ variables [ 1 ] [ $ key ] ) ; if ( false === $ env && ! empty ( $ variables [ 3 ] [ $ key ] ) ) { return str_replace ( $ variables [ 0 ] [ $ key ] , $ variables [ 3 ] [ $ key ] , $ param ) ; } if ( false === $ env ) { throw new Exception \ EnvVariableNotFound ( 'env variable ' . $ variables [ 1 ] [ $ key ] . ' required but it is neither set not a default value exists' ) ; } return str_replace ( $ variables [ 0 ] [ $ key ] , $ env , $ param ) ; }
docstring: Parse env.
docstring_tokens: Parse env .