Passed
Push — develop ( 2c5279...02e9f6 )
by Eric
01:53
created
src/Mapping/Builder.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
      * @param MimeTypeMap $mapping An associative array containing two entries.
51 51
      *                             See `MimeTypes` constructor for details.
52 52
      */
53
-    private function __construct(protected array $mapping) {}
53
+    private function __construct(protected array $mapping)
54
+    {
55
+}
54 56
 
55 57
     #[\Override]
56 58
     public function add(string $mime, string $extension, bool $prependExtension = true, bool $prependMime = true): void
Please login to merge, or discard this patch.
src/Mapping/Generator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             $parts = [];
114 114
 
115 115
             if ($line !== '') {
116
-                $parts = array_values(array_filter(explode("\t", $line), static function (string $value): bool {
116
+                $parts = array_values(array_filter(explode("\t", $line), static function(string $value): bool {
117 117
                     return (trim($value) !== '');
118 118
                 }));
119 119
             }
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,9 @@  discard block
 block discarded – undo
78 78
      *
79 79
      * @param non-empty-string $mimeTypesText The text from the mime.types file.
80 80
      */
81
-    public function __construct(protected string $mimeTypesText) {}
81
+    public function __construct(protected string $mimeTypesText)
82
+    {
83
+}
82 84
 
83 85
     /**
84 86
      * Generate the JSON from the mapCache.
@@ -160,14 +162,16 @@  discard block
 block discarded – undo
160 162
         $mapping = $this->generateMapping();
161 163
         $nameMap = [];
162 164
 
163
-        foreach ($mapping['extensions'] as $mime => $extensions) { // @phpstan-ignore-line
165
+        foreach ($mapping['extensions'] as $mime => $extensions) {
166
+// @phpstan-ignore-line
164 167
             $nameMap[$mime] = $this->convertMimeTypeToCaseName($mime);
165 168
 
166 169
             $values['cases'] .= sprintf(Generator::spaceIndent(4, "case %s = '%s';\n"), $nameMap[$mime], $mime);
167 170
             $values['type2ext'] .= sprintf(Generator::spaceIndent(12, "self::%s => '%s',\n"), $nameMap[$mime], $extensions[0]);
168 171
         }
169 172
 
170
-        foreach ($mapping['mimes'] as $extension => $mimes) { // @phpstan-ignore-line
173
+        foreach ($mapping['mimes'] as $extension => $mimes) {
174
+// @phpstan-ignore-line
171 175
             $values['ext2type'] .= sprintf(Generator::spaceIndent(12, "'%s' => self::%s,\n"), $extension, $nameMap[$mimes[0]]);
172 176
         }
173 177
 
Please login to merge, or discard this patch.
src/MimeTypes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     /**
64 64
      * @var ?MimeTypeMap The cached built-in mapping array.
65 65
      */
66
-    private static ?array $builtIn = null;
66
+    private static ? array $builtIn = null;
67 67
 
68 68
     /**
69 69
      * Create a new mime types instance with the given mappings.
Please login to merge, or discard this patch.