| Total Complexity | 7 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PageViewed |
||
| 10 | { |
||
| 11 | /** @var Entity */ |
||
| 12 | private $page; |
||
| 13 | |||
| 14 | /** @var bool */ |
||
| 15 | private $isAllowed = false; |
||
| 16 | |||
| 17 | /** @var string[] */ |
||
| 18 | private $userGroupIdentifiers = []; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * PageViewed constructor. |
||
| 22 | * |
||
| 23 | * @param Entity $page |
||
| 24 | * @param array $userGroupIdentifiers |
||
| 25 | */ |
||
| 26 | public function __construct(Entity $page, array $userGroupIdentifiers) |
||
| 27 | { |
||
| 28 | $this->setPage($page); |
||
| 29 | |||
| 30 | $this->userGroupIdentifiers = $userGroupIdentifiers; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Entity |
||
| 35 | */ |
||
| 36 | public function getPage(): Entity |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Entity $page |
||
| 43 | * |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | public function setPage(Entity $page): PageViewed |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return bool |
||
| 56 | */ |
||
| 57 | public function isAllowed(): bool |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return $this |
||
| 64 | */ |
||
| 65 | public function setIsAllowed(): self |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return $this |
||
| 74 | */ |
||
| 75 | public function setIsNotAllowed(): self |
||
| 76 | { |
||
| 77 | $this->isAllowed = false; |
||
| 78 | |||
| 79 | return $this; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return string[] |
||
| 84 | */ |
||
| 85 | public function getUserGroupIdentifiers(): array |
||
| 88 | } |
||
| 89 | } |
||
| 90 |