summaryrefslogtreecommitdiffstats
path: root/tests/lib/Util
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 15:12:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 20:25:24 +0200
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /tests/lib/Util
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
downloadnextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz
nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Util')
-rw-r--r--tests/lib/Util/Group/Dummy.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Util/Group/Dummy.php b/tests/lib/Util/Group/Dummy.php
index 293c8f48945..3735a5e1167 100644
--- a/tests/lib/Util/Group/Dummy.php
+++ b/tests/lib/Util/Group/Dummy.php
@@ -35,7 +35,7 @@ use OC\Group\Backend;
* dummy group backend, does not keep state, only for testing use
*/
class Dummy extends Backend {
- private $groups=[];
+ private $groups = [];
/**
* Try to create a new group
* @param string $gid The name of the group to create
@@ -46,7 +46,7 @@ class Dummy extends Backend {
*/
public function createGroup($gid) {
if (!isset($this->groups[$gid])) {
- $this->groups[$gid]=[];
+ $this->groups[$gid] = [];
return true;
} else {
return false;
@@ -79,7 +79,7 @@ class Dummy extends Backend {
*/
public function inGroup($uid, $gid) {
if (isset($this->groups[$gid])) {
- return (array_search($uid, $this->groups[$gid])!==false);
+ return (array_search($uid, $this->groups[$gid]) !== false);
} else {
return false;
}
@@ -95,8 +95,8 @@ class Dummy extends Backend {
*/
public function addToGroup($uid, $gid) {
if (isset($this->groups[$gid])) {
- if (array_search($uid, $this->groups[$gid])===false) {
- $this->groups[$gid][]=$uid;
+ if (array_search($uid, $this->groups[$gid]) === false) {
+ $this->groups[$gid][] = $uid;
return true;
} else {
return false;
@@ -116,7 +116,7 @@ class Dummy extends Backend {
*/
public function removeFromGroup($uid, $gid) {
if (isset($this->groups[$gid])) {
- if (($index=array_search($uid, $this->groups[$gid]))!==false) {
+ if (($index = array_search($uid, $this->groups[$gid])) !== false) {
unset($this->groups[$gid][$index]);
return true;
} else {
@@ -136,11 +136,11 @@ class Dummy extends Backend {
* if the user exists at all.
*/
public function getUserGroups($uid) {
- $groups=[];
- $allGroups=array_keys($this->groups);
+ $groups = [];
+ $allGroups = array_keys($this->groups);
foreach ($allGroups as $group) {
if ($this->inGroup($uid, $group)) {
- $groups[]=$group;
+ $groups[] = $group;
}
}
return $groups;