src/Config.php
public function load($files, $forceReload = false)
    {
        if (!is_array($files)) {
            // Make it an array so we can use the same code
            $files = [$files];
        }

        foreach ($files as $file) {
            if ((array_key_exists($file, $this->files) && !$forceReload)
                || !is_file($file) || !is_readable($file)) {
                // It's already loaded, or doesn't exist, so let's skip it
                continue;
            }

            $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));

            if (!array_key_exists($ext, $this->readers)) {
                throw new \Exception("No reader found for the extension '{$ext}'");
            }

            $conf = $this->readers[$ext]->read($file);

            if ($conf && is_array($conf)) {
                // We're only interested if it is a non-empty array
                $this->override($conf);
                $this->files[$file] = true;
            }

            unset($conf);
        }
    }
public function load($files, $forceReload = false)
    {
        if (!is_array($files)) {
            // Make it an array so we can use the same code
            $files = [$files];
        }

        foreach ($files as $file) {
            if ((array_key_exists($file, $this->files) && !$forceReload)
                || !is_file($file) || !is_readable($file)) {
                // It's already loaded, or doesn't exist, so let's skip it
                continue;
            }

            $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));

            if (!array_key_exists($ext, $this->readers)) {
                throw new \Exception("No reader found for the extension '{$ext}'");
            }

            $conf = $this->readers[$ext]->read($file);

            if ($conf && is_array($conf)) {
                // We're only interested if it is a non-empty array
                $this->override($conf);
                $this->files[$file] = true;
            }

            unset($conf);
        }
    }
{@inheritdoc}