| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | public function handle(Request $request, Closure $next) |
||
| 13 | { |
||
| 14 | $this->response = $next($request); |
||
| 15 | |||
| 16 | $shouldIndex = $this->shouldIndex($request); |
||
| 17 | |||
| 18 | if (is_bool($shouldIndex)) { |
||
| 19 | return $this->responseWithRobots($shouldIndex ? 'all' : 'none'); |
||
| 20 | } |
||
| 21 | |||
| 22 | if (is_string($shouldIndex)) { |
||
| 23 | return $this->responseWithRobots($shouldIndex); |
||
| 24 | } |
||
| 25 | |||
| 26 | throw new InvalidIndexRule('An indexing rule needs to return a boolean or a string'); |
||
| 27 | } |
||
| 28 | |||
| 44 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.