Passed
Push — master ( 06340b...711a9f )
by Blizzz
16:05 queued 17s
created
lib/private/URLGenerator.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		$route = substr($route, 7);
127
-		$route = '/ocs/v2.php' . $route;
127
+		$route = '/ocs/v2.php'.$route;
128 128
 
129 129
 		return $this->getAbsoluteURL($route);
130 130
 	}
@@ -146,33 +146,33 @@  discard block
 block discarded – undo
146 146
 		if ($appName !== '') {
147 147
 			$app_path = $this->getAppManager()->getAppPath($appName);
148 148
 			// Check if the app is in the app folder
149
-			if (file_exists($app_path . '/' . $file)) {
149
+			if (file_exists($app_path.'/'.$file)) {
150 150
 				if (substr($file, -3) === 'php') {
151
-					$urlLinkTo = \OC::$WEBROOT . '/index.php/apps/' . $appName;
151
+					$urlLinkTo = \OC::$WEBROOT.'/index.php/apps/'.$appName;
152 152
 					if ($frontControllerActive) {
153
-						$urlLinkTo = \OC::$WEBROOT . '/apps/' . $appName;
153
+						$urlLinkTo = \OC::$WEBROOT.'/apps/'.$appName;
154 154
 					}
155
-					$urlLinkTo .= ($file !== 'index.php') ? '/' . $file : '';
155
+					$urlLinkTo .= ($file !== 'index.php') ? '/'.$file : '';
156 156
 				} else {
157
-					$urlLinkTo = $this->getAppManager()->getAppWebPath($appName) . '/' . $file;
157
+					$urlLinkTo = $this->getAppManager()->getAppWebPath($appName).'/'.$file;
158 158
 				}
159 159
 			} else {
160
-				$urlLinkTo = \OC::$WEBROOT . '/' . $appName . '/' . $file;
160
+				$urlLinkTo = \OC::$WEBROOT.'/'.$appName.'/'.$file;
161 161
 			}
162 162
 		} else {
163
-			if (file_exists(\OC::$SERVERROOT . '/core/' . $file)) {
164
-				$urlLinkTo = \OC::$WEBROOT . '/core/' . $file;
163
+			if (file_exists(\OC::$SERVERROOT.'/core/'.$file)) {
164
+				$urlLinkTo = \OC::$WEBROOT.'/core/'.$file;
165 165
 			} else {
166 166
 				if ($frontControllerActive && $file === 'index.php') {
167
-					$urlLinkTo = \OC::$WEBROOT . '/';
167
+					$urlLinkTo = \OC::$WEBROOT.'/';
168 168
 				} else {
169
-					$urlLinkTo = \OC::$WEBROOT . '/' . $file;
169
+					$urlLinkTo = \OC::$WEBROOT.'/'.$file;
170 170
 				}
171 171
 			}
172 172
 		}
173 173
 
174 174
 		if ($args && $query = http_build_query($args, '', '&')) {
175
-			$urlLinkTo .= '?' . $query;
175
+			$urlLinkTo .= '?'.$query;
176 176
 		}
177 177
 
178 178
 		return $urlLinkTo;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 				$appName = 'core';
209 209
 				$appPath = false;
210 210
 			} else {
211
-				throw new RuntimeException('image not found: image: ' . $file . ' webroot: ' . \OC::$WEBROOT . ' serverroot: ' . \OC::$SERVERROOT);
211
+				throw new RuntimeException('image not found: image: '.$file.' webroot: '.\OC::$WEBROOT.' serverroot: '.\OC::$SERVERROOT);
212 212
 			}
213 213
 		}
214 214
 
@@ -223,38 +223,38 @@  discard block
 block discarded – undo
223 223
 			}
224 224
 		}
225 225
 
