getPublished()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace TomCizek\AsynchronousRouter\Tests\DependencyInjection\Fixture\Model;
6
7
use Prooph\Common\Messaging\Message;
8
use TomCizek\AsynchronousRouter\AsynchronousMessageProducerBridge;
9
10
class AbstractTestAsynchronousMessageProducerBridge implements AsynchronousMessageProducerBridge
11
{
12
    public const KEY_ROUTING_KEY = 'routingKey';
13
    public const KEY_MESSAGE = 'message';
14
15
    private $published = [];
16
17
    public function publishWithRoutingKey(Message $message, string $routingKey): void
18
    {
19
        $this->published[] = [
20
            self::KEY_ROUTING_KEY => $routingKey,
21
            self::KEY_MESSAGE => $message,
22
        ];
23
    }
24
25
    public function getPublished()
26
    {
27
        return $this->published;
28
    }
29
}
30