| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | private function buildFileContent() |
||
| 28 | { |
||
| 29 | if ($this->filesystem->exists($this->naming->getFile())) { |
||
| 30 | $translation = include $this->naming->getFile(); |
||
| 31 | } |
||
| 32 | |||
| 33 | if (!isset($translation)) { |
||
| 34 | $translation = []; |
||
| 35 | } |
||
| 36 | |||
| 37 | $translation = array_add($translation, $this->naming->getName(), [ |
||
| 38 | 'singular' => $this->naming->getSingular(), |
||
| 39 | 'plural' => $this->naming->getPlural(), |
||
| 40 | ]); |
||
| 41 | |||
| 42 | $this->fileContent = $this->getTranslationFileContent($translation); |
||
| 43 | } |
||
| 44 | |||
| 56 |
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.