| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 57 | protected function populate(UserAssociation $record): ActiveRecord |
||
| 58 | { |
||
| 59 | $record->setAttributes( |
||
| 60 | $this->attributeValuesFromBody() |
||
| 61 | ); |
||
| 62 | |||
| 63 | $types = Craft::$app->getRequest()->getBodyParam('types', []); |
||
| 64 | if (!empty($types)) { |
||
| 65 | $record->getTypes()->clear()->add($types); |
||
| 66 | } |
||
| 67 | |||
| 68 | return $record; |
||
| 69 | } |
||
| 70 | } |
||
| 71 |
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.