Returns the core errors which are being handled

Uses the currently running environment when none is given.

@param  string|null $env     Name of the environment

@return int
15861
public function getCoreErrors($env = null)
    {
        $env = $env ?: $this->running_env;
        return isset($this->errors[$env]) ? $this->errors[$env] : 0;
    }
751740
public function getKey($env, $key)
	{
		$map = $this->getMap($env);

		return isset($map[$key]) ? $map[$key] : null;
	}
460751
private function deleteCache(string $env)
    {
        Output::displayAsSuccess("Hey, I delete cache from $env environment ", "none");
        $this->callDelCreaServer($env);
        if (in_array("--noexit", $this->options["options"])) {
            Output::displayAsEndSuccess("Cache delete for $env environment is successfull.", "none");
        } else {
            Output::displayAsNormal("Cache delete for $env environment is successfull.");
        }
    }
370633
public static function env($key=null,$default=null){
    return $key ? (filter_input(INPUT_ENV,$key) ?: (is_callable($default)?call_user_func($default):$default))  : $_ENV;
  }
496160
public static function getEnv($key = '')
    {
        if (self::$env_setting === null) {
            return self::get($key);
        }

        $arr = explode('.', $key);

        $value = null;
        foreach ($arr as $kv) {
            if (empty($kv)) {
                $value = null;
                break;
            }
            if ($value === null) {
                if (isset(self::$env_setting->$kv)) {
                    $value =  self::$env_setting->$kv;
                    continue;
                }
                $value = null;
                break;
            } else {
                if (isset($value->$kv)) {
                    $value =  $value->$kv;
                    continue;
                }
                $value = null;
                break;
            }
        }

        if ($value === null) {
            return self::get($key);
        }
        return $value;
    }
445417
public function load($env)
    {
        try {
            return $this->files->getRequire($this->path($env));
        } catch (Exception $e) {
            return false;
        }
    }
861019
public function evaluate(EnvironmentInterface $env)
    {
        $qb = $env->queryBuilder;

        $paramTemplate = $env->newParamName();
        $paramValue = $env->newParamName();
        $paramVs = $env->newParamName();

        $rootAliases = $qb->getRootAliases();
        
        $qb->innerJoin($rootAliases[0] . '.valueSet', $paramVs)
            ->innerJoin($paramVs . '.template', $paramTemplate);

        switch ($this->operator) {
            case 'in':
                $qb->andWhere($paramTemplate . '.id IN (:' . $paramValue . ')');
                break;
            case 'notin':
                $qb->andWhere($paramTemplate . '.id NOT IN (:' . $paramValue . ')');
                break;
        }

        $qb->setParameter($paramValue, $this->getRight()->getValue());
    }
1277182
public static function get($key, $default = null)
    {
        $value = getenv(Str::upper($key));

        if (is_string($value)) {
            return $value;
        }

        return isset(static::$env[$key]) ? static::$env[$key] : $default;
    }
203507
public function getEnvBaseUrl($env)
    {
        switch ($env) {
            case self::ENV_PROD:
                return self::BASE_URL_PROD;
            case self::ENV_STAGE:
                return self::BASE_URL_STAGE;
            case self::ENV_MOCK:
                return null;
        }
    }
49674
public function collectEnvVars(array $env)
    {
        $envCollector = new CiEnvVarsCollector($this->config);

        try {
            $this->jsonFile->fillJobs($envCollector->collect($env));
        } catch (\PhpCoveralls\Bundle\CoverallsBundle\Entity\Exception\RequirementsNotSatisfiedException $e) {
            $e->setReadEnv($envCollector->getReadEnv());

            throw $e;
        }

        return $this;
    }
92935
public static function env(string $key, $default = null)
    {
        self::initialize();
        $value = getenv($key);
        if ($value === false) {
            return $default;
        }
        return $value;
    }
552050
private function parseEnvironmentParams($value)
    {
        // env.variable is an environment variable
        $env = explode('.', $value);
        if ('env' === $env[0]) {
            $envParam = getenv($env[1]);
            if (false === $envParam) {
                throw new InvalidArgumentException("Environment variable '$env[1]' is not defined.");
            }

            return $envParam;
        }

        return null;
    }
941776
public function findError()
    {
        $requiredEnvironmentError = $this->ensureRequiredEnvironment();
        if ($requiredEnvironmentError !== null) {
            return $this->setErrorTitle($requiredEnvironmentError, 'Environment requirements not fulfilled');
        }

        $filePermissionsError = $this->checkFilePermissions();
        if ($filePermissionsError !== null) {
            return $this->setErrorTitle($filePermissionsError, 'Error with file system permissions');
        }

        return null;
    }
725738
public static function getFileEnv(string $env):string
    {
        $env = strtolower($env);
        if (in_array($env, array("dev", "prod"))) {
            return (self::$env_file);
        } else {
            throw new \Exception("Environment Error : Environment $env doesn't exist");
        }
    }
309783
protected function getEnvConfig($name, $env = 'development')
    {
        $default = $this->getArrayDot($this->config, $name, null);
        $env     = $this->getArrayDot($this->config, "env.{$env}.{$name}", null);

        // get merged subtree
        if (is_array($default) && is_array($env)) {
            return array_replace_recursive($default, $env);
        }

        // no default => get env value
        if (!is_null($env)) {
            return $env;
        }

        return $default;
    }
416971
public function env($name)
    {
        return isset($this->_envs[$name])
            ? $this->_envs[$name]
            : null;
    }
101869
private function PrepareRuleset($env){

		$hasOnePassingSelector = false;
		$selectors = array();
		if( $this->selectors ){
			Less_Tree_DefaultFunc::error("it is currently only allowed in parametric mixin guards,");

			foreach($this->selectors as $s){
				$selector = $s->compile($env);
				$selectors[] = $selector;
				if( $selector->evaldCondition ){
					$hasOnePassingSelector = true;
				}
			}

			Less_Tree_DefaultFunc::reset();
		} else {
			$hasOnePassingSelector = true;
		}

		if( $this->rules && $hasOnePassingSelector ){
			$rules = $this->rules;
		}else{
			$rules = array();
		}

		$ruleset = new Less_Tree_Ruleset($selectors, $rules, $this->strictImports);

		$ruleset->originalRuleset = $this->ruleset_id;

		$ruleset->root = $this->root;
		$ruleset->firstRoot = $this->firstRoot;
		$ruleset->allowImports = $this->allowImports;


		// push the current ruleset to the frames stack
		$env->unshiftFrame($ruleset);


		// Evaluate imports
		if( $ruleset->root || $ruleset->allowImports || !$ruleset->strictImports ){
			$ruleset->evalImports($env);
		}

		return $ruleset;
	}