Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function handle($request, Closure $next) |
||
25 | { |
||
26 | // find and validate the lang on that request |
||
27 | $lang = $this->validateLanguage($this->findLanguage($request)); |
||
28 | |||
29 | // set the local language |
||
30 | App::setLocale($lang); |
||
31 | |||
32 | // get the response after the request is done |
||
33 | $response = $next($request); |
||
34 | |||
35 | // set Content Languages header in the response |
||
36 | $response->headers->set('Content-Language', $lang); |
||
37 | |||
38 | // return the response |
||
39 | return $response; |
||
40 | } |
||
41 | |||
78 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.