@@ -126,12 +126,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |