| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 56 | 5 | public function getJobsFromCommand(string $command): array |
|
| 57 | { |
||
| 58 | 5 | $annotation = $this->reader->getClassAnnotation(new ReflectionClass($command), Job::class); |
|
| 59 | |||
| 60 | 5 | if (!($annotation instanceof Job)) { |
|
| 61 | 1 | return []; |
|
| 62 | } |
||
| 63 | |||
| 64 | 4 | return $annotation->getJobs(); |
|
| 65 | } |
||
| 66 | |||
| 90 |
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.