<commit_before><?php
namespace Concrete\Core\Config;

use Illuminate\Filesystem\Filesystem;

class FileLoader extends \Illuminate\Config\FileLoader implements LoaderInterface
{

    public function __construct(Filesystem $files)
    {
        parent::__construct($files, DIR_APPLICATION . '/config');
        $this->addNamespace('core', DIR_BASE . '/concrete/config');
    }

    public function load($environment, $group, $namespace = null)
    {
        $items = array();

        // First we'll get the root configuration path for the environment which is
        // where all of the configuration files live for that namespace, as well
        // as any environment folders with their specific configuration items.
        $path = $this->getPath($namespace);

        if (is_null($path)) {
            return $items;
        }

        if ($namespace === null) {
            // No namespace, let's load up the concrete config first.
            $items = parent::load($environment, $group, 'core');

            $file = "{$path}/generated_overrides/{$group}.php";
            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }

            $file = "{$path}/{$group}.php";

            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }
        } else {
            // First we'll get the main configuration file for the groups. Once we have
            // that we can check for any environment specific files, which will get
            // merged on top of the main arrays to make the environments cascade.
            $file = "{$path}/{$group}.php";

            if ($this->files->exists($file)) {
                $items = (array)$this->files->getRequire($file);
            }
        }

        // Finally we're ready to check for the environment specific configuration
        // file which will be merged on top of the main arrays so that they get<commit_msg>allow for generated package configuration<commit_after><?php
namespace Concrete\Core\Config;

use Illuminate\Filesystem\Filesystem;

class FileLoader extends \Illuminate\Config\FileLoader implements LoaderInterface
{

    public function __construct(Filesystem $files)
    {
        parent::__construct($files, DIR_APPLICATION . '/config');
        $this->addNamespace('core', DIR_BASE . '/concrete/config');
    }

    public function load($environment, $group, $namespace = null)
    {
        $items = array();

        // First we'll get the root configuration path for the environment which is
        // where all of the configuration files live for that namespace, as well
        // as any environment folders with their specific configuration items.
        $path = $this->getPath($namespace);

        if (is_null($path)) {
            return $items;
        }

        if ($namespace === null) {
            // No namespace, let's load up the concrete config first.
            $items = parent::load($environment, $group, 'core');

            $file = "{$path}/generated_overrides/{$group}.php";
            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }

            $file = "{$path}/{$group}.php";

            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }
        } else {
            // First we'll get the main configuration file for the groups. Once we have
            // that we can check for any environment specific files, which will get
            // merged on top of the main arrays to make the environments cascade.
            $file = "{$path}/{$group}.php";

            if ($this->files->exists($file)) {
                $items = (array)$this->files->getRequire($file);
            }

            $file = "{$path}/generated_overrides/{$namespace}/{$group}.php";
            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }

            $file = "{$path}/{$namespace}/{$group}.php";
            if ($this->files->exists($file)) {
                $items = $this->mergeEnvironment($items, $file);
            }
        }

        // Finally we're ready to check for the environment specific configuration
        // file which will be merged on top of the main arrays so that they get
{'fraction_non_alphanumeric': 0.1275, 'fraction_numerical': 0.0, 'mean_word_length': 2.1346153846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917091', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1088, 'n_words': 351}