Lines
100.00%
3 / 3
Methods
100.00%
3 / 3
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| validateUseraccount | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| __toString | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 5 | class EntityAccess implements RightsInterface | |
| 6 | { | |
| 7 | protected $entity; | |
| 8 | ||
| 9 | public function __construct(AccessInterface $entity) | |
| 10 | { | |
| 11 | $this->entity = $entity; | |
| 12 | } | |
| 13 | ||
| 14 | #[\Override] | |
| 15 | public function validateUseraccount(\BO\Zmsentities\Useraccount $useraccount): bool | |
| 16 | { | |
| 17 | return $this->entity->hasAccess($useraccount); | |
| 18 | } | |
| 19 | ||
| 20 | public function __toString() | |
| 21 | { | |
| 22 | return "EntityAccess(" . $this->entity->getEntityName() . "#" . $this->entity->getId() . ")"; | |
| 23 | } | |
| 24 | } |