summaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-10-09 19:13:27 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-11-25 14:01:25 +0100
commit7ff15c975694f838a21e8e40cc03e21da83fdf97 (patch)
tree365ab9a9a63837693602e6a50d82542e6bd20494 /lib/private/Group
parent7b1eedb11e5f55d563831d8e58c44e615267669c (diff)
downloadnextcloud-server-7ff15c975694f838a21e8e40cc03e21da83fdf97.tar.gz
nextcloud-server-7ff15c975694f838a21e8e40cc03e21da83fdf97.zip
fix documentation, get and createGroup may return null
* also have stricter checks in place Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Manager.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index b372eb1786e..9ae25be27f5 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -163,7 +163,7 @@ class Manager extends PublicEmitter implements IGroupManager {
/**
* @param string $gid
- * @return \OC\Group\Group
+ * @return IGroup|null
*/
public function get($gid) {
if (isset($this->cachedGroups[$gid])) {
@@ -175,7 +175,7 @@ class Manager extends PublicEmitter implements IGroupManager {
/**
* @param string $gid
* @param string $displayName
- * @return \OCP\IGroup
+ * @return \OCP\IGroup|null
*/
protected function getGroupObject($gid, $displayName = null) {
$backends = [];
@@ -210,11 +210,11 @@ class Manager extends PublicEmitter implements IGroupManager {
/**
* @param string $gid
- * @return IGroup|bool|null
+ * @return IGroup|null
*/
public function createGroup($gid) {
if ($gid === '' || $gid === null) {
- return false;
+ return null;
} else if ($group = $this->get($gid)) {
return $group;
} else {