Completed
Push — master ( 1d37d4...bf8214 )
by Ori
01:34
created
src/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -335,9 +335,9 @@  discard block
 block discarded – undo
335 335
     {
336 336
         $tempfile = tempnam(sys_get_temp_dir(), 'datapackage-php');
337 337
         unlink($tempfile);
338
-        $tempfile.='.zip';
338
+        $tempfile .= '.zip';
339 339
         stream_copy_to_stream(fopen($source, 'r'), fopen($tempfile, 'w'));
340
-        register_shutdown_function(function() use ($tempfile) {unlink($tempfile);});
340
+        register_shutdown_function(function() use ($tempfile) {unlink($tempfile); });
341 341
         return self::loadFileZipSource($tempfile);
342 342
     }
343 343
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $tempdir = tempnam(sys_get_temp_dir(), 'datapackage-php');
348 348
         unlink($tempdir);
349 349
         mkdir($tempdir);
350
-        register_shutdown_function(function() use ($tempdir) {Utils::removeDir($tempdir);});
350
+        register_shutdown_function(function() use ($tempdir) {Utils::removeDir($tempdir); });
351 351
         $zippy->open($source)->extract($tempdir);
352 352
         if (!file_exists($tempdir."/datapackage.json")) {
353 353
             throw new Exceptions\DatapackageInvalidSourceException("zip file must contain a datappackage.json file");
Please login to merge, or discard this patch.
src/Resources/BaseResource.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         return static::handlesProfile(Registry::getResourceValidationProfile($descriptor));
38 38
     }
39 39
 
40
-    public function read($readOptions=null)
40
+    public function read($readOptions = null)
41 41
     {
42 42
         $limit = ($readOptions && isset($readOptions["limit"])) ? $readOptions["limit"] : null;
43 43
         $rows = [];
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@  discard block
 block discarded – undo
48 48
                     $rows[] = $row;
49 49
                     if ($limit !== null) {
50 50
                         $limit--;
51
-                        if ($limit < 0) break;
51
+                        if ($limit < 0) {
52
+                            break;
53
+                        }
52 54
                     }
53 55
                 };
54 56
             } else {
@@ -56,11 +58,15 @@  discard block
 block discarded – undo
56 58
                     $rows[] = $row;
57 59
                     if ($limit !== null) {
58 60
                         $limit--;
59
-                        if ($limit < 0) break;
61
+                        if ($limit < 0) {
62
+                            break;
63
+                        }
60 64
                     }
61 65
                 }
62 66
             }
63
-            if ($limit !== null && $limit < 0) break;
67
+            if ($limit !== null && $limit < 0) {
68
+                break;
69
+            }
64 70
         }
65 71
         return $rows;
66 72
     }
Please login to merge, or discard this patch.