| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 9 | public static function determine() : string |
||
| 10 | { |
||
| 11 | $default = app()->getLocale(); |
||
| 12 | |||
| 13 | if (app(Section::class)->isBack()) { |
||
| 14 | // User might not be set yet if called in a service provider so a fallback is provided |
||
| 15 | if (auth()->check()) { |
||
|
|
|||
| 16 | return app()->auth->user()->locale; |
||
| 17 | } |
||
| 18 | |||
| 19 | return $default; |
||
| 20 | } |
||
| 21 | |||
| 22 | return static::isValidLocale(app()->request->segment(1)) ? app()->request->segment(1) : $default; |
||
| 23 | } |
||
| 24 | |||
| 52 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.