| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 56 | public function apiPermissions() |
|
| 23 | { |
||
| 24 | 56 | $permissions = config("tinre.role_permissions.{$this->role}", []); |
|
| 25 | |||
| 26 | 56 | if (in_array('*', $permissions)) { |
|
| 27 | 10 | $permissions = config('tinre.api_permissions'); |
|
| 28 | } |
||
| 29 | |||
| 30 | 56 | return array_intersect($permissions, config('tinre.api_permissions')); |
|
| 31 | } |
||
| 68 |