| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | protected function createCollectionClass($collectionClass) |
||
| 43 | { |
||
| 44 | switch ($collectionClass) { |
||
| 45 | case AttachedEntitiesCollection::class: |
||
| 46 | if (!isset($this->repositories)) { |
||
| 47 | $repositoriesFactory = $this->repositoriesFactory; |
||
| 48 | $this->repositories = $repositoriesFactory(); |
||
| 49 | } |
||
| 50 | return new $collectionClass($this->repositories); |
||
| 51 | default: |
||
| 52 | return new $collectionClass(); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.