| 1 | <?php |
||
| 18 | final class Tweets implements CreatableFromArray |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $message; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var Tweet[] |
||
| 27 | */ |
||
| 28 | private $tweets; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $message |
||
| 32 | * @param Tweet[] $tweets |
||
| 33 | */ |
||
| 34 | private function __construct(string $message, array $tweets) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param array $data |
||
| 48 | * |
||
| 49 | * @return Tweets |
||
| 50 | */ |
||
| 51 | public static function createFromArray(array $data): Tweets |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getMessage(): string |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return Tweet[] |
||
| 79 | */ |
||
| 80 | public function getTweets(): array |
||
| 84 | } |
||
| 85 |