1 | <?php |
||
28 | trait UsersAttributeTrait |
||
29 | { |
||
30 | /** |
||
31 | * @var RelationshipManagerInterface |
||
32 | */ |
||
33 | private $userManager; |
||
34 | |||
35 | /** |
||
36 | * @return RelationshipManagerInterface |
||
37 | */ |
||
38 | public function getUserManager(): RelationshipManagerInterface |
||
46 | |||
47 | /** |
||
48 | * @param array $sourceElements |
||
49 | * @return array |
||
50 | */ |
||
51 | private static function eagerLoadingUsersMap(array $sourceElements) |
||
67 | |||
68 | /************************************************************ |
||
69 | * REQUEST |
||
70 | ************************************************************/ |
||
71 | |||
72 | /** |
||
73 | * AssociateUserToOrganization an array of users from request input |
||
74 | * |
||
75 | * @param string $identifier |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setUsersFromRequest(string $identifier = 'users') |
||
86 | |||
87 | |||
88 | /************************************************************ |
||
89 | * USERS QUERY |
||
90 | ************************************************************/ |
||
91 | |||
92 | /** |
||
93 | * @param array $criteria |
||
94 | * @return UserQuery |
||
95 | */ |
||
96 | public function userQuery($criteria = []): UserQuery |
||
115 | |||
116 | /** |
||
117 | * Get an array of users associated to an organization |
||
118 | * |
||
119 | * @param array $criteria |
||
120 | * @return User[]|Collection |
||
121 | */ |
||
122 | public function getUsers(array $criteria = []): Collection |
||
135 | |||
136 | /** |
||
137 | * Set an array or query of users to an organization |
||
138 | * |
||
139 | * @param $users |
||
140 | * @return $this |
||
141 | */ |
||
142 | public function setUsers($users) |
||
147 | } |
||
148 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: