| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class CollectionItem extends Model |
||
| 14 | { |
||
| 15 | /** @var int */ |
||
| 16 | protected $id; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | protected $key; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * parse |
||
| 23 | * |
||
| 24 | * @param array $data |
||
| 25 | */ |
||
| 26 | public function parse(array $data) |
||
| 27 | { |
||
| 28 | $this->id = (int)$data['id']; |
||
| 29 | $this->key = (string)$data['key']; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * toArray |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function toArray(): array |
||
| 42 | ]; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return int |
||
| 47 | */ |
||
| 48 | public function getId(): int |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getKey(): string |
||
| 61 | } |