<commit_before><?php

namespace Elfiggo\Brobdingnagian\Report;

use Elfiggo\Brobdingnagian\Param\Params;
use PhpSpec\Console\IO;
use ReflectionClass;

class Reporter
{

    private $handler;

    public function __construct(Params $params, LoggerHandler $loggerHandler, ExceptionHandler $exceptionHandler)
    {
        $this->handler = $params->getBrobList() ?
            $loggerHandler :
            $exceptionHandler;
    }

    public function handlerType()
    {
        return get_class($this->handler);
    }

    public function act(ReflectionClass $sus, $class, $message, $errorType)
    {
        $this->handler->act($sus, $class, $message, $errorType);
    }

    public function output(IO $io)
    {
        if (count($this->handler->messages())) {
            $io->writeln('');
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('------------------------- Brobdingnagian Table ---------------------------------');
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('|  ' . str_pad('Error Type',17) . '  |  ' . str_pad('Message', 52) . '  |');
            foreach($this->handler->messages() as $class => $messages) {
                $io->writeln(str_pad('-- Class -- ', 22) . '|  ' . str_pad($class, 67 - strlen($class)));
                foreach ($messages as $data) {
                    $io->writeln('|  ' . str_pad($data['errorType'],17) . '  |  ' . $data['message']);
                }
            }
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('--------------------------------- End ------------------------------------------');
            $io->writeln('--------------------------------------------------------------------------------');
        }<commit_msg>Improved reporting by adding divider between items<commit_after><?php

namespace Elfiggo\Brobdingnagian\Report;

use Elfiggo\Brobdingnagian\Param\Params;
use PhpSpec\Console\IO;
use ReflectionClass;

class Reporter
{

    private $handler;

    public function __construct(Params $params, LoggerHandler $loggerHandler, ExceptionHandler $exceptionHandler)
    {
        $this->handler = $params->getBrobList() ?
            $loggerHandler :
            $exceptionHandler;
    }

    public function handlerType()
    {
        return get_class($this->handler);
    }

    public function act(ReflectionClass $sus, $class, $message, $errorType)
    {
        $this->handler->act($sus, $class, $message, $errorType);
    }

    public function output(IO $io)
    {
        if (count($this->handler->messages())) {
            $io->writeln('');
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('------------------------- Brobdingnagian Table ---------------------------------');
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('|  ' . str_pad('Error Type',17) . '  |  ' . str_pad('Message', 52) . '  |');
            foreach($this->handler->messages() as $class => $messages) {
                $io->writeln('--------------------------------------------------------------------------------');
                $io->writeln(str_pad('|  -- Class -- ', 22) . '|  ' . str_pad($class, 67 - strlen($class)));
                foreach ($messages as $data) {
                    $io->writeln('|  ' . str_pad($data['errorType'],17) . '  |  ' . $data['message']);
                }
            }
            $io->writeln('--------------------------------------------------------------------------------');
            $io->writeln('--------------------------------- End ------------------------------------------');
            $io->writeln('--------------------------------------------------------------------------------');
        }
{'fraction_non_alphanumeric': 0.3746276067527309, 'fraction_numerical': 0.004965243296921549, 'mean_word_length': 1.0462163534789233, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 44, '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': '5518246', 'n_tokens_mistral': 971, 'n_tokens_neox': 929, 'n_words': 165}