Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 88.24% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class PublishMessage |
||
8 | { |
||
9 | public const EVENT_DESTROYED = 'deleted'; |
||
10 | public const EVENT_CREATED = 'created'; |
||
11 | |||
12 | private $className; |
||
13 | private $routingKey; |
||
14 | private $event; |
||
15 | private $attributes; |
||
16 | |||
17 | 27 | public function __construct(string $className, string $event, string $routingKey, array $attributes = []) |
|
23 | } |
||
24 | |||
25 | 19 | public function isDestroyed(): bool |
|
26 | { |
||
27 | 19 | return $this->event === self::EVENT_DESTROYED; |
|
28 | } |
||
29 | |||
30 | 15 | public function isCreated(): bool |
|
33 | } |
||
34 | |||
35 | 21 | public function className(): string |
|
36 | { |
||
37 | 21 | return $this->className; |
|
38 | } |
||
39 | |||
40 | 1 | public function routingKey(): string |
|
41 | { |
||
42 | 1 | return $this->routingKey; |
|
43 | } |
||
44 | |||
45 | 21 | public function attributes(): array |
|
46 | { |
||
47 | 21 | return $this->attributes; |
|
48 | } |
||
49 | |||
50 | public function event(): string |
||
53 | } |
||
54 | } |
||
55 |