@@ -68,7 +68,7 @@ public function getPerunUser($idpEntityId, $uids)
6868 $ user = $ this ->connector ->searchForEntity (
6969 "ou=People, " . $ this ->ldapBase ,
7070 "(| $ query) " ,
71- array ( "perunUserId " , "displayName " , "cn " , "givenName " , "sn " , "preferredMail " , "mail " )
71+ [ "perunUserId " , "displayName " , "cn " , "givenName " , "sn " , "preferredMail " , "mail " ]
7272 );
7373 if (is_null ($ user )) {
7474 return $ user ;
@@ -90,10 +90,10 @@ public function getMemberGroups($user, $vo)
9090 $ userWithMembership = $ this ->connector ->searchForEntity (
9191 "perunUserId= $ userId,ou=People, " . $ this ->ldapBase ,
9292 "(objectClass=perunUser) " ,
93- array ( "perunUserId " , "memberOf " )
93+ [ "perunUserId " , "memberOf " ]
9494 );
9595
96- $ groups = array () ;
96+ $ groups = [] ;
9797 foreach ($ userWithMembership ['memberOf ' ] as $ groupDn ) {
9898 $ voId = explode ('= ' , explode (', ' , $ groupDn )[1 ], 2 )[1 ];
9999 if ($ voId != $ vo ->getId ()) {
@@ -103,7 +103,7 @@ public function getMemberGroups($user, $vo)
103103 $ group = $ this ->connector ->searchForEntity (
104104 $ groupDn ,
105105 "(objectClass=perunGroup) " ,
106- array ( "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " )
106+ [ "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " ]
107107 );
108108 array_push (
109109 $ groups ,
@@ -125,17 +125,17 @@ public function getSpGroups($spEntityId)
125125 $ resources = $ this ->connector ->searchForEntities (
126126 $ this ->ldapBase ,
127127 "(&(objectClass=perunResource)(entityID= $ spEntityId)) " ,
128- array ( "perunResourceId " , "assignedGroupId " , "perunVoId " )
128+ [ "perunResourceId " , "assignedGroupId " , "perunVoId " ]
129129 );
130130
131- $ groups = array () ;
131+ $ groups = [] ;
132132 foreach ($ resources as $ resource ) {
133133 if (isset ($ resource ['assignedGroupId ' ])) {
134134 foreach ($ resource ['assignedGroupId ' ] as $ groupId ) {
135135 $ group = $ this ->connector ->searchForEntity (
136136 "perunGroupId= $ groupId,perunVoId= " . $ resource ['perunVoId ' ][0 ] . ", " . $ this ->ldapBase ,
137137 "(objectClass=perunGroup) " ,
138- array ( "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " )
138+ [ "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " ]
139139 );
140140 array_push (
141141 $ groups ,
@@ -161,7 +161,7 @@ public function getGroupByName($vo, $name)
161161 $ group = $ this ->connector ->searchForEntity (
162162 "perunVoId= $ voId, " . $ this ->ldapBase ,
163163 "(&(objectClass=perunGroup)(perunUniqueGroupName= $ name)) " ,
164- array ( "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " )
164+ [ "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " ]
165165 );
166166 if (is_null ($ group )) {
167167 throw new Exception (
@@ -182,7 +182,7 @@ public function getVoByShortName($voShortName)
182182 $ vo = $ this ->connector ->searchForEntity (
183183 $ this ->ldapBase ,
184184 "(&(objectClass=perunVo)(o= $ voShortName)) " ,
185- array ( "perunVoId " , "o " , "description " )
185+ [ "perunVoId " , "o " , "description " ]
186186 );
187187 if (is_null ($ vo )) {
188188 throw new Exception ("Vo with name: $ vo does not exists in Perun LDAP. " );
@@ -196,7 +196,7 @@ public function getVoById($id)
196196 $ vo = $ this ->connector ->searchForEntity (
197197 $ this ->ldapBase ,
198198 "(&(objectClass=perunVo)(perunVoId= $ id)) " ,
199- array ( "o " , "description " )
199+ [ "o " , "description " ]
200200 );
201201 if (is_null ($ vo )) {
202202 throw new Exception ("Vo with id: $ id does not exists in Perun LDAP. " );
@@ -277,7 +277,7 @@ public function getUsersGroupsOnFacility($spEntityId, $userId)
277277 $ resources = $ this ->connector ->searchForEntities (
278278 $ this ->ldapBase ,
279279 "(&(objectClass=perunResource)(entityID= $ spEntityId)) " ,
280- array ( "perunResourceId " )
280+ [ "perunResourceId " ]
281281 );
282282 Logger::debug ("Resources - " . var_export ($ resources , true ));
283283
@@ -292,11 +292,11 @@ public function getUsersGroupsOnFacility($spEntityId, $userId)
292292 }
293293 $ resourcesString .= ") " ;
294294
295- $ resultGroups = array () ;
295+ $ resultGroups = [] ;
296296 $ groups = $ this ->connector ->searchForEntities (
297297 $ this ->ldapBase ,
298298 "(&(uniqueMember=perunUserId= " . $ userId . ", ou=People, " . $ this ->ldapBase . ") " . $ resourcesString . ") " ,
299- array ( "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " )
299+ [ "perunGroupId " , "cn " , "perunUniqueGroupName " , "perunVoId " , "description " ]
300300 );
301301
302302 foreach ($ groups as $ group ) {
@@ -322,7 +322,7 @@ public function getMemberStatusByUserAndVo($user, $vo)
322322 $ this ->ldapBase ,
323323 "(&(objectClass=perunGroup)(cn=members)(perunVoId= " . $ vo ->getId () .
324324 ")(uniqueMember=perunUserId= " . $ user ->getId () . ", ou=People, " . $ this ->ldapBase . ")) " ,
325- array ( "perunGroupid " )
325+ [ "perunGroupid " ]
326326 );
327327
328328 if ($ groupId === null || empty ($ groupId )) {
0 commit comments