Completed
Push — master ( bca2e7...1f8246 )
by Maxence
02:35 queued 11s
created
lib/Service/CircleService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 
490 490
 		$i = 1;
491 491
 		while (true) {
492
-			$testDisplayName = $baseDisplayName . (($i > 1) ? ' (' . $i . ')' : '');
492
+			$testDisplayName = $baseDisplayName.(($i > 1) ? ' ('.$i.')' : '');
493 493
 			$test = new Circle();
494 494
 			$test->setDisplayName($testDisplayName);
495 495
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 
523 523
 		$i = 1;
524 524
 		while (true) {
525
-			$testSanitizedName = $baseSanitizedName . (($i > 1) ? '-' . $i : '');
525
+			$testSanitizedName = $baseSanitizedName.(($i > 1) ? '-'.$i : '');
526 526
 
527 527
 			$test = new Circle();
528 528
 			$test->setSanitizedName($testSanitizedName);
Please login to merge, or discard this patch.
lib/Model/Circle.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -84,26 +84,26 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.