| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function toolbar(Request $request, $identifier) |
||
| 21 | { |
||
| 22 | $this->init(); |
||
| 23 | $this->bound(); |
||
| 24 | |||
| 25 | /** @var ToolInterface $tool */ |
||
| 26 | $tool = $this->crud()->getTool($identifier); |
||
| 27 | if (!$tool->check()) { |
||
| 28 | throw new PermissionDenied(); |
||
| 29 | } |
||
| 30 | |||
| 31 | return $tool->handle($request); |
||
| 32 | } |
||
| 33 | |||
| 38 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.