| Conditions | 2 | 
| Paths | 3 | 
| Total Lines | 10 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 5 | 
| CRAP Score | 2 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php namespace Pz\LaravelDoctrine\Rest\Traits;  | 
            ||
| 25 | 7 | public function authorize($request, $arguments = [])  | 
            |
| 26 |     { | 
            ||
| 27 |         try { | 
            ||
| 28 | |||
| 29 | /** @var Gate $gate */  | 
            ||
| 30 | 7 | $gate = app(Gate::class);  | 
            |
| 31 | 7 | $gate->authorize($this->restAbility(), $arguments);  | 
            |
| 32 | |||
| 33 | 1 |         } catch (AuthorizationException $e) { | 
            |
| 34 | 1 | throw RestException::createForbidden($e->getMessage());  | 
            |
| 35 | }  | 
            ||
| 38 |