Total Complexity | 7 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
5 | class AuthService |
||
6 | { |
||
7 | public function attemptLogin(array $credentials = [], string $guard = 'api') |
||
29 | ], |
||
30 | ]; |
||
31 | } |
||
32 | |||
33 | public function authenticatedUser(string $guard = 'api') |
||
34 | { |
||
35 | $class = config('larastart.resource'); |
||
36 | |||
37 | if (! $guard) { |
||
38 | $guard = config('larastart.guard'); |
||
39 | } |
||
40 | |||
41 | return new $class(auth($guard)->user()); |
||
42 | } |
||
43 | |||
44 | public function validationFailed() |
||
47 | } |
||
48 | } |
||
49 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.