Completed
Pull Request — master (#38)
by
unknown
08:33
created
src/Factory.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -313,9 +313,9 @@
 block discarded – undo
313 313
                 }
314 314
             }
315 315
             if(json_last_error()){
316
-				throw new Exceptions\DatapackageInvalidSourceException(
317
-					json_last_error_msg().' when loading source: '.json_encode($source)
318
-				);
316
+                throw new Exceptions\DatapackageInvalidSourceException(
317
+                    json_last_error_msg().' when loading source: '.json_encode($source)
318
+                );
319 319
             }
320 320
         } else {
321 321
             throw new Exceptions\DatapackageInvalidSourceException(
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                     }
313 313
                 }
314 314
             }
315
-            if(json_last_error()){
315
+            if (json_last_error()) {
316 316
 				throw new Exceptions\DatapackageInvalidSourceException(
317 317
 					json_last_error_msg().' when loading source: '.json_encode($source)
318 318
 				);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         unlink($tempfile);
343 343
         $tempfile .= '.zip';
344 344
         stream_copy_to_stream(fopen($source, 'r'), fopen($tempfile, 'w'));
345
-        register_shutdown_function(function () use ($tempfile) {unlink($tempfile); });
345
+        register_shutdown_function(function() use ($tempfile) {unlink($tempfile); });
346 346
 
347 347
         return self::loadFileZipSource($tempfile);
348 348
     }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $tempdir = tempnam(sys_get_temp_dir(), 'datapackage-php');
354 354
         unlink($tempdir);
355 355
         mkdir($tempdir);
356
-        register_shutdown_function(function () use ($tempdir) {Utils::removeDir($tempdir); });
356
+        register_shutdown_function(function() use ($tempdir) {Utils::removeDir($tempdir); });
357 357
         $zippy->open($source)->extract($tempdir);
358 358
         if (!file_exists($tempdir.'/datapackage.json')) {
359 359
             throw new Exceptions\DatapackageInvalidSourceException('zip file must contain a datappackage.json file');
Please login to merge, or discard this patch.