| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class FieldMessage implements MessageInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string[] |
||
| 11 | */ |
||
| 12 | private $messages = []; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $code |
||
| 16 | * @param string $name |
||
| 17 | * @return FieldMessage |
||
| 18 | */ |
||
| 19 | 12 | public function attachMessage(string $code, string $name): self |
|
| 20 | { |
||
| 21 | 12 | $this->messages[$code] = $name; |
|
| 22 | 12 | return $this; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritdoc |
||
| 27 | */ |
||
| 28 | 8 | public function toArray(): array |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return int |
||
| 35 | */ |
||
| 36 | 11 | public function count(): int |
|
| 39 | } |
||
| 40 | |||
| 41 | 3 | public function merge(MessageInterface $message): MessageInterface |
|
| 53 |