Completed
Pull Request — master (#3643)
by Christoph
12:28
created
lib/private/Repair/RepairMimeTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	private function updateMimetypes($updatedMimetypes) {
136 136
 		if (empty($this->folderMimeTypeId)) {
137 137
 			$result = \OC_DB::executeAudited(self::getIdStmt(), array('httpd/unix-directory'));
138
-			$this->folderMimeTypeId = (int)$result->fetchOne();
138
+			$this->folderMimeTypeId = (int) $result->fetchOne();
139 139
 		}
140 140
 
141 141
 		foreach ($updatedMimetypes as $extension => $mimetype) {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			$mimetypeId = $result->fetchOne();
153 153
 
154 154
 			// change mimetype for files with x extension
155
-			\OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension));
155
+			\OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.'.$extension));
156 156
 		}
157 157
 	}
158 158
 
Please login to merge, or discard this patch.
lib/private/Repair/Collation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		$tables = $this->getAllNonUTF8BinTables($this->connection);
77 77
 		foreach ($tables as $table) {
78 78
 			$output->info("Change row format for $table ...");
79
-			$query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT = DYNAMIC;');
79
+			$query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT = DYNAMIC;');
80 80
 			try {
81 81
 				$query->execute();
82 82
 			} catch (DriverException $e) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 			}
89 89
 
90 90
 			$output->info("Change collation for $table ...");
91
-			$query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET ' . $characterSet . ' COLLATE ' . $characterSet . '_bin;');
91
+			$query = $this->connection->prepare('ALTER TABLE `'.$table.'` CONVERT TO CHARACTER SET '.$characterSet.' COLLATE '.$characterSet.'_bin;');
92 92
 			try {
93 93
 				$query->execute();
94 94
 			} catch (DriverException $e) {
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 		$dbName = $this->config->getSystemValue("dbname");
110 110
 		$characterSet = $this->config->getSystemValue('mysql.utf8mb4', false) ? 'utf8mb4' : 'utf8';
111 111
 		$rows = $connection->fetchAll(
112
-			"SELECT DISTINCT(TABLE_NAME) AS `table`" .
113
-			"	FROM INFORMATION_SCHEMA . COLUMNS" .
114
-			"	WHERE TABLE_SCHEMA = ?" .
115
-			"	AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" .
112
+			"SELECT DISTINCT(TABLE_NAME) AS `table`".
113
+			"	FROM INFORMATION_SCHEMA . COLUMNS".
114
+			"	WHERE TABLE_SCHEMA = ?".
115
+			"	AND (COLLATION_NAME <> '".$characterSet."_bin' OR CHARACTER_SET_NAME <> '".$characterSet."')".
116 116
 			"	AND TABLE_NAME LIKE \"*PREFIX*%\"",
117 117
 			array($dbName)
118 118
 		);
Please login to merge, or discard this patch.
lib/private/Repair/OldGroupMembershipShares.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 		$result->closeCursor();
94 94
 
95 95
 		if ($deletedEntries) {
96
-			$output->info('Removed ' . $deletedEntries . ' shares where user is not a member of the group anymore');
96
+			$output->info('Removed '.$deletedEntries.' shares where user is not a member of the group anymore');
97 97
 		}
98 98
 	}
99 99
 
Please login to merge, or discard this patch.
lib/private/Repair/CleanTags.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -171,14 +171,14 @@
 block discarded – undo
171 171
 	protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
172 172
 		$qb = $this->connection->getQueryBuilder();
173 173
 
174
-		$qb->select('d.' . $deleteId)
174
+		$qb->select('d.'.$deleteId)
175 175
 			->from($deleteTable, 'd')
176
-			->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, ' s.' . $sourceId))
176
+			->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.'.$deleteId, ' s.'.$sourceId))
177 177
 			->where(
178 178
 				$qb->expr()->eq('d.type', $qb->expr()->literal('files'))
179 179
 			)
180 180
 			->andWhere(
181
-				$qb->expr()->isNull('s.' . $sourceNullColumn)
181
+				$qb->expr()->isNull('s.'.$sourceNullColumn)
182 182
 			);
183 183
 		$result = $qb->execute();
184 184
 
Please login to merge, or discard this patch.
lib/private/DB/AdapterSqlite.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 	public function fixupStatement($statement) {
44 44
 		$statement = preg_replace('( I?LIKE \?)', '$0 ESCAPE \'\\\'', $statement);
45 45
 		$statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
46
-		$statement = str_replace( '`', '"', $statement );
47
-		$statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
46
+		$statement = str_replace('`', '"', $statement);
47
+		$statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement);
48 48
 		$statement = str_ireplace('GREATEST(', 'MAX(', $statement);
