Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function handle(Request $request, Closure $next) |
||
|
|||
16 | { |
||
17 | $this->response = $next($request); |
||
18 | $shouldIndex = $this->shouldIndex($request); |
||
19 | |||
20 | if (is_bool($shouldIndex)) { |
||
21 | return $this->responseWithRobots($shouldIndex ? 'all' : 'none'); |
||
22 | } |
||
23 | |||
24 | if (is_string($shouldIndex)) { |
||
25 | return $this->responseWithRobots($shouldIndex); |
||
26 | } |
||
27 | |||
28 | throw new Exception(trans('cortex/foundation::messages.invalid_indexing_rule')); |
||
29 | } |
||
30 | |||
46 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.