Completed
Push — master ( 9b95c3...b81b9c )
by Raffael
04:43
created
src/StreamIterator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * and composes that instead, to ensure we have access to the various
51 51
      * iterator capabilities.
52 52
      */
53
-    public function __construct(Traversable $iterator, Closure $stringify = null, Closure $exception_handler=null)
53
+    public function __construct(Traversable $iterator, Closure $stringify = null, Closure $exception_handler = null)
54 54
     {
55 55
         if ($iterator instanceof IteratorAggregate) {
56 56
             $iterator = $iterator->getIterator();
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
     public function __toString()
67 67
     {
68 68
        try {
69
-            if($this->position !== 0) {
69
+            if ($this->position !== 0) {
70 70
                 $this->iterator->rewind();
71 71
             }
72 72
 
73 73
             return $this->getContents();
74
-        } catch(\Throwable $e) {
75
-            if($this->exception_handler !== null) {
74
+        } catch (\Throwable $e) {
75
+            if ($this->exception_handler !== null) {
76 76
                 return ''.$this->exception_handler->call($this, $e);
77 77
             }
78 78
 
@@ -279,6 +279,6 @@  discard block
 block discarded – undo
279 279
      */
280 280
     public function getMetadata($key = null)
281 281
     {
282
-        return ($key === null) ? [] : null;
282
+        return ($key === null) ? [ ] : null;
283 283
     }
284 284
 }
Please login to merge, or discard this patch.