Completed
Push — master ( f6d0d8...c7f480 )
by Maxence
01:49 queued 01:11
created
lib/Model/Circle.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -86,26 +86,26 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 	// specific value
89
-	public const CFG_CIRCLE = 0;        // only for code readability. Circle is locked by default.
90
-	public const CFG_SINGLE = 1;        // Circle with only one single member.
91
-	public const CFG_PERSONAL = 2;      // Personal circle, only the owner can see it.
89
+	public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default.
90
+	public const CFG_SINGLE = 1; // Circle with only one single member.
91
+	public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it.
92 92
 
93 93
 	// bitwise
94
-	public const CFG_SYSTEM = 4;            // System Circle (not managed by the official front-end). Meaning some config are limited
95
-	public const CFG_VISIBLE = 8;           // Visible to everyone, if not visible, people have to know its name to be able to find it
96
-	public const CFG_OPEN = 16;             // Circle is open, people can join
97
-	public const CFG_INVITE = 32;           // Adding a member generate an invitation that needs to be accepted
98
-	public const CFG_REQUEST = 64;          // Request to join Circles needs to be confirmed by a moderator
99
-	public const CFG_FRIEND = 128;          // Members of the circle can invite their friends
100
-	public const CFG_PROTECTED = 256;       // Password protected to join/request
101
-	public const CFG_NO_OWNER = 512;        // no owner, only members
102
-	public const CFG_HIDDEN = 1024;         // hidden from listing, but available as a share entity
103
-	public const CFG_BACKEND = 2048;            // Fully hidden, only backend Circles
104
-	public const CFG_LOCAL = 4096;              // Local even on GlobalScale
105
-	public const CFG_ROOT = 8192;               // Circle cannot be inside another Circle
106
-	public const CFG_CIRCLE_INVITE = 16384;     // Circle must confirm when invited in another circle
107
-	public const CFG_FEDERATED = 32768;         // Federated
108
-	public const CFG_MOUNTPOINT = 65536;        // Generate a Files folder for this Circle
94
+	public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited
95
+	public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it
96
+	public const CFG_OPEN = 16; // Circle is open, people can join
97
+	public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted
98
+	public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator
99
+	public const CFG_FRIEND = 128; // Members of the circle can invite their friends
100
+	public const CFG_PROTECTED = 256; // Password protected to join/request
101
+	public const CFG_NO_OWNER = 512; // no owner, only members
102
+	public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity
103
+	public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles
104
+	public const CFG_LOCAL = 4096; // Local even on GlobalScale
105
+	public const CFG_ROOT = 8192; // Circle cannot be inside another Circle
106
+	public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle
107
+	public const CFG_FEDERATED = 32768; // Federated
108
+	public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle
109 109
 
110 110
 	public static $DEF_CFG_MAX = 131071;
111 111
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	 */
469 469
 	public function addInheritedMembers(array $members): IMemberships {
470 470
 		$knownIds = array_map(
471
-			function (Member $member): string {
471
+			function(Member $member): string {
472 472
 				return $member->getId();
473 473
 			}, $this->inheritedMembers
474 474
 		);
@@ -826,24 +826,24 @@  discard block
 block discarded – undo
826 826
 	 * @throws CircleNotFoundException
827 827
 	 */
828 828
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
829
-		if ($this->get($prefix . 'unique_id', $data) === '') {
829
+		if ($this->get($prefix.'unique_id', $data) === '') {
830 830
 			throw new CircleNotFoundException();
831 831
 		}
832 832
 
833
-		$this->setSingleId($this->get($prefix . 'unique_id', $data))
834
-			 ->setName($this->get($prefix . 'name', $data))
835
-			 ->setDisplayName($this->get($prefix . 'display_name', $data))
836
-			 ->setSanitizedName($this->get($prefix . 'sanitized_name', $data))
837
-			 ->setConfig($this->getInt($prefix . 'config', $data))
838
-			 ->setSource($this->getInt($prefix . 'source', $data))
839
-			 ->setInstance($this->get($prefix . 'instance', $data))
840
-			 ->setPopulation($this->getInt($prefix . 'population', $data))
841
-			 ->setSettings($this->getArray($prefix . 'settings', $data))
842
-			 ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data))
843
-			 ->setContactGroupName($this->get($prefix . 'contact_groupname', $data))
844
-			 ->setDescription($this->get($prefix . 'description', $data));
845
-
846
-		$creation = $this->get($prefix . 'creation', $data);
833
+		$this->setSingleId($this->get($prefix.'unique_id', $data))
834
+			 ->setName($this->get($prefix.'name', $data))
835
+			 ->setDisplayName($this->get($prefix.'display_name', $data))
836
+			 ->setSanitizedName($this->get($prefix.'sanitized_name', $data))
837
+			 ->setConfig($this->getInt($prefix.'config', $data))
838
+			 ->setSource($this->getInt($prefix.'source', $data))
839
+			 ->setInstance($this->get($prefix.'instance', $data))
840
+			 ->setPopulation($this->getInt($prefix.'population', $data))
841
+			 ->setSettings($this->getArray($prefix.'settings', $data))
842
+			 ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data))
843
+			 ->setContactGroupName($this->get($prefix.'contact_groupname', $data))
844
+			 ->setDescription($this->get($prefix.'description', $data));
845
+
846
+		$creation = $this->get($prefix.'creation', $data);
847 847
 		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
848 848
 
849 849
 		$this->getManager()->manageImportFromDatabase($this, $data, $prefix);
Please login to merge, or discard this patch.