226
-		if (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$appName/img/$file")) {
227
-			$path = \OC::$WEBROOT . "/themes/$theme/apps/$appName/img/$file";
228
-		} elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$appName/img/$basename.svg")
229
-			&& file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$appName/img/$basename.png")) {
230
-			$path = \OC::$WEBROOT . "/themes/$theme/apps/$appName/img/$basename.png";
231
-		} elseif (!empty($appName) and file_exists(\OC::$SERVERROOT . "/themes/$theme/$appName/img/$file")) {
232
-			$path = \OC::$WEBROOT . "/themes/$theme/$appName/img/$file";
233
-		} elseif (!empty($appName) and (!file_exists(\OC::$SERVERROOT . "/themes/$theme/$appName/img/$basename.svg")
234
-			&& file_exists(\OC::$SERVERROOT . "/themes/$theme/$appName/img/$basename.png"))) {
235
-			$path = \OC::$WEBROOT . "/themes/$theme/$appName/img/$basename.png";
236
-		} elseif (file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$file")) {
237
-			$path = \OC::$WEBROOT . "/themes/$theme/core/img/$file";
238
-		} elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$basename.svg")
239
-			&& file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$basename.png")) {
240
-			$path = \OC::$WEBROOT . "/themes/$theme/core/img/$basename.png";
226
+		if (file_exists(\OC::$SERVERROOT."/themes/$theme/apps/$appName/img/$file")) {
227
+			$path = \OC::$WEBROOT."/themes/$theme/apps/$appName/img/$file";
228
+		} elseif (!file_exists(\OC::$SERVERROOT."/themes/$theme/apps/$appName/img/$basename.svg")
229
+			&& file_exists(\OC::$SERVERROOT."/themes/$theme/apps/$appName/img/$basename.png")) {
230
+			$path = \OC::$WEBROOT."/themes/$theme/apps/$appName/img/$basename.png";
231
+		} elseif (!empty($appName) and file_exists(\OC::$SERVERROOT."/themes/$theme/$appName/img/$file")) {
232
+			$path = \OC::$WEBROOT."/themes/$theme/$appName/img/$file";
233
+		} elseif (!empty($appName) and (!file_exists(\OC::$SERVERROOT."/themes/$theme/$appName/img/$basename.svg")
234
+			&& file_exists(\OC::$SERVERROOT."/themes/$theme/$appName/img/$basename.png"))) {
235
+			$path = \OC::$WEBROOT."/themes/$theme/$appName/img/$basename.png";
236
+		} elseif (file_exists(\OC::$SERVERROOT."/themes/$theme/core/img/$file")) {
237
+			$path = \OC::$WEBROOT."/themes/$theme/core/img/$file";
238
+		} elseif (!file_exists(\OC::$SERVERROOT."/themes/$theme/core/img/$basename.svg")
239
+			&& file_exists(\OC::$SERVERROOT."/themes/$theme/core/img/$basename.png")) {
240
+			$path = \OC::$WEBROOT."/themes/$theme/core/img/$basename.png";
241 241
 		} elseif ($themingEnabled && $themingImagePath) {
242 242
 			$path = $themingImagePath;
243
-		} elseif ($appPath && file_exists($appPath . "/img/$file")) {
244
-			$path = $this->getAppManager()->getAppWebPath($appName) . "/img/$file";
245
-		} elseif ($appPath && !file_exists($appPath . "/img/$basename.svg")
246
-			&& file_exists($appPath . "/img/$basename.png")) {
247
-			$path = $this->getAppManager()->getAppWebPath($appName) . "/img/$basename.png";
248
-		} elseif (!empty($appName) and file_exists(\OC::$SERVERROOT . "/$appName/img/$file")) {
249
-			$path = \OC::$WEBROOT . "/$appName/img/$file";
250
-		} elseif (!empty($appName) and (!file_exists(\OC::$SERVERROOT . "/$appName/img/$basename.svg")
251
-				&& file_exists(\OC::$SERVERROOT . "/$appName/img/$basename.png"))) {
252
-			$path = \OC::$WEBROOT . "/$appName/img/$basename.png";
253
-		} elseif (file_exists(\OC::$SERVERROOT . "/core/img/$file")) {
254
-			$path = \OC::$WEBROOT . "/core/img/$file";
255
-		} elseif (!file_exists(\OC::$SERVERROOT . "/core/img/$basename.svg")
256
-			&& file_exists(\OC::$SERVERROOT . "/core/img/$basename.png")) {
257
-			$path = \OC::$WEBROOT . "/themes/$theme/core/img/$basename.png";
243
+		} elseif ($appPath && file_exists($appPath."/img/$file")) {
244
+			$path = $this->getAppManager()->getAppWebPath($appName)."/img/$file";
245
+		} elseif ($appPath && !file_exists($appPath."/img/$basename.svg")
246
+			&& file_exists($appPath."/img/$basename.png")) {
247
+			$path = $this->getAppManager()->getAppWebPath($appName)."/img/$basename.png";
248
+		} elseif (!empty($appName) and file_exists(\OC::$SERVERROOT."/$appName/img/$file")) {
249
+			$path = \OC::$WEBROOT."/$appName/img/$file";
250
+		} elseif (!empty($appName) and (!file_exists(\OC::$SERVERROOT."/$appName/img/$basename.svg")
251
+				&& file_exists(\OC::$SERVERROOT."/$appName/img/$basename.png"))) {
252
+			$path = \OC::$WEBROOT."/$appName/img/$basename.png";
253
+		} elseif (file_exists(\OC::$SERVERROOT."/core/img/$file")) {
254
+			$path = \OC::$WEBROOT."/core/img/$file";
255
+		} elseif (!file_exists(\OC::$SERVERROOT."/core/img/$basename.svg")
256
+			&& file_exists(\OC::$SERVERROOT."/core/img/$basename.png")) {
257
+			$path = \OC::$WEBROOT."/themes/$theme/core/img/$basename.png";
258 258
 		}
