<commit_before><?php

namespace Encore\Error;

use Symfony\Component\Debug\ErrorHandler;
use Encore\Container\Container;

class Handler
{
	protected $container = null;

	public function __construct(ExceptionDisplayerInterface $displayer)
	{
		$this->displayer = $displayer;
	}

	public function setContainer(Container $container)
	{
		$this->container = $container;
	}

	public function register()
	{
		$this->registerErrorHandler();
		$this->registerExceptionHandler();
		$this->registerShutdownHandler();
	}

	protected function registerErrorHandler()
	{
		ErrorHandler::register(E_ALL);
	}

	protected function registerExceptionHandler()
	{
		ExceptionHandler::register(true, $this->container)
			->setDisplayer($this->displayer);
	}

	protected function registerShutdownHandler()
	{

	}
}<commit_msg>Shutdown handler is not used<commit_after><?php

namespace Encore\Error;

use Symfony\Component\Debug\ErrorHandler;
use Encore\Container\Container;

class Handler
{
	protected $container = null;

	public function __construct(ExceptionDisplayerInterface $displayer)
	{
		$this->displayer = $displayer;
	}

	public function setContainer(Container $container)
	{
		$this->container = $container;
	}

	public function register()
	{
		$this->registerErrorHandler();
		$this->registerExceptionHandler();
	}

	protected function registerErrorHandler()
	{
		ErrorHandler::register(E_ALL);
	}

	protected function registerExceptionHandler()
	{
		ExceptionHandler::register(true, $this->container)
			->setDisplayer($this->displayer);
	}
}
{'fraction_non_alphanumeric': 0.1187214611872146, 'fraction_numerical': 0.0, 'mean_word_length': 5.698689956331878, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '7342505', 'n_tokens_mistral': 482, 'n_tokens_neox': 451, 'n_words': 86}