Passed
Push — master ( 32f79c...03cdff )
by Roeland
10:27 queued 11s
created
core/Controller/CssController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$folder = $this->appData->getFolder($appName);
73 73
 			$gzip = false;
74 74
 			$file = $this->getFile($folder, $fileName, $gzip);
75
-		} catch(NotFoundException $e) {
75
+		} catch (NotFoundException $e) {
76 76
 			return new NotFoundResponse();
77 77
 		}
78 78
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		if (strpos($encoding, 'gzip') !== false) {
102 102
 			try {
103 103
 				$gzip = true;
104
-				return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz
104
+				return $folder->getFile($fileName.'.gzip'); # Safari doesn't like .gz
105 105
 			} catch (NotFoundException $e) {
106 106
 				// continue
107 107
 			}
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/DatabaseSchemaChecker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 			throw new \RuntimeException("No app with given id <$appId> known.");
36 36
 		}
37 37
 
38
-		if (!file_exists($appPath . '/appinfo/database.xml')) {
38
+		if (!file_exists($appPath.'/appinfo/database.xml')) {
39 39
 			return ['errors' => [], 'warnings' => []];
40 40
 		}
41 41
 
42 42
 		libxml_use_internal_errors(true);
43 43
 		$loadEntities = libxml_disable_entity_loader(false);
44
-		$xml = simplexml_load_file($appPath . '/appinfo/database.xml');
44
+		$xml = simplexml_load_file($appPath.'/appinfo/database.xml');
45 45
 		libxml_disable_entity_loader($loadEntities);
46 46
 
47 47
 
@@ -49,37 +49,37 @@  discard block
 block discarded – undo
49 49
 
50 50
 		foreach ($xml->table as $table) {
51 51
 			// Table names
52
-			if (strpos((string)$table->name, '*dbprefix*') !== 0) {
53
-				$errors[] = 'Database schema error: name of table ' . (string)$table->name . ' does not start with *dbprefix*';
52
+			if (strpos((string) $table->name, '*dbprefix*') !== 0) {
53
+				$errors[] = 'Database schema error: name of table '.(string) $table->name.' does not start with *dbprefix*';
54 54
 			}
55
-			$tableName = substr((string)$table->name, strlen('*dbprefix*'));
55
+			$tableName = substr((string) $table->name, strlen('*dbprefix*'));
56 56
 			if (strpos($tableName, '*dbprefix*') !== false) {
57
-				$warnings[] = 'Database schema warning: *dbprefix* should only appear once in name of table ' . (string)$table->name;
57
+				$warnings[] = 'Database schema warning: *dbprefix* should only appear once in name of table '.(string) $table->name;
58 58
 			}
59 59
 
60 60
 			if (strlen($tableName) > 27) {
61
-				$errors[] = 'Database schema error: Name of table ' . (string)$table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
61
+				$errors[] = 'Database schema error: Name of table '.(string) $table->name.' is too long ('.strlen($tableName).'), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
62 62
 			}
63 63
 
64 64
 			$hasAutoIncrement = false;
65 65
 
66 66
 			// Column names
67 67
 			foreach ($table->declaration->field as $column) {
68
-				if (strpos((string)$column->name, '*dbprefix*') !== false) {
69
-					$warnings[] = 'Database schema warning: *dbprefix* should not appear in name of column ' . (string)$column->name . ' on table ' . (string)$table->name;
68
+				if (strpos((string) $column->name, '*dbprefix*') !== false) {
69
+					$warnings[] = 'Database schema warning: *dbprefix* should not appear in name of column '.(string) $column->name.' on table '.(string) $table->name;
70 70
 				}
71 71
 
72
-				if (strlen((string)$column->name) > 30) {
73
-					$errors[] = 'Database schema error: Name of column ' . (string)$column->name . ' on table ' . (string)$table->name . ' is too long (' . strlen($tableName) . '), max. 30 characters allowed';
72
+				if (strlen((string) $column->name) > 30) {
73
+					$errors[] = 'Database schema error: Name of column '.(string) $column->name.' on table '.(string) $table->name.' is too long ('.strlen($tableName).'), max. 30 characters allowed';
74 74
 				}
75 75
 
76 76
 				if ($column->autoincrement) {
77 77
 					if ($hasAutoIncrement) {
78
-						$errors[] = 'Database schema error: Table ' . (string)$table->name . ' has multiple autoincrement columns';
78
+						$errors[] = 'Database schema error: Table '.(string) $table->name.' has multiple autoincrement columns';
79 79
 					}
80 80
 
81 81
 					if (strlen($tableName) > 21) {
82
-						$errors[] = 'Database schema error: Name of table ' . (string)$table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
82
+						$errors[] = 'Database schema error: Name of table '.(string) $table->name.' is too long ('.strlen($tableName).'), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
83 83
 					}
84 84
 
85 85
 					$hasAutoIncrement = true;
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
 
89 89
 			// Index names
90 90
 			foreach ($table->declaration->index as $index) {
91
-				$hasPrefix = strpos((string)$index->name, '*dbprefix*');
91
+				$hasPrefix = strpos((string) $index->name, '*dbprefix*');
92 92
 				if ($hasPrefix !== false && $hasPrefix !== 0) {
93
-					$warnings[] = 'Database schema warning: *dbprefix* should only appear at the beginning in name of index ' . (string)$index->name . ' on table ' . (string)$table->name;
93
+					$warnings[] = 'Database schema warning: *dbprefix* should only appear at the beginning in name of index '.(string) $index->name.' on table '.(string) $table->name;
94 94
 				}
95 95
 
96
-				$indexName = $hasPrefix === 0 ? substr((string)$index->name, strlen('*dbprefix*')) : (string)$index->name;
96
+				$indexName = $hasPrefix === 0 ? substr((string) $index->name, strlen('*dbprefix*')) : (string) $index->name;
97 97
 				if (strlen($indexName) > 27) {
98
-					$errors[] = 'Database schema error: Name of index ' . (string)$index->name . ' on table ' . (string)$table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters + *dbprefix* allowed';
98
+					$errors[] = 'Database schema error: Name of index '.(string) $index->name.' on table '.(string) $table->name.' is too long ('.strlen($tableName).'), max. 27 characters + *dbprefix* allowed';
99 99
 				}
100 100
 			}
101 101
 		}
Please login to merge, or discard this patch.
core/Controller/JsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$folder = $this->appData->getFolder($appName);
73 73
 			$gzip = false;
74 74
 			$file = $this->getFile($folder, $fileName, $gzip);
75
-		} catch(NotFoundException $e) {
75
+		} catch (NotFoundException $e) {
76 76
 			return new NotFoundResponse();
77 77
 		}
78 78
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		if (strpos($encoding, 'gzip') !== false) {
102 102
 			try {
103 103
 				$gzip = true;
104
-				return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz
104
+				return $folder->getFile($fileName.'.gzip'); # Safari doesn't like .gz
105 105
 			} catch (NotFoundException $e) {
106 106
 				// continue
107 107
 			}
Please login to merge, or discard this patch.
apps/user_ldap/appinfo/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  */
25 25
 $config = \OC::$server->getConfig();
26 26
 $state = $config->getSystemValue('ldapIgnoreNamingRules', 'doSet');
27
-if($state === 'doSet') {
27
+if ($state === 'doSet') {
28 28
 	\OC::$server->getConfig()->setSystemValue('ldapIgnoreNamingRules', false);
29 29
 }
30 30
 
Please login to merge, or discard this patch.
lib/public/Template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 	 * @since 8.0.0
129 129
 	 * @suppress PhanDeprecatedFunction
130 130
 	 */
131
-	public static function html_select_options($options, $selected, $params=array()) {
131
+	public static function html_select_options($options, $selected, $params = array()) {
132 132
 		return \html_select_options($options, $selected, $params);
133 133
 	}
134 134
 }
Please login to merge, or discard this patch.
apps/systemtags/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // WARNING: this should be moved to proper AppFramework handling
24 24
 // Check if we are a user
25 25
 if (!\OC::$server->getUserSession()->isLoggedIn()) {
26
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
26
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute(
27 27
 			'core.login.showLoginForm',
28 28
 			[
29 29
 				'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 }
35 35
 // Redirect to 2FA challenge selection if 2FA challenge was not solved yet
36 36
 if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
37
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
37
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38 38
 	exit();
39 39
 }
40 40
 
Please login to merge, or discard this patch.
lib/private/Memcache/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return IMemcache
134 134
 	 */
135 135
 	public function createLocking(string $prefix = ''): IMemcache {
136
-		return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
+		return new $this->lockingCacheClass($this->globalPrefix.'/'.$prefix);
137 137
 	}
138 138
 
139 139
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return ICache
144 144
 	 */
145 145
 	public function createDistributed(string $prefix = ''): ICache {
146
-		return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
+		return new $this->distributedCacheClass($this->globalPrefix.'/'.$prefix);
147 147
 	}
148 148
 
149 149
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return ICache
154 154
 	 */
155 155
 	public function createLocal(string $prefix = ''): ICache {
156
-		return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
+		return new $this->localCacheClass($this->globalPrefix.'/'.$prefix);
157 157
 	}
158 158
 
159 159
 	/**
Please login to merge, or discard this patch.
core/Controller/AvatarController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			if (!($node instanceof File)) {
173 173
 				return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]);
174 174
 			}
175
-			if ($node->getSize() > 20*1024*1024) {
175
+			if ($node->getSize() > 20 * 1024 * 1024) {
176 176
 				return new JSONResponse(
177 177
 					['data' => ['message' => $this->l->t('File is too big')]],
178 178
 					Http::STATUS_BAD_REQUEST
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 				 is_uploaded_file($files['tmp_name'][0]) &&
201 201
 				!\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0])
202 202
 			) {
203
-				if ($files['size'][0] > 20*1024*1024) {
203
+				if ($files['size'][0] > 20 * 1024 * 1024) {
204 204
 					return new JSONResponse(
205 205
 						['data' => ['message' => $this->l->t('File is too big')]],
206 206
 						Http::STATUS_BAD_REQUEST
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 				Http::STATUS_OK,
293 293
 				['Content-Type' => $image->mimeType()]);
294 294
 
295
-		$resp->setETag((string)crc32($image->data()));
295
+		$resp->setETag((string) crc32($image->data()));
296 296
 		$resp->cacheFor(0);
297 297
 		$resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT')));
298 298
 		return $resp;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
 		$image = new \OC_Image();
327 327
 		$image->loadFromData($tmpAvatar);
328
-		$image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h']));
328
+		$image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h']));
329 329
 		try {
330 330
 			$avatar = $this->avatarManager->getAvatar($this->userId);
331 331
 			$avatar->set($image);
Please login to merge, or discard this patch.
lib/private/Collaboration/Collaborators/UserPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 
152 152
 	public function takeOutCurrentUser(array &$users) {
153 153
 		$currentUser = $this->userSession->getUser();
154
-		if(!is_null($currentUser)) {
154
+		if (!is_null($currentUser)) {
155 155
 			if (isset($users[$currentUser->getUID()])) {
156 156
 				unset($users[$currentUser->getUID()]);
157 157
 			}
Please login to merge, or discard this patch.