49
-		$statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );
49
+		$statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement);
50 50
 		return $statement;
51 51
 	}
52 52
 
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 		if (empty($compare)) {
66 66
 			$compare = array_keys($input);
67 67
 		}
68
-		$fieldList = '`' . implode('`,`', array_keys($input)) . '`';
68
+		$fieldList = '`'.implode('`,`', array_keys($input)).'`';
69 69
 		$query = "INSERT INTO `$table` ($fieldList) SELECT "
70
-			. str_repeat('?,', count($input)-1).'? '
70
+			. str_repeat('?,', count($input) - 1).'? '
71 71
 			. " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE ";
72 72
 
73 73
 		$inserts = array_values($input);
74
-		foreach($compare as $key) {
75
-			$query .= '`' . $key . '`';
74
+		foreach ($compare as $key) {
75
+			$query .= '`'.$key.'`';
76 76
 			if (is_null($input[$key])) {
77 77
 				$query .= ' IS NULL AND ';
78 78
 			} else {
Please login to merge, or discard this patch.
lib/private/DB/AdapterOCI8.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 		}
34 34
 		if ($table !== null) {
35 35
 			$suffix = '_SEQ';
36
-			$table = '"' . $table . $suffix . '"';
36
+			$table = '"'.$table.$suffix.'"';
37 37
 		}
38 38
 		return $this->conn->realLastInsertId($table);
39 39
 	}
Please login to merge, or discard this patch.
lib/private/DB/OCSqlitePlatform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	/**
38 38
 	 * {@inheritDoc}
39 39
 	 */
40
-	protected function _getCreateTableSQL($name, array $columns, array $options = array()){
40
+	protected function _getCreateTableSQL($name, array $columns, array $options = array()) {
41 41
 		// if auto increment is set the column is already defined as primary key
42 42
 		foreach ($columns as $column) {
43 43
 			if (!empty($column['autoincrement'])) {
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QuoteHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
 				return $string;
74 74
 			}
75 75
 
76
-			return $alias . '.`' . $columnName . '`';
76
+			return $alias.'.`'.$columnName.'`';
77 77
 		}
78 78
 
79
-		return '`' . $string . '`';
79
+		return '`'.$string.'`';
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QueryBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 			$params = [];
156 156
 			foreach ($this->getParameters() as $placeholder => $value) {
157 157
 				if (is_array($value)) {
158
-					$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';
158
+					$params[] = $placeholder.' => (\''.implode('\', \'', $value).'\')';
159 159
 				} else {
160
-					$params[] = $placeholder . ' => \'' . $value . '\'';
160
+					$params[] = $placeholder.' => \''.$value.'\'';
161 161
 				}
162 162
 			}
163 163
 			if (empty($params)) {
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	public function selectAlias($select, $alias) {
375 375
 
376 376
 		$this->queryBuilder->addSelect(
377
-			$this->helper->quoteColumnName($select) . ' AS ' . $this->helper->quoteColumnName($alias)
377
+			$this->helper->quoteColumnName($select).' AS '.$this->helper->quoteColumnName($alias)
378 378
 		);
379 379
 
380 380
 		return $this;
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	public function selectDistinct($select) {
397 397
 
398 398
 		$this->queryBuilder->addSelect(
399
-			'DISTINCT ' . $this->helper->quoteColumnName($select)
399
+			'DISTINCT '.$this->helper->quoteColumnName($select)
400 400
 		);
401 401
 
402 402
 		return $this;
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 	 * @return IParameter
1074 1074
 	 */
1075 1075
 	public function createParameter($name) {
1076
-		return new Parameter(':' . $name);
1076
+		return new Parameter(':'.$name);
1077 1077
 	}
1078 1078
 
1079 1079
 	/**
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
 			return $table;
1141 1141
 		}
1142 1142
 
1143
-		return '*PREFIX*' . $table;
1143
+		return '*PREFIX*'.$table;
1144 1144
 	}
1145 1145
 
1146 1146
 	/**
@@ -1155,6 +1155,6 @@  discard block
 block discarded – undo
1155 1155
 			$tableAlias .= '.';
1156 1156
 		}
1157 1157
 
1158
-		return $this->helper->quoteColumnName($tableAlias . $column);
1158
+		return $this->helper->quoteColumnName($tableAlias.$column);
1159 1159
 	}
1160 1160
 }
Please login to merge, or discard this patch.