1 | <?php declare(strict_types=1); |
||
14 | class Role implements RoleInterface |
||
15 | { |
||
16 | /** |
||
17 | * @ORM\Id |
||
18 | * @ORM\Column(type="integer") |
||
19 | * @ORM\GeneratedValue |
||
20 | * @var int $id |
||
21 | */ |
||
22 | private $id; |
||
23 | |||
24 | /** |
||
25 | * @ORM\Column(type="string",length=50) |
||
26 | * @var string $roleName |
||
27 | */ |
||
28 | private $roleName; |
||
29 | |||
30 | /** |
||
31 | * A role can have various roles under it |
||
32 | * @ORM\OneToMany(targetEntity="Role", mappedBy="parentRole") |
||
33 | * @var ArrayCollection $children |
||
34 | */ |
||
35 | private $children; |
||
36 | |||
37 | /** |
||
38 | * Many role have one parent |
||
39 | * @ORM\ManyToOne(targetEntity="Role", inversedBy="children") |
||
40 | * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") |
||
41 | * @var Role $parentRole |
||
42 | */ |
||
43 | private $parentRole; |
||
44 | |||
45 | /** |
||
46 | * @ORM\Column(type="string",length=75) |
||
47 | * @var string $class |
||
48 | */ |
||
49 | private $class; |
||
50 | |||
51 | /** |
||
52 | * @return int |
||
53 | */ |
||
54 | public function getId(): int |
||
58 | |||
59 | /** |
||
60 | * @param int $id |
||
61 | */ |
||
62 | public function setId(int $id): void |
||
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | public function getRoleName(): string |
||
74 | |||
75 | /** |
||
76 | * @param string $roleName |
||
77 | */ |
||
78 | public function setRoleName(string $roleName): void |
||
82 | |||
83 | /** |
||
84 | * @return Collection |
||
85 | */ |
||
86 | public function getChildren(): Collection |
||
90 | |||
91 | /** |
||
92 | * @param Collection $children |
||
93 | */ |
||
94 | public function setChildren(Collection $children): void |
||
98 | |||
99 | /** |
||
100 | * @return Role |
||
101 | */ |
||
102 | public function getParentRole(): Role |
||
106 | |||
107 | /** |
||
108 | * @param Role $parentRole |
||
109 | */ |
||
110 | public function setParentRole(Role $parentRole): void |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getClass(): string |
||
122 | |||
123 | /** |
||
124 | * @param string $class |
||
125 | */ |
||
126 | public function setClass(string $class): void |
||
130 | } |
||
131 | |||
132 |
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..