| 1 | <?php declare(strict_types = 1); |
||
| 5 | class Message |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | private $contentType; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $body; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param string $contentType |
||
| 21 | * @param string $body |
||
| 22 | */ |
||
| 23 | 10 | public function __construct(string $contentType, string $body) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Get content type of the message. |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 2 | public function getContentType(): string |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Get body of the message. |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 2 | public function getBody(): string |
|
| 48 | } |
||
| 49 |