<commit_before><?php

namespace LumengPHP\Kernel;

use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\HttpKernel\EventListener\RouterListener;
use LumengPHP\Kernel\ControllerResolver;
use LumengPHP\Kernel\EventListener\CommandInitializationListener;
use LumengPHP\Kernel\EventListener\FilterListener;
use LumengPHP\DependencyInjection\ServiceContainer;
use LumengPHP\Kernel\Extension\Extension;
use LumengPHP\Kernel\Facade\Facade;

/**
 * AppKernel convert a Request object to a Response one.
 *
 * @author Lumeng <<EMAIL>>
 */
class AppKernel implements HttpKernelInterface, TerminableInterface {

    /**
     * @var AppConfig AppConfig对象
     */
    private $appConfig;

    /**
     * @var ServiceContainer 服务容器
     */
    private $container;

    /**
     * @var AppContext 
     */
    private $appContext;

    /**
     * @var HttpKernel 
     */
    private $kernel;

    public function __construct($configFilepath) {
        $this->appConfig = new AppConfig(require($configFilepath));

        $this->initServiceContainer();

        $this->appContext = new AppContextImpl($this->appConfig, $this->container);

        $this->container->registerService('appContext', $this->appContext);

        Facade::setAppContext($this->appContext);

        //初始化
        $this->initialize();

        //加载扩展
        $this->loadExtensions();
    }<commit_msg>优化变量名称<commit_after><?php

namespace LumengPHP\Kernel;

use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\HttpKernel\EventListener\RouterListener;
use LumengPHP\Kernel\ControllerResolver;
use LumengPHP\Kernel\EventListener\CommandInitializationListener;
use LumengPHP\Kernel\EventListener\FilterListener;
use LumengPHP\DependencyInjection\ServiceContainer;
use LumengPHP\Kernel\Extension\Extension;
use LumengPHP\Kernel\Facade\Facade;

/**
 * AppKernel convert a Request object to a Response one.
 *
 * @author Lumeng <<EMAIL>>
 */
class AppKernel implements HttpKernelInterface, TerminableInterface {

    /**
     * @var AppConfig AppConfig对象
     */
    private $appConfig;

    /**
     * @var ServiceContainer 服务容器
     */
    private $container;

    /**
     * @var AppContext 
     */
    private $appContext;

    /**
     * @var HttpKernel 
     */
    private $kernel;

    public function __construct($configFilePath) {
        $this->appConfig = new AppConfig(require($configFilePath));

        $this->initServiceContainer();

        $this->appContext = new AppContextImpl($this->appConfig, $this->container);

        $this->container->registerService('appContext', $this->appContext);

        Facade::setAppContext($this->appContext);

        //初始化
        $this->initialize();

        //加载扩展
        $this->loadExtensions();
    }
{'fraction_non_alphanumeric': 0.10976594027441484, 'fraction_numerical': 0.0, 'mean_word_length': 4.072305593451569, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 29, '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': '6627088', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1040, 'n_words': 184}