| Total Complexity | 10 |
| Total Lines | 112 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class PageCategory implements IStringerEntity |
||
| 11 | { |
||
| 12 | /** @var string */ |
||
| 13 | protected $id; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | protected $name; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | protected $identifier; |
||
| 20 | |||
| 21 | /** @var UserGroup[] */ |
||
| 22 | protected $userGroups; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * PageCategory constructor. |
||
| 26 | * |
||
| 27 | * @param string $id |
||
| 28 | * @param string $name |
||
| 29 | * @param string $identifier |
||
| 30 | * @param UserGroup[] $userGroups |
||
| 31 | */ |
||
| 32 | public function __construct(string $id, string $name, string $identifier, array $userGroups = []) |
||
| 33 | { |
||
| 34 | $this->id = $id; |
||
| 35 | $this->name = $name; |
||
| 36 | $this->identifier = $identifier; |
||
| 37 | $this->userGroups = $userGroups; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getId() |
||
| 44 | { |
||
| 45 | return $this->id; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $id |
||
| 50 | */ |
||
| 51 | public function setId($id) |
||
| 52 | { |
||
| 53 | $this->id = $id; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getName(): string |
||
| 60 | { |
||
| 61 | return $this->name; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $name |
||
| 66 | * |
||
| 67 | * @return $this |
||
| 68 | */ |
||
| 69 | public function setName(string $name): PageCategory |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string |
||
| 78 | */ |
||
| 79 | public function getIdentifier(): string |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param string $identifier |
||
| 86 | * |
||
| 87 | * @return $this |
||
| 88 | */ |
||
| 89 | public function setIdentifier(string $identifier): PageCategory |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @return UserGroup[] |
||
| 98 | */ |
||
| 99 | public function getUserGroups(): array |
||
| 100 | { |
||
| 101 | return $this->userGroups; |
||
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @param UserGroup[] $userGroups |
||
| 106 | * |
||
| 107 | * @return $this |
||
| 108 | */ |
||
| 109 | public function setUserGroups(array $userGroups): PageCategory |
||
| 110 | { |
||
| 111 | $this->userGroups = $userGroups; |
||
| 112 | |||
| 113 | return $this; |
||
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @return string |
||
| 118 | */ |
||
| 119 | public function __toString(): string |
||
| 122 | } |
||
| 123 | } |
||
| 124 |