| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public static function generate(string $name, string $expires_at = null, int $length = 60) : string |
||
| 19 | { |
||
| 20 | $token = Str::random($length); |
||
| 21 | DB::table('api_tokens')->insert([ |
||
| 22 | 'name' => $name, |
||
| 23 | 'token' => $token, |
||
| 24 | 'expires_at' => $expires_at ?? now()->addDays(config('flightdeck.tokens.expire_days')), |
||
| 25 | ]); |
||
| 26 | return $token; |
||
| 27 | } |
||
| 28 | |||
| 47 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.