]> source.dussan.org Git - nextcloud-server.git/commitdiff
1. remove sizeof($filteredUsers) > 0 as condition
authorvoxsim <Simon Vocella>
Thu, 18 Sep 2014 15:50:19 +0000 (17:50 +0200)
committervoxsim <Simon Vocella>
Thu, 18 Sep 2014 15:50:19 +0000 (17:50 +0200)
2. use count instead of sizeof. Latter is an alias to first one, practically we stick to count everywhere. Having it consistent helps with readability.
3. move whitespace so we have $groupUsers[] = $filteredUser; instead of $groupUsers []= $filteredUser;

lib/private/group/manager.php

index e3744ab7698d6a016132d94e653c9255acd3b2cb..da598f0c334e295d6bbdc25fe1a61d201fa71237 100644 (file)
@@ -225,11 +225,11 @@ class Manager extends PublicEmitter {
                                $filteredUsers = $this->userManager->search($search, $searchLimit, $searchOffset);
                                foreach($filteredUsers as $filteredUser) {
                                        if($group->inGroup($filteredUser)) {
-                                               $groupUsers []= $filteredUser;
+                                               $groupUsers[]= $filteredUser;
                                        }
                                }
                                $searchOffset += $searchLimit;
-                       } while(sizeof($groupUsers) < $searchLimit+$offset && sizeof($filteredUsers) > 0 && sizeof($filteredUsers) === $searchLimit);
+                       } while(count($groupUsers) < $searchLimit+$offset && count($filteredUsers) === $searchLimit);
 
                        if($limit === -1) {
                                $groupUsers = array_slice($groupUsers, $offset);