Passed
Push — master ( c1368b...bc6a5e )
by Joas
13:04 queued 17s
created
lib/public/IDBConnection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
  */
50 50
 interface IDBConnection {
51 51
 
52
-	const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
53
-	const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
54
-	const ADD_MISSING_COLUMNS_EVENT = self::class . '::ADD_MISSING_COLUMNS';
55
-	const CHECK_MISSING_COLUMNS_EVENT = self::class . '::CHECK_MISSING_COLUMNS';
52
+	const ADD_MISSING_INDEXES_EVENT = self::class.'::ADD_MISSING_INDEXES';
53
+	const CHECK_MISSING_INDEXES_EVENT = self::class.'::CHECK_MISSING_INDEXES';
54
+	const ADD_MISSING_COLUMNS_EVENT = self::class.'::ADD_MISSING_COLUMNS';
55
+	const CHECK_MISSING_COLUMNS_EVENT = self::class.'::CHECK_MISSING_COLUMNS';
56 56
 
57 57
 	/**
58 58
 	 * Gets the QueryBuilder for the connection.
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
71 71
 	 * @since 6.0.0
72 72
 	 */
73
-	public function prepare($sql, $limit=null, $offset=null);
73
+	public function prepare($sql, $limit = null, $offset = null);
74 74
 
75 75
 	/**
76 76
 	 * Executes an, optionally parameterized, SQL query.
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 * @return int number of inserted rows
138 138
 	 * @since 16.0.0
139 139
 	 */
140
-	public function insertIgnoreConflict(string $table,array $values) : int;
140
+	public function insertIgnoreConflict(string $table, array $values) : int;
141 141
 
142 142
 	/**
143 143
 	 * Insert or update a row value
Please login to merge, or discard this patch.
lib/private/Comments/Manager.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 	 * @return array
90 90
 	 */
91 91
 	protected function normalizeDatabaseData(array $data) {
92
-		$data['id'] = (string)$data['id'];
93
-		$data['parent_id'] = (string)$data['parent_id'];
94
-		$data['topmost_parent_id'] = (string)$data['topmost_parent_id'];
92
+		$data['id'] = (string) $data['id'];
93
+		$data['parent_id'] = (string) $data['parent_id'];
94
+		$data['topmost_parent_id'] = (string) $data['topmost_parent_id'];
95 95
 		$data['creation_timestamp'] = new \DateTime($data['creation_timestamp']);
96 96
 		if (!is_null($data['latest_child_timestamp'])) {
97 97
 			$data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']);
98 98
 		}
99
-		$data['children_count'] = (int)$data['children_count'];
99
+		$data['children_count'] = (int) $data['children_count'];
100 100
 		$data['reference_id'] = $data['reference_id'] ?? null;
101 101
 		return $data;
102 102
 	}
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$resultStatement = $query->execute();
184 184
 		$data = $resultStatement->fetch(\PDO::FETCH_NUM);
185 185
 		$resultStatement->closeCursor();
186
-		$children = (int)$data[0];
186
+		$children = (int) $data[0];
187 187
 
188 188
 		$comment = $this->get($id);
189 189
 		$comment->setChildrenCount($children);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			!is_string($type) || empty($type)
206 206
 			|| !is_string($id) || empty($id)
207 207
 		) {
208
-			throw new \InvalidArgumentException($role . ' parameters must be string and not empty');
208
+			throw new \InvalidArgumentException($role.' parameters must be string and not empty');
209 209
 		}
210 210
 	}
211 211
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 		if (empty($id)) {
220 220
 			return;
221 221
 		}
222
-		$this->commentsCache[(string)$id] = $comment;
222
+		$this->commentsCache[(string) $id] = $comment;
223 223
 	}
224 224
 
225 225
 	/**
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 * @param mixed $id the comment's id
229 229
 	 */
230 230
 	protected function uncache($id) {
231
-		$id = (string)$id;
231
+		$id = (string) $id;
232 232
 		if (isset($this->commentsCache[$id])) {
233 233
 			unset($this->commentsCache[$id]);
234 234
 		}
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	 * @since 9.0.0
245 245
 	 */
246 246
 	public function get($id) {
247
-		if ((int)$id === 0) {
247
+		if ((int) $id === 0) {
248 248
 			throw new \InvalidArgumentException('IDs must be translatable to a number in this implementation.');
249 249
 		}
250 250
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 		$query->select('*')
524 524
 			->from('comments')
525 525
 			->where($query->expr()->iLike('message', $query->createNamedParameter(
526
-				'%' . $this->dbConn->escapeLikeParameter($search). '%'
526
+				'%'.$this->dbConn->escapeLikeParameter($search).'%'
527 527
 			)))
528 528
 			->orderBy('creation_timestamp', 'DESC')
529 529
 			->addOrderBy('id', 'DESC')
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 		$resultStatement = $query->execute();
586 586
 		$data = $resultStatement->fetch(\PDO::FETCH_NUM);
587 587
 		$resultStatement->closeCursor();
588
-		return (int)$data[0];
588
+		return (int) $data[0];
589 589
 	}
590 590
 
591 591
 	/**
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 			->execute();
790 790
 
791 791
 		if ($affectedRows > 0) {
792
-			$comment->setId((string)$qb->getLastInsertId());
792
+			$comment->setId((string) $qb->getLastInsertId());
793 793
 			$this->sendEvent(CommentsEvent::EVENT_ADD, $comment);
794 794
 		}
795 795
 
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
 		if (!isset($this->displayNameResolvers[$type])) {
1085 1085
 			throw new \OutOfBoundsException('No Displayname resolver for this type registered');
1086 1086
 		}
1087
-		return (string)$this->displayNameResolvers[$type]($id);
1087
+		return (string) $this->displayNameResolvers[$type]($id);
1088 1088
 	}
1089 1089
 
1090 1090
 	/**
Please login to merge, or discard this patch.
core/Application.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 		$container = $this->getContainer();
63 63
 
64
-		$container->registerService('defaultMailAddress', function () {
64
+		$container->registerService('defaultMailAddress', function() {
65 65
 			return Util::getDefaultEmailAddress('lostpassword-noreply');
66 66
 		});
67 67
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$notificationManager->registerNotifierService(AuthenticationNotifier::class);
75 75
 
76 76
 		$eventDispatcher->addListener(IDBConnection::CHECK_MISSING_INDEXES_EVENT,
77
-			function (GenericEvent $event) use ($container) {
77
+			function(GenericEvent $event) use ($container) {
78 78
 				/** @var MissingIndexInformation $subject */
79 79
 				$subject = $event->getSubject();
80 80
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		);
170 170
 
171 171
 		$eventDispatcher->addListener(IDBConnection::CHECK_MISSING_COLUMNS_EVENT,
172
-			function (GenericEvent $event) use ($container) {
172
+			function(GenericEvent $event) use ($container) {
173 173
 				/** @var MissingColumnInformation $subject */
174 174
 				$subject = $event->getSubject();
175 175
 
Please login to merge, or discard this patch.