1 | <?php |
||
28 | trait OrganizationMutatorTrait |
||
29 | { |
||
30 | /** |
||
31 | * @var Organization|null |
||
32 | */ |
||
33 | private $organization; |
||
34 | |||
35 | /** |
||
36 | * Internally set the Organization 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 internalSetOrganizationId(int $id = null); |
||
43 | |||
44 | /** |
||
45 | * Internally get the Organization Id. This can be overridden. A record for example |
||
46 | * should use `getAttribute`. |
||
47 | * |
||
48 | * @return int|null |
||
49 | */ |
||
50 | abstract protected function internalGetOrganizationId(); |
||
51 | |||
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isOrganizationSet(): bool |
||
59 | |||
60 | /** |
||
61 | * Set associated organizationId |
||
62 | * |
||
63 | * @param $id |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function setOrganizationId(int $id = null) |
||
76 | |||
77 | /** |
||
78 | * Get associated organizationId |
||
79 | * |
||
80 | * @return int|null |
||
81 | */ |
||
82 | public function getOrganizationId() |
||
90 | |||
91 | /** |
||
92 | * AssociateUserToOrganization a organization |
||
93 | * |
||
94 | * @param mixed $organization |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function setOrganization($organization = null) |
||
109 | |||
110 | /** |
||
111 | * @return Organization|null |
||
112 | */ |
||
113 | public function getOrganization() |
||
129 | |||
130 | /** |
||
131 | * @return Organization|null |
||
132 | */ |
||
133 | protected function resolveOrganization() |
||
141 | |||
142 | /** |
||
143 | * @return Organization|null |
||
144 | */ |
||
145 | private function resolveOrganizationFromId() |
||
153 | |||
154 | /** |
||
155 | * Attempt to verify that the passed 'organization' is a valid element. A primary key or query |
||
156 | * can be passed to lookup an organization. |
||
157 | * |
||
158 | * @param mixed $organization |
||
159 | * @return Organization|null |
||
160 | */ |
||
161 | protected function verifyOrganization($organization = null) |
||
173 | } |
||
174 |
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..