1 | <?php |
||
28 | trait ElementMutatorTrait |
||
29 | { |
||
30 | /** |
||
31 | * @var Element|null |
||
32 | */ |
||
33 | private $element; |
||
34 | |||
35 | /** |
||
36 | * Internally set the Element Id. This can be overridden. A record for example |
||
37 | * should use `setAttribute`. |
||
38 | * |
||
39 | * @param int|null $id |
||
40 | * @return $this |
||
41 | */ |
||
42 | abstract protected function internalSetElementId(int $id = null); |
||
43 | |||
44 | /** |
||
45 | * Internally get the Element Id. This can be overridden. A record for example |
||
46 | * should use `getAttribute`. |
||
47 | * |
||
48 | * @return int|null |
||
49 | */ |
||
50 | abstract protected function internalGetElementId(); |
||
51 | |||
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isElementSet(): bool |
||
59 | |||
60 | /** |
||
61 | * Set associated elementId |
||
62 | * |
||
63 | * @param $id |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setElementId(int $id = null) |
||
76 | |||
77 | /** |
||
78 | * Get associated elementId |
||
79 | * |
||
80 | * @return int|null |
||
81 | */ |
||
82 | public function getElementId() |
||
90 | |||
91 | /** |
||
92 | * Associate a element |
||
93 | * |
||
94 | * @param mixed $element |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function setElement($element = null) |
||
109 | |||
110 | /** |
||
111 | * @return ElementInterface|null |
||
112 | */ |
||
113 | public function getElement() |
||
129 | |||
130 | /** |
||
131 | * @return ElementInterface|null |
||
132 | */ |
||
133 | protected function resolveElement() |
||
141 | |||
142 | /** |
||
143 | * @return ElementInterface|null |
||
144 | */ |
||
145 | private function resolveElementFromId() |
||
153 | |||
154 | /** |
||
155 | * @param mixed $element |
||
156 | * @return ElementInterface|Element|null |
||
157 | */ |
||
158 | protected function verifyElement($element = null) |
||
178 | } |
||
179 |
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..