<commit_before><?php
namespace Core\Container;

use Core\Core\Resolver;
use Core\Http\Request;
use Core\Http\Response;
use Core\Routing\Router;
use InvalidArgumentException;
use Interop\Container\ContainerInterface;
use Pimple\Container as PimpleContainer;

/**
 * Container
 *
 * @author <<EMAIL>>
 */
class Container extends PimpleContainer implements ContainerInterface
{
    /**
     * Container constructor.
     * @param string $basePath
     * @param array $values
     */
    public function __construct($basePath = '', array $values = [])
    {
        parent::__construct($values);

        // Set base path
        $config['basePath'] = $basePath;

        // Load application configuration.
        if (is_file($basePath . '/Config/Config.php')) {
            $config = include $basePath . '/Config/Config.php';
        } else {
            $config = [];
        }

        // Set app routes path
        $config['routesPath'] = $basePath . '/routes.php';

        // Set path where views are stored
        $config['viewsPath'] = $basePath . '/Views';

        // Store config
        $this['config'] = $config;

        // Create executable resolver
        $this['resolver'] = function ($c) {
            return new Resolver($c);
        };

        // Create request class closure.
        $this['request'] = function () {
            return new Request($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES);
        };

        // Create response class closure.
        $this['response'] = function ($c) {
            $response = new Response();
            $response->setProtocolVersion($c['request']->getProtocolVersion());
            return $response;
        };

        // Create router class closure
        $this['router'] = function () {
            return new Router();
        };
    }

    /**
     * Get entry from container
     *
     * @param string $key
     * @return mixed
     * @throws InvalidArgumentException
     */
    public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $key));
        }
        return $this->offsetGet($key);
    }

    /**
     * Check for existence in container
     *
     * @param string $key
     * @return boolean
     */
    public function has($key)
    {
        return $this->offsetExists($key);
    }
}<commit_msg>Fixes<commit_after><?php
namespace Core\Container;

use Core\Core\Resolver;
use Core\Http\Request;
use Core\Http\Response;
use Core\Routing\Router;
use InvalidArgumentException;
use Interop\Container\ContainerInterface;
use Pimple\Container as PimpleContainer;

/**
 * Container
 *
 * @author <<EMAIL>>
 */
class Container extends PimpleContainer implements ContainerInterface
{
    /**
     * Container constructor.
     * @param string $basePath
     * @param array $values
     */
    public function __construct($basePath = '', array $values = [])
    {
        parent::__construct($values);

        // Load application configuration.
        if (is_file($basePath . '/Config/Config.php')) {
            $config = include $basePath . '/Config/Config.php';
        } else {
            $config = [];
        }

        // Set base path
        $config['basePath'] = $basePath;

        // Set app routes path
        $config['routesPath'] = $basePath . '/routes.php';

        // Set path where views are stored
        $config['viewsPath'] = $basePath . '/Views';

        // Store config
        $this['config'] = $config;

        // Create executable resolver
        $this['resolver'] = function ($c) {
            return new Resolver($c);
        };

        // Create request class closure.
        $this['request'] = function () {
            return new Request($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES);
        };

        // Create response class closure.
        $this['response'] = function ($c) {
            $response = new Response();
            $response->setProtocolVersion($c['request']->getProtocolVersion());
            return $response;
        };

        // Create router class closure
        $this['router'] = function () {
            return new Router();
        };
    }

    /**
     * Get entry from container
     *
     * @param string $key
     * @return mixed
     * @throws InvalidArgumentException
     */
    public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $key));
        }
        return $this->offsetGet($key);
    }

    /**
     * Check for existence in container
     *
     * @param string $key
     * @return boolean
     */
    public function has($key)
    {
        return $this->offsetExists($key);
    }
}
{'fraction_non_alphanumeric': 0.1363255033557047, 'fraction_numerical': 0.0, 'mean_word_length': 2.0550928891736064, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '5740824', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1258, 'n_words': 328}