| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function createUserEntityFormBuilder($entity, $view) |
||
| 30 | { |
||
| 31 | $hierarchy = $this->container->getParameter('security.role_hierarchy.roles'); |
||
| 32 | |||
| 33 | // transform the role hierarchy in a single unique list |
||
| 34 | $roles = array(); |
||
| 35 | array_walk_recursive($hierarchy, function($role) use (&$roles) { |
||
| 36 | $roles[$role] = $role; |
||
| 37 | }); |
||
| 38 | |||
| 39 | $formBuilder = parent::createEntityFormBuilder($entity, $view); |
||
|
|
|||
| 40 | $formBuilder-> |
||
| 41 | add('roles', ChoiceType::class,[ |
||
| 42 | 'expanded' => true, |
||
| 43 | 'multiple' => true, |
||
| 44 | 'placeholder' => 'Choice a role', |
||
| 45 | 'choices' => $roles, |
||
| 46 | ]); |
||
| 47 | |||
| 48 | return $formBuilder; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
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.