Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function load(ObjectManager $manager) |
||
30 | { |
||
31 | |||
32 | $parent = new HierarchicalRole(); |
||
33 | $parent->setName('user'); |
||
34 | $manager->persist($parent); |
||
35 | $this->parent = $parent; |
||
|
|||
36 | |||
37 | foreach (['admin', 'manager'] as $roleData) { |
||
38 | $role = new HierarchicalRole; |
||
39 | $role->setName($roleData); |
||
40 | |||
41 | $parent->addChild($role); |
||
42 | $manager->persist($role); |
||
43 | $this->roles[] = $role; |
||
44 | } |
||
45 | |||
46 | $manager->flush(); |
||
47 | } |
||
48 | |||
65 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..