| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Resources |
||
| 18 | { |
||
| 19 | /** @var \Saito\User\Permission\Resource[] Resources */ |
||
| 20 | protected $resources = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Add resource |
||
| 24 | * |
||
| 25 | * @param \Saito\User\Permission\Resource $resource Resource to add |
||
| 26 | * @return self |
||
| 27 | */ |
||
| 28 | public function add(Resource $resource): self |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get resource |
||
| 37 | * |
||
| 38 | * @param string $resouce Name of resource to get |
||
| 39 | * @return \Saito\User\Permission\Resource|null Resource or null of resource not found |
||
| 40 | */ |
||
| 41 | public function get(string $resouce): ?Resource |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritDoc} |
||
| 48 | */ |
||
| 49 | public function __clone() |
||
| 56 |