Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
28 | private function buildFileContent() |
||
29 | { |
||
30 | if ($this->filesystem->exists($this->naming->getFile())) { |
||
31 | $translation = include $this->naming->getFile(); |
||
32 | } |
||
33 | |||
34 | if (!isset($translation)) { |
||
35 | $translation = []; |
||
36 | } |
||
37 | |||
38 | $translation = array_add($translation, $this->naming->getName(), [ |
||
39 | 'singular' => $this->naming->getSingular(), |
||
40 | 'plural' => $this->naming->getPlural(), |
||
41 | ]); |
||
42 | |||
43 | $this->fileContent = $this->getTranslationFileContent($translation); |
||
44 | } |
||
45 | |||
57 |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.