| Conditions | 5 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | public function nomadicCan($verb) |
||
| 10 | { |
||
| 11 | if (in_array($verb, ['create', 'store', 'delete']) && ! auth()->guard('chief')->user()->hasRole('developer')) { |
||
|
|
|||
| 12 | throw NotAllowedManagerRoute::notAllowedVerb($verb, $this); |
||
| 13 | } |
||
| 14 | |||
| 15 | if (in_array($verb, ['create', 'store']) && $this->indexCollection()->count() > 0) { |
||
| 16 | throw NotAllowedManagerRoute::create($this); |
||
| 17 | } |
||
| 20 |