@@ -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. |
@@ -96,7 +96,9 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @param non-empty-string $mimeTypesText The text from the mime.types file. |
| 98 | 98 | */ |
| 99 | - public function __construct(protected string $mimeTypesText) {} |
|
| 99 | + public function __construct(protected string $mimeTypesText) |
|
| 100 | + { |
|
| 101 | +} |
|
| 100 | 102 | |
| 101 | 103 | /** |
| 102 | 104 | * Read the given mime.types text and return a mapping compatible with the MimeTypes class. |
@@ -174,14 +176,16 @@ discard block |
||
| 174 | 176 | $mapping = $this->generateMapping(); |
| 175 | 177 | $nameMap = []; |
| 176 | 178 | |
| 177 | - foreach ($mapping['extensions'] as $mime => $extensions) { // @phpstan-ignore-line |
|
| 179 | + foreach ($mapping['extensions'] as $mime => $extensions) { |
|
| 180 | +// @phpstan-ignore-line |
|
| 178 | 181 | $nameMap[$mime] = $this->convertMimeTypeToCaseName($mime); |
| 179 | 182 | |
| 180 | 183 | $values['cases'] .= sprintf(" case %s = '%s';\n", $nameMap[$mime], $mime); |
| 181 | 184 | $values['type2ext'] .= sprintf(" self::%s => '%s',\n", $nameMap[$mime], $extensions[0]); |
| 182 | 185 | } |
| 183 | 186 | |
| 184 | - foreach ($mapping['mimes'] as $extension => $mimes) { // @phpstan-ignore-line |
|
| 187 | + foreach ($mapping['mimes'] as $extension => $mimes) { |
|
| 188 | +// @phpstan-ignore-line |
|
| 185 | 189 | $values['ext2type'] .= sprintf(" '%s' => self::%s,\n", $extension, $nameMap[$mimes[0]]); |
| 186 | 190 | } |
| 187 | 191 | |
@@ -92,7 +92,8 @@ |
||
| 92 | 92 | * The Mapping Array |
| 93 | 93 | */ |
| 94 | 94 | protected array $mapping |
| 95 | - ) {} |
|
| 95 | + ) { |
|
| 96 | +} |
|
| 96 | 97 | |
| 97 | 98 | /** |
| 98 | 99 | * Add a conversion. |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector; |
| 10 | 10 | use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector; |
| 11 | 11 | |
| 12 | -return static function (RectorConfig $rectorConfig): void { |
|
| 12 | +return static function(RectorConfig $rectorConfig): void { |
|
| 13 | 13 | $rectorConfig->paths([ |
| 14 | 14 | __DIR__ . '/src', |
| 15 | 15 | __DIR__ . '/tests/src', |