| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 28 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 18 | public function change($locale)  | 
            ||
| 19 |     { | 
            ||
| 20 | $locales = (array) Language::getLocales();  | 
            ||
| 21 | |||
| 22 | // If a locale does not match any of the ones allowed, go back without doing anything.  | 
            ||
| 23 |         if (false === in_array($locale, $locales)) { | 
            ||
| 24 | return redirect()->back();  | 
            ||
| 25 | }  | 
            ||
| 26 | |||
| 27 | // Set the right sessions.  | 
            ||
| 28 | session([Locale::SESSION_KEY => $locale]);  | 
            ||
| 29 | app()->setLocale($locale);  | 
            ||
| 30 | // \LangCountry::setAllSessions($lang_country);  | 
            ||
| 31 | |||
| 32 | // If a user is logged in and it has a lang_country property, set the new lang_country.  | 
            ||
| 33 | /*  | 
            ||
| 34 | * Todo Set language to user options  | 
            ||
| 35 |          * if (Auth::user() && array_key_exists('lang_country', Auth::user()->getAttributes())) { | 
            ||
| 36 | *  | 
            ||
| 37 |             try { | 
            ||
| 38 | \Auth::user()->lang_country = $lang_country;  | 
            ||
| 39 | \Auth::user()->save();  | 
            ||
| 40 |             } catch (\Exception $e) { | 
            ||
| 41 | \Log::error(get_class($this).' at '.__LINE__.': '.$e->getMessage());  | 
            ||
| 42 | }  | 
            ||
| 43 | }*/  | 
            ||
| 44 | |||
| 45 | return redirect()->back();  | 
            ||
| 46 | }  | 
            ||
| 48 | 
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths