@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | } catch (FederatedItemException $e) { |
126 | 126 | if ($input->getOption('status-code')) { |
127 | 127 | throw new FederatedItemException( |
128 | - ' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage() |
|
128 | + ' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage() |
|
129 | 129 | ); |
130 | 130 | } |
131 | 131 |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | |
359 | 359 | |
360 | 360 | /** |
361 | - * @param ?Member $owner |
|
361 | + * @param Member $owner |
|
362 | 362 | * |
363 | 363 | * @return self |
364 | 364 | */ |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | |
416 | 416 | /** |
417 | - * @param array $members |
|
417 | + * @param Member[] $members |
|
418 | 418 | * @param bool $detailed |
419 | 419 | * |
420 | 420 | * @return self |
@@ -84,26 +84,26 @@ discard block |
||
84 | 84 | |
85 | 85 | |
86 | 86 | // specific value |
87 | - const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
88 | - const CFG_SINGLE = 1; // Circle with only one single member. |
|
89 | - const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
87 | + const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
88 | + const CFG_SINGLE = 1; // Circle with only one single member. |
|
89 | + const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
90 | 90 | |
91 | 91 | // bitwise |
92 | - const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
93 | - const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
94 | - const CFG_OPEN = 16; // Circle is open, people can join |
|
95 | - const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
96 | - const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
97 | - const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
98 | - const CFG_PROTECTED = 256; // Password protected to join/request |
|
99 | - const CFG_NO_OWNER = 512; // no owner, only members |
|
100 | - const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
101 | - const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
102 | - const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
103 | - const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
104 | - const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
105 | - const CFG_FEDERATED = 32768; // Federated |
|
106 | - const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
92 | + const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
93 | + const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
94 | + const CFG_OPEN = 16; // Circle is open, people can join |
|
95 | + const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
96 | + const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
97 | + const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
98 | + const CFG_PROTECTED = 256; // Password protected to join/request |
|
99 | + const CFG_NO_OWNER = 512; // no owner, only members |
|
100 | + const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
101 | + const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
102 | + const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
103 | + const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
104 | + const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
105 | + const CFG_FEDERATED = 32768; // Federated |
|
106 | + const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
107 | 107 | |
108 | 108 | public static $DEF_CFG_MAX = 131071; |
109 | 109 | |
@@ -742,23 +742,23 @@ discard block |
||
742 | 742 | * @throws CircleNotFoundException |
743 | 743 | */ |
744 | 744 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
745 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
745 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
746 | 746 | throw new CircleNotFoundException(); |
747 | 747 | } |
748 | 748 | |
749 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
750 | - ->setName($this->get($prefix . 'name', $data)) |
|
751 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
752 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
753 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
754 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
755 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
756 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
757 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
758 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
759 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
760 | - |
|
761 | - $creation = $this->get($prefix . 'creation', $data); |
|
749 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
750 | + ->setName($this->get($prefix.'name', $data)) |
|
751 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
752 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
753 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
754 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
755 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
756 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
757 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
758 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
759 | + ->setDescription($this->get($prefix.'description', $data)); |
|
760 | + |
|
761 | + $creation = $this->get($prefix.'creation', $data); |
|
762 | 762 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
763 | 763 | |
764 | 764 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
@@ -40,10 +40,10 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | /** |
43 | - * @param $userId |
|
43 | + * @param string $userId |
|
44 | 44 | * @param $circleUniqueIds |
45 | - * @param $limit |
|
46 | - * @param $offset |
|
45 | + * @param integer $limit |
|
46 | + * @param integer $offset |
|
47 | 47 | * |
48 | 48 | * @return array |
49 | 49 | * @throws GSStatusException |
@@ -35,7 +35,6 @@ |
||
35 | 35 | |
36 | 36 | |
37 | 37 | /** * @deprecated |
38 | - |
|
39 | 38 | * Class GSSharesRequestBuilder |
40 | 39 | * |
41 | 40 | * @package OCA\Circles\Db |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $qb = $this->getQueryBuilder(); |
78 | 78 | $qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias, true) |
79 | 79 | ->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias) |
80 | - ->orderBy($alias . '.creation', 'asc'); |
|
80 | + ->orderBy($alias.'.creation', 'asc'); |
|
81 | 81 | |
82 | 82 | return $qb; |
83 | 83 | } |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | $qb->leftJoin( |
183 | 183 | CoreQueryBuilder::REMOTE, self::TABLE_MEMBER, $aliasMember, |
184 | 184 | $expr->andX( |
185 | - $expr->eq($aliasMember . '.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
186 | - $expr->eq($aliasMember . '.instance', CoreQueryBuilder::REMOTE . '.instance'), |
|
185 | + $expr->eq($aliasMember.'.circle_id', $qb->createNamedParameter($circle->getSingleId())), |
|
186 | + $expr->eq($aliasMember.'.instance', CoreQueryBuilder::REMOTE.'.instance'), |
|
187 | 187 | $expr->gte( |
188 | - $aliasMember . '.level', |
|
188 | + $aliasMember.'.level', |
|
189 | 189 | $qb->createNamedParameter(Member::LEVEL_MEMBER, IQueryBuilder::PARAM_INT) |
190 | 190 | ) |
191 | 191 | ) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | $external = $expr->andX(); |
195 | 195 | $external->add($qb->exprLimitToDBField('type', RemoteInstance::TYPE_EXTERNAL, true, false)); |
196 | - $external->add($expr->isNotNull($aliasMember . '.instance')); |
|
196 | + $external->add($expr->isNotNull($aliasMember.'.instance')); |
|
197 | 197 | $orX->add($external); |
198 | 198 | } |
199 | 199 |