| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Owner |
||
| 18 | { |
||
| 19 | /** @var string $resource */ |
||
| 20 | protected $resource; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Constructor |
||
| 24 | * |
||
| 25 | * @param string $resource What is granted permission to |
||
| 26 | */ |
||
| 27 | public function __construct(string $resource) |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Check if allowed i.e. user matches. |
||
| 34 | * |
||
| 35 | * @param string $resource Resource to check |
||
| 36 | * @param ForumsUserInterface $CurrentUser CurrentUser |
||
| 37 | * @param ForumsUserInterface $user Owner of the resource |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function check(string $resource, ForumsUserInterface $CurrentUser, ForumsUserInterface $user): bool |
||
| 49 |