src/core/AppHelper.php
public function run(): void
    {
        if (!$this->isAppRootSet()) {
            throw new Exception("The application root wasn't defined.");
        }
        if (!$this->isConfigFileSet()) {
            throw new Exception("The main config file wasn't defined.");
        }
        $configPath = $this->getAppRoot().$this->getConfigFile();
        if (!is_readable($configPath)) {
            throw new Exception("It's unable to load ".$configPath
                .'as main config file.');
        }
        $config = require_once $configPath;
        if (!is_array($config)) {
            throw new Exception('The main config must be an array.');
        }
        $this->configSet = $config;
    }
public function run(): void
    {
        if (!$this->isAppRootSet()) {
            throw new Exception("The application root wasn't defined.");
        }
        if (!$this->isConfigFileSet()) {
            throw new Exception("The main config file wasn't defined.");
        }
        $configPath = $this->getAppRoot().$this->getConfigFile();
        if (!is_readable($configPath)) {
            throw new Exception("It's unable to load ".$configPath
                .'as main config file.');
        }
        $config = require_once $configPath;
        if (!is_array($config)) {
            throw new Exception('The main config must be an array.');
        }
        $this->configSet = $config;
    }
It loads main file of configuration and checks for validity.
@return void
@throws Exception It's thrown if some errors with the main configuration
file occurred.