259 259
 
260 260
 		if ($path !== '') {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			return $path;
263 263
 		}
264 264
 
265
-		throw new RuntimeException('image not found: image:' . $file . ' webroot:' . \OC::$WEBROOT . ' serverroot:' . \OC::$SERVERROOT);
265
+		throw new RuntimeException('image not found: image:'.$file.' webroot:'.\OC::$WEBROOT.' serverroot:'.\OC::$SERVERROOT);
266 266
 	}
267 267
 
268 268
 
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
 		$separator = strpos($url, '/') === 0 ? '' : '/';
276 276
 
277 277
 		if (\OC::$CLI && !\defined('PHPUNIT_RUN')) {
278
-			return rtrim($this->config->getSystemValue('overwrite.cli.url'), '/') . '/' . ltrim($url, '/');
278
+			return rtrim($this->config->getSystemValue('overwrite.cli.url'), '/').'/'.ltrim($url, '/');
279 279
 		}
280 280
 		// The ownCloud web root can already be prepended.
281 281
 		if (\OC::$WEBROOT !== '' && strpos($url, \OC::$WEBROOT) === 0) {
282 282
 			$url = substr($url, \strlen(\OC::$WEBROOT));
283 283
 		}
284 284
 
285
-		return $this->getBaseUrl() . $separator . $url;
285
+		return $this->getBaseUrl().$separator.$url;
286 286
 	}
287 287
 
288 288
 	/**
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
 
332 332
 		if ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true
333 333
 			|| getenv('front_controller_active') === 'true') {
334
-			return $this->getAbsoluteURL('/apps/' . $appId . '/');
334
+			return $this->getAbsoluteURL('/apps/'.$appId.'/');
335 335
 		}
336 336
 
337
-		return $this->getAbsoluteURL('/index.php/apps/' . $appId . '/');
337
+		return $this->getAbsoluteURL('/index.php/apps/'.$appId.'/');
338 338
 	}
339 339
 
340 340
 	/**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	public function getBaseUrl(): string {
344 344
 		// BaseUrl can be equal to 'http(s)://' during the first steps of the initial setup.
345 345
 		if ($this->baseUrl === null || $this->baseUrl === "http://" || $this->baseUrl === "https://") {
346
-			$this->baseUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . \OC::$WEBROOT;
346
+			$this->baseUrl = $this->request->getServerProtocol().'://'.$this->request->getServerHost().\OC::$WEBROOT;
347 347
 		}
348 348
 		return $this->baseUrl;
349 349
 	}
Please login to merge, or discard this patch.
apps/settings/lib/Controller/HelpController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 		}
80 80
 
81 81
 		$documentationUrl = $this->urlGenerator->getAbsoluteURL(
82
-			$this->urlGenerator->linkTo('', 'core/doc/' . $mode . '/index.html')
82
+			$this->urlGenerator->linkTo('', 'core/doc/'.$mode.'/index.html')
83 83
 		);
84 84
 
85 85
 		$urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']);
Please login to merge, or discard this patch.