Passed
Push — develop ( 044541...f3e33e )
by Eric
12:20
created
src/Mapping/Generator.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.