| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 41 | public function handle($request, Closure $next) |
|
| 24 | { |
||
| 25 | 41 | if (Auth::check()) { |
|
| 26 | 38 | Session::put('locale', Auth::user()->locale); |
|
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | 41 | if (Session::has('locale') && in_array(Session::get('locale'), $this->languages)) { |
|
| 31 | 38 | App::setLocale(Session::get('locale')); |
|
| 32 | } |
||
| 33 | |||
| 34 | 41 | return $next($request); |
|
| 35 | } |
||
| 37 |