Completed
Push — master ( 6cc548...53028d )
by John
23:01 queued 13s
created
lib/private/SystemTag/SystemTagManager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
 			->from(self::TAG_TABLE);
104 104
 
105 105
 		if (!\is_null($visibilityFilter)) {
106
-			$query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int)$visibilityFilter)));
106
+			$query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int) $visibilityFilter)));
107 107
 		}
108 108
 
109 109
 		if (!empty($nameSearchPattern)) {
110 110
 			$query->andWhere(
111 111
 				$query->expr()->iLike(
112 112
 					'name',
113
-					$query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern) . '%')
113
+					$query->createNamedParameter('%'.$this->connection->escapeLikeParameter($nameSearchPattern).'%')
114 114
 				)
115 115
 			);
116 116
 		}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 		$result->closeCursor();
144 144
 		if (!$row) {
145 145
 			throw new TagNotFoundException(
146
-				'Tag ("' . $truncatedTagName . '", ' . $userVisible . ', ' . $userAssignable . ') does not exist'
146
+				'Tag ("'.$truncatedTagName.'", '.$userVisible.', '.$userAssignable.') does not exist'
147 147
 			);
148 148
 		}
149 149
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		$existingTags = $this->getAllTags(null, $tagName);
161 161
 		foreach ($existingTags as $existingTag) {
162 162
 			if (mb_strtolower($existingTag->getName()) === mb_strtolower($tagName)) {
163
-				throw new TagAlreadyExistsException('Tag ' . $tagName . ' already exists');
163
+				throw new TagAlreadyExistsException('Tag '.$tagName.' already exists');
164 164
 			}
165 165
 		}
166 166
 
@@ -172,14 +172,14 @@  discard block
 block discarded – undo
172 172
 				'name' => $query->createNamedParameter($truncatedTagName),
173 173
 				'visibility' => $query->createNamedParameter($userVisible ? 1 : 0),
174 174
 				'editable' => $query->createNamedParameter($userAssignable ? 1 : 0),
175
-				'etag' => $query->createNamedParameter(md5((string)time())),
175
+				'etag' => $query->createNamedParameter(md5((string) time())),
176 176
 			]);
177 177
 
178 178
 		try {
179 179
 			$query->execute();
180 180
 		} catch (UniqueConstraintViolationException $e) {
181 181
 			throw new TagAlreadyExistsException(
182
-				'Tag ("' . $truncatedTagName . '", ' . $userVisible . ', ' . $userAssignable . ') already exists',
182
+				'Tag ("'.$truncatedTagName.'", '.$userVisible.', '.$userAssignable.') already exists',
183 183
 				0,
184 184
 				$e
185 185
 			);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$tagId = $query->getLastInsertId();
189 189
 
190 190
 		$tag = new SystemTag(
191
-			(string)$tagId,
191
+			(string) $tagId,
192 192
 			$truncatedTagName,
193 193
 			$userVisible,
194 194
 			$userAssignable
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 		foreach ($existingTags as $existingTag) {
240 240
 			if (mb_strtolower($existingTag->getName()) === mb_strtolower($truncatedNewName)
241 241
 				&& $existingTag->getId() !== $tagId) {
242
-				throw new TagAlreadyExistsException('Tag ' . $truncatedNewName . ' already exists');
242
+				throw new TagAlreadyExistsException('Tag '.$truncatedNewName.' already exists');
243 243
 			}
244 244
 		}
245 245
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 			}
265 265
 		} catch (UniqueConstraintViolationException $e) {
266 266
 			throw new TagAlreadyExistsException(
267
-				'Tag ("' . $newName . '", ' . $userVisible . ', ' . $userAssignable . ') already exists',
267
+				'Tag ("'.$newName.'", '.$userVisible.', '.$userAssignable.') already exists',
268 268
 				0,
269 269
 				$e
270 270
 			);
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	}
395 395
 
396 396
 	private function createSystemTagFromRow($row): SystemTag {
397
-		return new SystemTag((string)$row['id'], $row['name'], (bool)$row['visibility'], (bool)$row['editable'], $row['etag'], $row['color']);
397
+		return new SystemTag((string) $row['id'], $row['name'], (bool) $row['visibility'], (bool) $row['editable'], $row['etag'], $row['color']);
398 398
 	}
399 399
 
400 400
 	public function setTagGroups(ISystemTag $tag, array $groupIds): void {
Please login to merge, or discard this patch.