Passed
Push — master ( 638e94...cc258a )
by Morris
11:32 queued 11s
created
lib/private/Files/Type/Detection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 	}
127 127
 
128 128
 	private function loadCustomDefinitions(string $fileName, array $definitions): array {
129
-		if (file_exists($this->customConfigDir . '/' . $fileName)) {
130
-			$custom = json_decode(file_get_contents($this->customConfigDir . '/' . $fileName), true);
129
+		if (file_exists($this->customConfigDir.'/'.$fileName)) {
130
+			$custom = json_decode(file_get_contents($this->customConfigDir.'/'.$fileName), true);
131 131
 			if (json_last_error() === JSON_ERROR_NONE) {
132 132
 				$definitions = array_merge($definitions, $custom);
133 133
 			} else {
134
-				$this->logger->warning('Failed to parse ' . $fileName . ': ' . json_last_error_msg());
134
+				$this->logger->warning('Failed to parse '.$fileName.': '.json_last_error_msg());
135 135
 			}
136 136
 		}
137 137
 		return $definitions;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			return;
146 146
 		}
147 147
 
148
-		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);
148
+		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true);
149 149
 		$this->mimeTypeAlias = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEALIASES, $this->mimeTypeAlias);
150 150
 	}
151 151
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
 	public function getOnlyDefaultAliases(): array {
161 161
 		$this->loadMappings();
162
-		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);
162
+		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true);
163 163
 		return $this->mimeTypeAlias;
164 164
 	}
165 165
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 			return;
172 172
 		}
173 173
 
174
-		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypemapping.dist.json'), true);
174
+		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypemapping.dist.json'), true);
175 175
 		$mimetypeMapping = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEMAPPING, $mimetypeMapping);
176 176
 
177 177
 		$this->registerTypeArray($mimetypeMapping);
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 		// Icon exists?
368 368
 		try {
369
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg');
369
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$icon.'.svg');
370 370
 			return $this->mimetypeIcons[$mimetype];
371 371
 		} catch (\RuntimeException $e) {
372 372
 			// Specified image not found
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		if (strpos($icon, '-')) {
378 378
 			$mimePart = substr($icon, 0, strpos($icon, '-'));
379 379
 			try {
380
-				$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg');
380
+				$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$mimePart.'.svg');
381 381
 				return $this->mimetypeIcons[$mimetype];
382 382
 			} catch (\RuntimeException $e) {
383 383
 				// Image for the first part of the mimetype not found
Please login to merge, or discard this patch.