<commit_before><?php
/**
 * Part of the Colonel Library
 *
 * @author <NAME> <<EMAIL>>
 * @license GNUv3
 */

namespace Colonel;

use League\Route\Http\Exception;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use League\Container\Container;
use League\Route\RouteCollection;
use League\Route\Http\Exception\NotFoundException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;

/**
 * The HTTP Kernel
 *
 * @package Colonel
 * @author  <NAME> <<EMAIL>>
 */
final class HttpKernel implements HttpKernelInterface, TerminableInterface
{
    /**
     * @var Configuration
     */
    private $configuration;

    /**
     * Class Constructor
     *
     * @param array $configuration
     */
    public function __construct(
        array $configuration = []
    ) {
        $this->configuration = new Configuration($configuration);
        $this->configuration['debug'] === true ?
            Profiler::start('HttpKernel') :
            ''
        ;

        $this->container     = new Container($this->configuration['services']);
        $this->container->singleton('config', $this->configuration);

        $this->router = new RouteCollection($this->container);
        $this->router->setStrategy(new UriRequestStrategy);

        foreach($this->configuration['routes'] as $collection) {
            foreach($collection as $route) {
                $this->router->addRoute(
                    $route['method'],
                    $route['pattern'],
                    $route['controller']
                );
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)<commit_msg>Fixes#2 : Improve alias name for configuration class<commit_after><?php
/**
 * Part of the Colonel Library
 *
 * @author <NAME> <<EMAIL>>
 * @license GNUv3
 */

namespace Colonel;

use League\Route\Http\Exception;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use League\Container\Container;
use League\Route\RouteCollection;
use League\Route\Http\Exception\NotFoundException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;

/**
 * The HTTP Kernel
 *
 * @package Colonel
 * @author  <NAME> <<EMAIL>>
 */
final class HttpKernel implements HttpKernelInterface, TerminableInterface
{
    /**
     * @var Configuration
     */
    private $configuration;

    /**
     * Class Constructor
     *
     * @param array $configuration
     */
    public function __construct(
        array $configuration = []
    ) {
        $this->configuration = new Configuration($configuration);
        $this->configuration['debug'] === true ?
            Profiler::start('HttpKernel') :
            ''
        ;

        $this->container     = new Container($this->configuration['services']);
        $this->container->singleton('Colonel\\Configuration', $this->configuration);

        $this->router = new RouteCollection($this->container);
        $this->router->setStrategy(new UriRequestStrategy);

        foreach($this->configuration['routes'] as $collection) {
            foreach($collection as $route) {
                $this->router->addRoute(
                    $route['method'],
                    $route['pattern'],
                    $route['controller']
                );
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)
{'fraction_non_alphanumeric': 0.13256006628003314, 'fraction_numerical': 0.0008285004142502071, 'mean_word_length': 2.6075697211155378, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 43, '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': '2312882', 'n_tokens_mistral': 947, 'n_tokens_neox': 927, 'n_words': 189}