| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 37.5% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class NotAllowedManagerRoute extends AuthorizationException |
||
| 9 | { |
||
| 10 | public static function index(Manager $manager) |
||
| 13 | } |
||
| 14 | |||
| 15 | 2 | public static function create(Manager $manager) |
|
| 16 | { |
||
| 17 | 2 | return static::notAllowedVerb('create', $manager); |
|
| 18 | } |
||
| 19 | |||
| 20 | public static function store(Manager $manager) |
||
| 21 | { |
||
| 22 | return static::notAllowedVerb('store', $manager); |
||
| 23 | } |
||
| 24 | |||
| 25 | public static function edit(Manager $manager) |
||
| 26 | { |
||
| 27 | return static::notAllowedVerb('edit', $manager); |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function update(Manager $manager) |
||
| 31 | { |
||
| 32 | return static::notAllowedVerb('update', $manager); |
||
| 33 | } |
||
| 34 | |||
| 35 | public static function delete(Manager $manager) |
||
| 36 | { |
||
| 37 | return static::notAllowedVerb('delete', $manager); |
||
| 38 | } |
||
| 39 | |||
| 40 | 5 | public static function notAllowedVerb($verb, Manager $manager) |
|
| 41 | { |
||
| 42 | 5 | throw new static('Not allowed to '.$verb.' a model. '.ucfirst($verb).' route is not allowed by the ' . $manager->details()->key.' manager.'); |
|
|
|
|||
| 43 | } |
||
| 44 | |||
| 45 | 1 | public static function notAllowedPermission($permission, Manager $manager) |
|
| 48 | } |
||
| 49 | } |
||
| 50 |