<commit_before><?php

namespace Swarrot\Broker\MessagePublisher;

use Swarrot\Broker\Message;

class PeclPackageMessagePublisher implements MessagePublisherInterface
{
    protected $exchange;
    protected $flags;

    public function __construct(\AMQPExchange $exchange, $flags = AMQP_NOPARAM)
    {
        $this->exchange = $exchange;
        $this->flags    = $flags;
    }

    /**
     * {@inheritDoc}
     */
    public function publish(Message $message, $key = null)
    {
        $this->exchange->publish(
            $message->getBody(),
            $key,
            $this->flags,
            $message->getHeaders()
        );
    }
}
<commit_msg>Add missing headers key<commit_after><?php

namespace Swarrot\Broker\MessagePublisher;

use Swarrot\Broker\Message;

class PeclPackageMessagePublisher implements MessagePublisherInterface
{
    protected $exchange;
    protected $flags;

    public function __construct(\AMQPExchange $exchange, $flags = AMQP_NOPARAM)
    {
        $this->exchange = $exchange;
        $this->flags    = $flags;
    }

    /**
     * {@inheritDoc}
     */
    public function publish(Message $message, $key = null)
    {
        $this->exchange->publish(
            $message->getBody(),
            $key,
            $this->flags,
            array(
                'headers' => $message->getHeaders()
            )
        );
    }
}

{'fraction_non_alphanumeric': 0.1204644412191582, 'fraction_numerical': 0.0, 'mean_word_length': 2.2069767441860466, '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': '5936751', 'n_tokens_mistral': 422, 'n_tokens_neox': 392, 'n_words': 75}