diff options
author | Valentin Popov <info@valentineus.link> | 2020-07-17 12:42:45 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-07-17 12:43:11 +0300 |
commit | 46f834c9bf7ff890700cef3b05fd2d7ebefb21a0 (patch) | |
tree | 62d031c7cf58c6f49b0360b74b2b9c32cea6f51c /src/Entities/ChannelEntity.php | |
parent | 964ba206127de4eb904f271fd80db7941653adaa (diff) | |
download | php-epg-service-46f834c9bf7ff890700cef3b05fd2d7ebefb21a0.tar.xz php-epg-service-46f834c9bf7ff890700cef3b05fd2d7ebefb21a0.zip |
Updated channel entity
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'src/Entities/ChannelEntity.php')
-rw-r--r-- | src/Entities/ChannelEntity.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Entities/ChannelEntity.php b/src/Entities/ChannelEntity.php index 59fc8ce..0d8d3fc 100644 --- a/src/Entities/ChannelEntity.php +++ b/src/Entities/ChannelEntity.php @@ -24,6 +24,7 @@ use function is_string; /** * @property-read string $base_id + * @property-read string $base_name * @property-read string $epg_id * @property-read string $geo_data * @property-read string $href @@ -47,6 +48,11 @@ final class ChannelEntity { /** * @var string */ + private string $base_name; + + /** + * @var string + */ private string $epg_id; /** @@ -94,6 +100,7 @@ final class ChannelEntity { */ private function __construct(array $payload) { $this->base_id = $payload['base_id']; + $this->base_name = $payload['base_name']; $this->epg_id = $payload['epg_id']; $this->geo_data = $payload['geo_data']; $this->href = $payload['href']; @@ -117,6 +124,10 @@ final class ChannelEntity { throw new RuntimeException('blah-blah-blah'); } + if (!is_string($payload['base_name'])) { + throw new RuntimeException('blah-blah-blah'); + } + if (!is_string($payload['epg_id'])) { throw new RuntimeException('blah-blah-blah'); } |