| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function run($provider, array $requestData = null) |
||
| 24 | { |
||
| 25 | |||
| 26 | if ($provider == SocialProvider::FACEBOOK) { |
||
| 27 | $user = Socialite::driver($provider)->userFromToken($requestData['access_token']); |
||
| 28 | } elseif ($provider == SocialProvider::TWITTER) { |
||
| 29 | // TODO: I have not yet submitted this PR to Socialite so the function `userFromTokenAndSecret` does not exist in the package |
||
| 30 | $user = Socialite::driver($provider)->userFromTokenAndSecret($requestData['oauth_token'], |
||
| 31 | $requestData['oauth_token_secret']); |
||
| 32 | |||
| 33 | dd($user); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $user; |
||
| 37 | } |
||
| 38 | |||
| 40 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.