<commit_before><?php

namespace League\Event;

class BufferedEmitter extends Emitter
{
    /**
     * @var EventInterface[]
     */
    protected $bufferedEvents = [];

    /**
     * @inheritdoc
     */
    public function emit($event)
    {
        $this->bufferedEvents[] = $event;

        return $event;
    }

    /**
     * @inheritdoc
     */
    public function emitBatch(array $events)
    {
        foreach($events as $event) {
            $this->bufferedEvents[] = $event;
        }

        return $events;
    }

    /**
     * Emit the buffered events.
     *
     * @return array
     */
    public function emitBufferedEvents()
    {
        $result = [];

        foreach($this->bufferedEvents as $event) {
            $result[] = parent::emit($event);
        }

        return $result;
    }
}<commit_msg>Fix for PSR2 spacing around foreach keyword<commit_after><?php

namespace League\Event;

class BufferedEmitter extends Emitter
{
    /**
     * @var EventInterface[]
     */
    protected $bufferedEvents = [];

    /**
     * @inheritdoc
     */
    public function emit($event)
    {
        $this->bufferedEvents[] = $event;

        return $event;
    }

    /**
     * @inheritdoc
     */
    public function emitBatch(array $events)
    {
        foreach ($events as $event) {
            $this->bufferedEvents[] = $event;
        }

        return $events;
    }

    /**
     * Emit the buffered events.
     *
     * @return array
     */
    public function emitBufferedEvents()
    {
        $result = [];

        foreach ($this->bufferedEvents as $event) {
            $result[] = parent::emit($event);
        }

        return $result;
    }
}
{'fraction_non_alphanumeric': 0.13317479191438764, 'fraction_numerical': 0.0005945303210463733, 'mean_word_length': 1.7277147487844409, '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': '4085458', 'n_tokens_mistral': 504, 'n_tokens_neox': 479, 'n_words': 104}