| Total Complexity | 6 |
| Total Lines | 65 |
| 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 |
||
| 37 | { |
||
| 38 | return $this->page; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return IView |
||
|
|
|||
| 43 | */ |
||
| 44 | public function setPage(Entity $page): PageViewed |
||
| 45 | { |
||
| 46 | $this->page = $page; |
||
| 47 | $this->isAllowed = !$page->isDraft(); |
||
| 48 | |||
| 49 | return $this; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function isAllowed(): bool |
||
| 56 | { |
||
| 57 | return $this->isAllowed; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param bool $isAllowed |
||
| 62 | */ |
||
| 63 | public function setIsAllowed(bool $isAllowed): void |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return string[] |
||
| 70 | */ |
||
| 71 | public function getUserGroupIdentifiers(): array |
||
| 74 | } |
||
| 75 | } |
||
| 76 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths