Passed
Push — develop ( 83b649...63947e )
by Johnny
02:08
created
src/Cortex/ContentLoader/ContentStream.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function stream_read(int $count): string
78 78
     {
79
-        $p =& $this->position;
79
+        $p = & $this->position;
80 80
         $ret = substr($this->content, $p, $count);
81 81
         $p += strlen($ret);
82 82
         return $ret;
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function stream_write(string $data): int
93 93
     {
94
-        $v =& $this->content;
94
+        $v = & $this->content;
95 95
         $l = strlen($data);
96
-        $p =& $this->position;
97
-        $v = substr($v, 0, $p) . $data . substr($v, $p += $l);
96
+        $p = & $this->position;
97
+        $v = substr($v, 0, $p).$data.substr($v, $p += $l);
98 98
         return $l;
99 99
     }
100 100
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     public function stream_seek(int $offset, int $whence = SEEK_SET): bool
133 133
     {
134 134
         $l = strlen($this->content);
135
-        $p =& $this->position;
135
+        $p = & $this->position;
136 136
         switch ($whence) {
137 137
             case SEEK_SET:
138 138
                 $newPos = $offset;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,9 @@
 block discarded – undo
147 147
                 return false;
148 148
         }
149 149
         $ret = ($newPos >= 0 && $newPos <= $l);
150
-        if ($ret) $p = $newPos;
150
+        if ($ret) {
151
+            $p = $newPos;
152
+        }
151 153
         return $ret;
152 154
     }
153 155
 }
Please login to merge, or discard this patch.