Passed
Push — master ( bff1f0...deb707 )
by Morris
19:46 queued 12s
created
apps/theming/lib/ThemingDefaults.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -151,37 +151,37 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 
153 153
 	public function getImprintUrl() {
154
-		return (string)$this->config->getAppValue('theming', 'imprintUrl', '');
154
+		return (string) $this->config->getAppValue('theming', 'imprintUrl', '');
155 155
 	}
156 156
 
157 157
 	public function getPrivacyUrl() {
158
-		return (string)$this->config->getAppValue('theming', 'privacyUrl', '');
158
+		return (string) $this->config->getAppValue('theming', 'privacyUrl', '');
159 159
 	}
160 160
 
161 161
 	public function getShortFooter() {
162 162
 		$slogan = $this->getSlogan();
163 163
 		$baseUrl = $this->getBaseUrl();
164 164
 		if ($baseUrl !== '') {
165
-			$footer = '<a href="' . $baseUrl . '" target="_blank"' .
166
-				' rel="noreferrer noopener" class="entity-name">' . $this->getEntity() . '</a>';
165
+			$footer = '<a href="'.$baseUrl.'" target="_blank"'.
166
+				' rel="noreferrer noopener" class="entity-name">'.$this->getEntity().'</a>';
167 167
 		} else {
168
-			$footer = '<span class="entity-name">' .$this->getEntity() . '</span>';
168
+			$footer = '<span class="entity-name">'.$this->getEntity().'</span>';
169 169
 		}
170
-		$footer .= ($slogan !== '' ? ' – ' . $slogan : '');
170
+		$footer .= ($slogan !== '' ? ' – '.$slogan : '');
171 171
 
172 172
 		$links = [
173 173
 			[
174 174
 				'text' => $this->l->t('Legal notice'),
175
-				'url' => (string)$this->getImprintUrl()
175
+				'url' => (string) $this->getImprintUrl()
176 176
 			],
177 177
 			[
178 178
 				'text' => $this->l->t('Privacy policy'),
179
-				'url' => (string)$this->getPrivacyUrl()
179
+				'url' => (string) $this->getPrivacyUrl()
180 180
 			],
181 181
 		];
182 182
 
183 183
 		$navigation = $this->navigationManager->getAll(INavigationManager::TYPE_GUEST);
184
-		$guestNavigation = array_map(function ($nav) {
184
+		$guestNavigation = array_map(function($nav) {
185 185
 			return [
186 186
 				'text' => $nav['name'],
187 187
 				'url' => $nav['href']
@@ -195,13 +195,13 @@  discard block
 block discarded – undo
195 195
 			if ($link['url'] !== ''
196 196
 				&& filter_var($link['url'], FILTER_VALIDATE_URL)
197 197
 			) {
198
-				$legalLinks .= $divider . '<a href="' . $link['url'] . '" class="legal" target="_blank"' .
199
-					' rel="noreferrer noopener">' . $link['text'] . '</a>';
198
+				$legalLinks .= $divider.'<a href="'.$link['url'].'" class="legal" target="_blank"'.
199
+					' rel="noreferrer noopener">'.$link['text'].'</a>';
200 200
 				$divider = ' · ';
201 201
 			}
202 202
 		}
203 203
 		if ($legalLinks !== '') {
204
-			$footer .= '<br/>' . $legalLinks;
204
+			$footer .= '<br/>'.$legalLinks;
205 205
 		}
206 206
 
207 207
 		return $footer;
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
 			} else {
250 250
 				$logo = $this->urlGenerator->imagePath('core', 'logo/logo.png');
251 251
 			}
252
-			return $logo . '?v=' . $cacheBusterCounter;
252
+			return $logo.'?v='.$cacheBusterCounter;
253 253
 		}
254 254
 
255
-		return $this->urlGenerator->linkToRoute('theming.Theming.getImage', [ 'key' => 'logo', 'useSvg' => $useSvg, 'v' => $cacheBusterCounter ]);
255
+		return $this->urlGenerator->linkToRoute('theming.Theming.getImage', ['key' => 'logo', 'useSvg' => $useSvg, 'v' => $cacheBusterCounter]);
256 256
 	}
257 257
 
258 258
 	/**
@@ -291,17 +291,17 @@  discard block
 block discarded – undo
291 291
 	 */
292 292
 	public function getScssVariables() {
293 293
 		$cacheBuster = $this->config->getAppValue('theming', 'cachebuster', '0');
294
-		$cache = $this->cacheFactory->createDistributed('theming-' . $cacheBuster . '-' . $this->urlGenerator->getBaseUrl());
294
+		$cache = $this->cacheFactory->createDistributed('theming-'.$cacheBuster.'-'.$this->urlGenerator->getBaseUrl());
295 295
 		if ($value = $cache->get('getScssVariables')) {
296 296
 			return $value;
297 297
 		}
298 298
 
299 299
 		$variables = [
300
-			'theming-cachebuster' => "'" . $cacheBuster . "'",
301
-			'theming-logo-mime' => "'" . $this->config->getAppValue('theming', 'logoMime') . "'",
302
-			'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime') . "'",
303
-			'theming-logoheader-mime' => "'" . $this->config->getAppValue('theming', 'logoheaderMime') . "'",
304
-			'theming-favicon-mime' => "'" . $this->config->getAppValue('theming', 'faviconMime') . "'"
300
+			'theming-cachebuster' => "'".$cacheBuster."'",
301
+			'theming-logo-mime' => "'".$this->config->getAppValue('theming', 'logoMime')."'",
302
+			'theming-background-mime' => "'".$this->config->getAppValue('theming', 'backgroundMime')."'",
303
+			'theming-logoheader-mime' => "'".$this->config->getAppValue('theming', 'logoheaderMime')."'",
304
+			'theming-favicon-mime' => "'".$this->config->getAppValue('theming', 'faviconMime')."'"
305 305
 		];
306 306
 
307 307
 		$variables['image-logo'] = "url('".$this->imageManager->getImageUrl('logo')."')";
@@ -359,19 +359,19 @@  discard block
 block discarded – undo
359 359
 		if ($image === 'manifest.json') {
360 360
 			try {
361 361
 				$appPath = $this->appManager->getAppPath($app);
362
-				if (file_exists($appPath . '/img/manifest.json')) {
362
+				if (file_exists($appPath.'/img/manifest.json')) {
363 363
 					return false;
364 364
 				}
365 365
 			} catch (AppPathNotFoundException $e) {
366 366
 			}
367 367
 			$route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest');
368 368
 		}
369
-		if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image)) {
369
+		if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT.'/core/img/'.$image)) {
370 370
 			$route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]);
371 371
 		}
372 372
 
373 373
 		if ($route) {
374
-			return $route . '?v=' . $cacheBusterValue;
374
+			return $route.'?v='.$cacheBusterValue;
375 375
 		}
376 376
 
377 377
 		return false;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	 */
383 383
 	private function increaseCacheBuster() {
384 384
 		$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
385
-		$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey + 1);
385
+		$this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1);
386 386
 		$this->cacheFactory->createDistributed('theming-')->clear();
387 387
 		$this->cacheFactory->createDistributed('imagePath')->clear();
388 388
 	}
Please login to merge, or discard this patch.