Completed
Pull Request — master (#5137)
by Julius
13:31
created
apps/theming/lib/ThemingDefaults.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 
111 111
 	public function getShortFooter() {
112 112
 		$slogan = $this->getSlogan();
113
-		$footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
114
-			' rel="noreferrer">' .$this->getEntity() . '</a>'.
115
-			($slogan !== '' ? ' – ' . $slogan : '');
113
+		$footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'.
114
+			' rel="noreferrer">'.$this->getEntity().'</a>'.
115
+			($slogan !== '' ? ' – '.$slogan : '');
116 116
 
117 117
 		return $footer;
118 118
 	}
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
 
145 145
 		$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
146 146
 
147
-		if(!$logo || !$logoExists) {
148
-			if($useSvg) {
147
+		if (!$logo || !$logoExists) {
148
+			if ($useSvg) {
149 149
 				$logo = $this->urlGenerator->imagePath('core', 'logo.svg');
150 150
 			} else {
151 151
 				$logo = $this->urlGenerator->imagePath('core', 'logo.png');
152 152
 			}
153
-			return $logo . '?v=' . $cacheBusterCounter;
153
+			return $logo.'?v='.$cacheBusterCounter;
154 154
 		}
155 155
 
156
-		return $this->urlGenerator->linkToRoute('theming.Theming.getLogo') . '?v=' . $cacheBusterCounter;
156
+		return $this->urlGenerator->linkToRoute('theming.Theming.getLogo').'?v='.$cacheBusterCounter;
157 157
 	}
158 158
 
159 159
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @return string
163 163
 	 */
164 164
 	public function getBackground() {
165
-		$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false);
165
+		$backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false);
166 166
 
167 167
 		$backgroundExists = true;
168 168
 		try {
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 
174 174
 		$cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0');
175 175
 
176
-		if(!$backgroundLogo || !$backgroundExists) {
177
-			return $this->urlGenerator->imagePath('core','background.jpg') . '?v=' . $cacheBusterCounter;
176
+		if (!$backgroundLogo || !$backgroundExists) {
177
+			return $this->urlGenerator->imagePath('core', 'background.jpg').'?v='.$cacheBusterCounter;
178 178
 		}
179 179
 
180
-		return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter;
180
+		return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground').'?v='.$cacheBusterCounter;
181 181
 	}
182 182
 
183 183
 
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
 		}
192 192
 
193 193
 		$variables = [
194
-			'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'",
195
-			'theming-logo-mime' => "'" . $this->config->getAppValue('theming', 'logoMime', '') . "'",
196
-			'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'"
194
+			'theming-cachebuster' => "'".$this->config->getAppValue('theming', 'cachebuster', '0')."'",
195
+			'theming-logo-mime' => "'".$this->config->getAppValue('theming', 'logoMime', '')."'",
196
+			'theming-background-mime' => "'".$this->config->getAppValue('theming', 'backgroundMime', '')."'"
197 197
 		];
198 198
 
199 199
 		$variables['image-logo'] = "'".$this->getLogo()."'";
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	public function shouldReplaceIcons() {
227 227
 		$cache = $this->cacheFactory->create('theming');
228
-		if($value = $cache->get('shouldReplaceIcons')) {
229
-			return (bool)$value;
228
+		if ($value = $cache->get('shouldReplaceIcons')) {
229
+			return (bool) $value;
230 230
 		}
231 231
 		$value = false;
232
-		if(extension_loaded('imagick')) {
232
+		if (extension_loaded('imagick')) {
233 233
 			$checkImagick = new \Imagick();
234 234
 			if (count($checkImagick->queryFormats('SVG')) >= 1) {
235 235
 				$value = true;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 */
246 246
 	private function increaseCacheBuster() {
247 247
 		$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
248
-		$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
248
+		$this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1);
249 249
 		$this->cacheFactory->create('theming')->clear('getScssVariables');
250 250
 	}
251 251
 
Please login to merge, or discard this patch.