| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 1 | public function handleSearch(Request $request) |
|
| 19 | { |
||
| 20 | 1 | $this->init(); |
|
| 21 | 1 | $this->bound(); |
|
| 22 | |||
| 23 | 1 | if (!$this->can('search')) { |
|
| 24 | throw UnauthorizedException::forPermissions(['search']); |
||
| 25 | } |
||
| 26 | |||
| 27 | 1 | $this->crud()->saveSearchFilterParams($request->get('search', [])); |
|
| 28 | |||
| 29 | 1 | return redirect($this->crud()->listUrl()); |
|
| 30 | } |
||
| 31 | |||
| 37 |
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.