| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | abstract class Collection |
||
| 23 | { |
||
| 24 | use HydratorTrait { |
||
| 25 | fromArray as private fromArrayTrait; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** @var array */ |
||
| 29 | protected $entries; |
||
| 30 | |||
| 31 | /** @var CollectionMeta */ |
||
| 32 | protected $meta; |
||
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * Collection constructor. |
||
| 37 | * |
||
| 38 | */ |
||
| 39 | 9 | final protected function __construct() |
|
| 41 | 9 | } |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | 3 | public function getEntries(): array |
|
| 47 | { |
||
| 48 | 3 | return $this->entries; |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return CollectionMeta |
||
| 53 | */ |
||
| 54 | 1 | public function getMeta(): CollectionMeta |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param array $data |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | 10 | public static function fromArray(array $data) |
|
| 74 |