Passed
Push — 1.1.x ( 2b97cf...0a977f )
by f
12:10
created
src/Formats.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -158,8 +158,9 @@  discard block
 block discarded – undo
158 158
         // by file content
159 159
         if ($contentCheck) {
160 160
             $mime_type = mime_content_type($fileName);
161
-            if (isset(static::$mimeTypes[$mime_type]))
162
-                return static::$mimeTypes[$mime_type];
161
+            if (isset(static::$mimeTypes[$mime_type])) {
162
+                            return static::$mimeTypes[$mime_type];
163
+            }
163 164
         }
164 165
 
165 166
         return false;
@@ -251,12 +252,14 @@  discard block
 block discarded – undo
251 252
     protected static function checkFormatSupport($format, $function)
252 253
     {
253 254
         static::retrieveAllFormats();
254
-        if (!static::canOpen($format))
255
-            return false;
255
+        if (!static::canOpen($format)) {
256
+                    return false;
257
+        }
256 258
 
257 259
         foreach (static::$formatsSupport[$format] as $driver) {
258
-            if ($driver::$function($format))
259
-                return true;
260
+            if ($driver::$function($format)) {
261
+                            return true;
262
+            }
260 263
         }
261 264
 
262 265
         return false;
@@ -271,15 +274,18 @@  discard block
 block discarded – undo
271 274
     {
272 275
         static::retrieveAllFormats();
273 276
 
274
-        if (!static::canOpen($format))
275
-            throw new UnsupportedArchiveException('Unsupported archive type: '.$format.' of archive ');
277
+        if (!static::canOpen($format)) {
278
+                    throw new UnsupportedArchiveException('Unsupported archive type: '.$format.' of archive ');
279
+        }
276 280
 
277
-        if (!$createAbility)
278
-            return static::$formatsSupport[$format][0];
281
+        if (!$createAbility) {
282
+                    return static::$formatsSupport[$format][0];
283
+        }
279 284
 
280 285
         foreach (static::$formatsSupport[$format] as $driver) {
281
-            if ($driver::canCreateArchive($format))
282
-                return $driver;
286
+            if ($driver::canCreateArchive($format)) {
287
+                            return $driver;
288
+            }
283 289
         }
284 290
 
285 291
         return false;
Please login to merge, or discard this patch.