| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | abstract class AbstractMessage implements MessageInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var array The message parameters. |
||
| 17 | */ |
||
| 18 | protected $parameters; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructs the message with provided parameters. |
||
| 22 | * |
||
| 23 | * @param array $parameters The parameters of the message. |
||
| 24 | */ |
||
| 25 | public function __construct(array $parameters) |
||
| 26 | { |
||
| 27 | $this->parameters = $parameters; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritDoc |
||
| 32 | */ |
||
| 33 | public function serialize(): string |
||
| 34 | { |
||
| 35 | return \serialize($this->parameters); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritDoc |
||
| 40 | */ |
||
| 41 | public function unserialize($serialized): void |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Returns the value of the specified parameter. |
||
| 48 | * |
||
| 49 | * @param string $name The parameter name. |
||
| 50 | * @return string|null The parameter value or null if the parameter does not exist. |
||
| 51 | */ |
||
| 52 | public function getParameter(string $name): ?string |
||
| 55 | } |
||
| 56 | } |
||
| 57 |