| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function createUserGroupEntity(array $data) |
||
| 29 | { |
||
| 30 | /* @var UserGroupEntity $entity */ |
||
| 31 | $entity = parent::getNewEntityInstance(UserGroupEntity::class); |
||
|
|
|||
| 32 | |||
| 33 | $entity->setUserGroupId($data['id_user_group']) |
||
| 34 | ->setTitle($data['title']) |
||
| 35 | ->setDescription($data['description']) |
||
| 36 | ->setReadOnly($data['is_read_only']) |
||
| 37 | ->setDateCreated(new DateTime($data['date_created'])) |
||
| 38 | ->setDateModified(new DateTime($data['date_created'])); |
||
| 39 | |||
| 40 | return $entity; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.