| @@ -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 | |
| @@ -93,7 +93,8 @@ | ||
| 93 | 93 | * | 
| 94 | 94 | */ | 
| 95 | 95 | protected array $mapping | 
| 96 | -    ) {} | |
| 96 | +    ) { | |
| 97 | +} | |
| 97 | 98 | |
| 98 | 99 | /** | 
| 99 | 100 | * Add a conversion. | 
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | use Rector\Core\ValueObject\PhpVersion; | 
| 11 | 11 | use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector; | 
| 12 | 12 | |
| 13 | -return static function (RectorConfig $rectorConfig): void { | |
| 13 | +return static function(RectorConfig $rectorConfig): void { | |
| 14 | 14 | $rectorConfig->paths([ | 
| 15 | 15 | __DIR__ . '/src', | 
| 16 | 16 | __DIR__ . '/tests/src', |