<commit_before><?php

namespace Core;

use Prob\Handler\ParameterMap;
use Prob\Router\Dispatcher;
use Prob\Rewrite\Request;
use Prob\Router\Map;
use Prob\Router\Matcher;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;

class Framework
{
    private $map;
    private $siteConfig = [];
    private $viewEngineConfig = [];
    private $dbConfig = [];

    private function __construct()
    {
    }

    /**
     * @return Framework
     */
    public static function getInstance()
    {
        static $instance = null;

        if ($instance === null) {
            $instance = new self();
        }

        return $instance;
    }

    public function boot()
    {
        $this->setDisplayError();

        $this->setSiteConfig(require '../config/site.php');
        $this->setDbConfig(require '../config/db.php');
        $this->setViewEngineConfig(require '../config/viewEngine.php');
        $this->setRouterMap(require '../config/router.php');

        $this->dispatcher(new Request());
    }

    public function setDisplayError($isDisplay = true)
    {
        error_reporting(E_ALL);
        ini_set('display_errors', $isDisplay);
    }

    public function setRouterMap(Map $routeMap)
    {
        $this->map = $routeMap;
    }

    public function setSiteConfig(array $siteConfig)
    {
        $this->siteConfig = $siteConfig;
    }

    public function setDbConfig(array $dbConfig)
    {
        $this->dbConfig = $dbConfig;
    }

    public function setViewEngineConfig(array $viewEngineConfig)
    {
        $this->viewEngineConfig = $viewEngineConfig;
    }

    public function getEntityManager()
    {
        $config = Setup::createAnnotationMetadataConfiguration(
                    $this->dbConfig['entityPath'],
                    $this->dbConfig['devMode']
                    );
        return EntityManager::create($this->dbConfig[$this->siteConfig['database']], $config);<commit_msg>Framework::getEntityManager()에 phpDoc 주석 추가<commit_after><?php

namespace Core;

use Prob\Handler\ParameterMap;
use Prob\Router\Dispatcher;
use Prob\Rewrite\Request;
use Prob\Router\Map;
use Prob\Router\Matcher;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;

class Framework
{
    private $map;
    private $siteConfig = [];
    private $viewEngineConfig = [];
    private $dbConfig = [];

    private function __construct()
    {
    }

    /**
     * @return Framework
     */
    public static function getInstance()
    {
        static $instance = null;

        if ($instance === null) {
            $instance = new self();
        }

        return $instance;
    }

    public function boot()
    {
        $this->setDisplayError();

        $this->setSiteConfig(require '../config/site.php');
        $this->setDbConfig(require '../config/db.php');
        $this->setViewEngineConfig(require '../config/viewEngine.php');
        $this->setRouterMap(require '../config/router.php');

        $this->dispatcher(new Request());
    }

    public function setDisplayError($isDisplay = true)
    {
        error_reporting(E_ALL);
        ini_set('display_errors', $isDisplay);
    }

    public function setRouterMap(Map $routeMap)
    {
        $this->map = $routeMap;
    }

    public function setSiteConfig(array $siteConfig)
    {
        $this->siteConfig = $siteConfig;
    }

    public function setDbConfig(array $dbConfig)
    {
        $this->dbConfig = $dbConfig;
    }

    public function setViewEngineConfig(array $viewEngineConfig)
    {
        $this->viewEngineConfig = $viewEngineConfig;
    }

    /**
     * @return EntityManager
     */
    public function getEntityManager()
    {
        $config = Setup::createAnnotationMetadataConfiguration(
                    $this->dbConfig['entityPath'],
                    $this->dbConfig['devMode']
                    );
        return EntityManager::create($this->dbConfig[$this->siteConfig['database']], $config);
{'fraction_non_alphanumeric': 0.1315186975324345, 'fraction_numerical': 0.0, 'mean_word_length': 2.4521510096575945, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '3347918', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1094, 'n_words': 208}