Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class IdEnvelope implements EnvelopeInterface |
||
11 | { |
||
12 | use EnvelopeTrait; |
||
13 | |||
14 | public const MESSAGE_ID_KEY = 'yii-message-id'; |
||
15 | |||
16 | 13 | public function __construct( |
|
20 | 13 | } |
|
21 | |||
22 | 2 | public static function fromMessage(MessageInterface $message): self |
|
23 | { |
||
24 | 2 | return new self($message, $message->getMetadata()[self::MESSAGE_ID_KEY] ?? null); |
|
25 | } |
||
26 | |||
27 | public function setId(string|int|null $id): void |
||
28 | { |
||
29 | $this->id = $id; |
||
30 | } |
||
31 | |||
32 | 12 | public function getId(): string|int|null |
|
35 | } |
||
36 | |||
37 | 12 | private function getEnvelopeMetadata(): array |
|
42 |
This check looks for private methods that have been defined, but are not used inside the class.