| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | private function buildFileContent() |
||
| 24 | { |
||
| 25 | if ($this->filesystem->exists($this->naming->getFile())) { |
||
| 26 | $translation = include $this->naming->getFile(); |
||
| 27 | } |
||
| 28 | |||
| 29 | $translation = array_add($translation, $this->naming->getName(), [ |
||
| 30 | 'singular' => $this->naming->getSingular(), |
||
| 31 | 'plural' => $this->naming->getPlural(), |
||
| 32 | ]); |
||
| 33 | |||
| 34 | $this->fileContent = $this->getTranslationFileContent($translation); |
||
| 35 | } |
||
| 36 | |||
| 48 |
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.