Completed
Push — master ( 383329...49bb79 )
by Maxence
02:22
created
lib/Model/Member.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -717,29 +717,29 @@  discard block
 block discarded – undo
717 717
 	 * @throws MemberNotFoundException
718 718
 	 */
719 719
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
720
-		if ($this->get($prefix . 'single_id', $data) === '') {
720
+		if ($this->get($prefix.'single_id', $data) === '') {
721 721
 			throw new MemberNotFoundException();
722 722
 		}
723 723
 
724
-		$this->setId($this->get($prefix . 'member_id', $data));
725
-		$this->setCircleId($this->get($prefix . 'circle_id', $data));
726
-		$this->setSingleId($this->get($prefix . 'single_id', $data));
727
-		$this->setUserId($this->get($prefix . 'user_id', $data));
728
-		$this->setUserType($this->getInt($prefix . 'user_type', $data));
729
-		$this->setInstance($this->get($prefix . 'instance', $data));
730
-		$this->setLevel($this->getInt($prefix . 'level', $data));
731
-		$this->setStatus($this->get($prefix . 'status', $data));
732
-		$this->setDisplayName($this->get($prefix . 'cached_name', $data));
733
-		$this->setNote($this->get($prefix . 'note', $data));
734
-		$this->setContactId($this->get($prefix . 'contact_id', $data));
735
-		$this->setContactMeta($this->get($prefix . 'contact_meta', $data));
736
-
737
-		$cachedUpdate = $this->get($prefix . 'cached_update', $data);
724
+		$this->setId($this->get($prefix.'member_id', $data));
725
+		$this->setCircleId($this->get($prefix.'circle_id', $data));
726
+		$this->setSingleId($this->get($prefix.'single_id', $data));
727
+		$this->setUserId($this->get($prefix.'user_id', $data));
728
+		$this->setUserType($this->getInt($prefix.'user_type', $data));
729
+		$this->setInstance($this->get($prefix.'instance', $data));
730
+		$this->setLevel($this->getInt($prefix.'level', $data));
731
+		$this->setStatus($this->get($prefix.'status', $data));
732
+		$this->setDisplayName($this->get($prefix.'cached_name', $data));
733
+		$this->setNote($this->get($prefix.'note', $data));
734
+		$this->setContactId($this->get($prefix.'contact_id', $data));
735
+		$this->setContactMeta($this->get($prefix.'contact_meta', $data));
736
+
737
+		$cachedUpdate = $this->get($prefix.'cached_update', $data);
738 738
 		if ($cachedUpdate !== '') {
739 739
 			$this->setDisplayUpdate(DateTime::createFromFormat('Y-m-d H:i:s', $cachedUpdate)->getTimestamp());
740 740
 		}
741 741
 
742
-		$joined = $this->get($prefix . 'joined', $data);
742
+		$joined = $this->get($prefix.'joined', $data);
743 743
 		if ($joined !== '') {
744 744
 			$this->setJoined(DateTime::createFromFormat('Y-m-d H:i:s', $joined)->getTimestamp());
745 745
 		}
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 	public static function parseLevelInt(int $level): int {
814 814
 		if (!array_key_exists($level, self::$DEF_LEVEL)) {
815 815
 			$all = implode(', ', array_keys(self::$DEF_LEVEL));
816
-			throw new ParseMemberLevelException('Available levels: ' . $all, 121);
816
+			throw new ParseMemberLevelException('Available levels: '.$all, 121);
817 817
 		}
818 818
 
819 819
 		return $level;
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 
833 833
 		if (!$level) {
834 834
 			$all = implode(', ', array_values(self::$DEF_LEVEL));
835
-			throw new ParseMemberLevelException('Available levels: ' . $all, 121);
835
+			throw new ParseMemberLevelException('Available levels: '.$all, 121);
836 836
 		}
837 837
 
838 838
 		return (int)$level;
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 		$type = array_search($typeString, Member::$TYPE);
854 854
 		if ($type === false) {
855 855
 			$all = implode(', ', array_values(self::$TYPE));
856
-			throw new UserTypeNotFoundException('Available types: ' . $all);
856
+			throw new UserTypeNotFoundException('Available types: '.$all);
857 857
 		}
858 858
 
859 859
 		return (int)$type;
Please login to merge, or discard this patch.