<commit_before><?php

namespace Scrutinizer\Cli;

use Monolog\Handler\AbstractHandler;
use Monolog\Formatter\FormatterInterface;
use Symfony\Component\Console\Output\OutputInterface;

class OutputHandler extends AbstractHandler
{
    private $output;

    public function __construct(OutputInterface $output)
    {
        $this->output = $output;
    }

    /**
     * Checks whether the given record will be handled by this handler.
     *
     * This is mostly done for performance reasons, to avoid calling processors for nothing.
     *
     * @param array $record
     *
     * @return Boolean
     */
    public function isHandling(array $record)
    {
        return true;
    }

    /**
     * Handles a record.
     *
     * The return value of this function controls the bubbling process of the handler stack.
     *
     * @param  array   $record The record to handle
     * @return Boolean True means that this handler handled the record, and that bubbling is not permitted.
     *                 False means the record was either not processed or that this handler allows bubbling.
    */
    public function handle(array $record)
    {
        $this->output->writeln($record['message']);

        return true;<commit_msg>allows bubbling of log messages<commit_after><?php

namespace Scrutinizer\Cli;

use Monolog\Handler\AbstractHandler;
use Monolog\Formatter\FormatterInterface;
use Symfony\Component\Console\Output\OutputInterface;

class OutputHandler extends AbstractHandler
{
    private $output;

    public function __construct(OutputInterface $output)
    {
        $this->output = $output;
    }

    /**
     * Checks whether the given record will be handled by this handler.
     *
     * This is mostly done for performance reasons, to avoid calling processors for nothing.
     *
     * @param array $record
     *
     * @return Boolean
     */
    public function isHandling(array $record)
    {
        return true;
    }

    /**
     * Handles a record.
     *
     * The return value of this function controls the bubbling process of the handler stack.
     *
     * @param  array   $record The record to handle
     * @return Boolean True means that this handler handled the record, and that bubbling is not permitted.
     *                 False means the record was either not processed or that this handler allows bubbling.
    */
    public function handle(array $record)
    {
        $this->output->writeln($record['message']);

        return false;
{'fraction_non_alphanumeric': 0.0754111512234256, 'fraction_numerical': 0.0, 'mean_word_length': 2.5988455988455987, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '394846', 'n_tokens_mistral': 645, 'n_tokens_neox': 630, 'n_words': 237}