| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function toolbar(Request $request, $identifier) |
||
| 21 | { |
||
| 22 | $this->beforeInit(); |
||
| 23 | $this->init(); |
||
| 24 | $this->bound(); |
||
| 25 | |||
| 26 | /** @var ToolInterface $tool */ |
||
| 27 | $tool = $this->crud()->getTool($identifier); |
||
| 28 | if (!$tool->check()) { |
||
| 29 | throw new PermissionDenied(); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $tool->handle($request); |
||
| 33 | } |
||
| 40 |