@@ -67,7 +67,7 @@ |
||
| 67 | 67 | /** |
| 68 | 68 | * @var ?MimeTypeMap The cached built-in mapping array. |
| 69 | 69 | */ |
| 70 | - private static ?array $builtIn = null; |
|
| 70 | + private static ? array $builtIn = null; |
|
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * @var ?MimeTypeMap The mapping array. |
@@ -101,7 +101,9 @@ discard block |
||
| 101 | 101 | * |
| 102 | 102 | * @param non-empty-string $mimeTypesText The text from the mime.types file. |
| 103 | 103 | */ |
| 104 | - public function __construct(protected string $mimeTypesText) {} |
|
| 104 | + public function __construct(protected string $mimeTypesText) |
|
| 105 | + { |
|
| 106 | +} |
|
| 105 | 107 | |
| 106 | 108 | /** |
| 107 | 109 | * Read the given mime.types text and return a mapping compatible with the MimeTypes class. |
@@ -178,14 +180,16 @@ discard block |
||
| 178 | 180 | $mapping = $this->generateMapping(); |
| 179 | 181 | $nameMap = []; |
| 180 | 182 | |
| 181 | - foreach ($mapping['extensions'] as $mime => $extensions) { // @phpstan-ignore-line |
|
| 183 | + foreach ($mapping['extensions'] as $mime => $extensions) { |
|
| 184 | +// @phpstan-ignore-line |
|
| 182 | 185 | $nameMap[$mime] = $this->convertMimeTypeToCaseName($mime); |
| 183 | 186 | |
| 184 | 187 | $values['cases'] .= sprintf(Generator::spaceIndent(4, "case %s = '%s';\n"), $nameMap[$mime], $mime); |
| 185 | 188 | $values['type2ext'] .= sprintf(Generator::spaceIndent(12, "self::%s => '%s',\n"), $nameMap[$mime], $extensions[0]); |
| 186 | 189 | } |
| 187 | 190 | |
| 188 | - foreach ($mapping['mimes'] as $extension => $mimes) { // @phpstan-ignore-line |
|
| 191 | + foreach ($mapping['mimes'] as $extension => $mimes) { |
|
| 192 | +// @phpstan-ignore-line |
|
| 189 | 193 | $values['ext2type'] .= sprintf(Generator::spaceIndent(12, "'%s' => self::%s,\n"), $extension, $nameMap[$mimes[0]]); |
| 190 | 194 | } |
| 191 | 195 | |
@@ -93,7 +93,8 @@ |
||
| 93 | 93 | * The Mapping Array |
| 94 | 94 | */ |
| 95 | 95 | protected array $mapping |
| 96 | - ) {} |
|
| 96 | + ) { |
|
| 97 | +} |
|
| 97 | 98 | |
| 98 | 99 | #[\Override] |
| 99 | 100 | public function add(string $mime, string $extension, bool $prependExtension = true, bool $prependMime = true): void |