| Total Complexity | 7 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Coverage | 62.5% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Collection extends AbstractComponent |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @ORM\Column() |
||
| 19 | * @Groups({"component", "content"}) |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $resource; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @ORM\Column(type="integer") |
||
| 26 | * @Groups({"component", "content"}) |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | private $perPage = 12; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var array|\Traversable |
||
| 33 | * @Groups({"component_read", "content_read"}) |
||
| 34 | */ |
||
| 35 | private $collection; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 1 | public function getResource(): string |
|
| 41 | { |
||
| 42 | 1 | return $this->resource; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $resource |
||
| 47 | */ |
||
| 48 | 1 | public function setResource(string $resource): void |
|
| 49 | { |
||
| 50 | 1 | $this->resource = $resource; |
|
| 51 | 1 | } |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @return int |
||
| 55 | */ |
||
| 56 | 1 | public function getPerPage(): int |
|
| 57 | { |
||
| 58 | 1 | return $this->perPage; |
|
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param int $perPage |
||
| 63 | */ |
||
| 64 | 1 | public function setPerPage(int $perPage): void |
|
| 65 | { |
||
| 66 | 1 | $this->perPage = $perPage; |
|
| 67 | 1 | } |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @return array|\Traversable |
||
| 71 | */ |
||
| 72 | public function getCollection() |
||
| 73 | { |
||
| 74 | return $this->collection; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param array|\Traversable $collection |
||
| 79 | */ |
||
| 80 | public function setCollection($collection): void |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @ORM\PostLoad() |
||
| 87 | */ |
||
| 88 | public function postLoad() { |
||
| 92 |