Completed
Pull Request — master (#4)
by Fabian
36:38 queued 21:45
created
src/PhpMerge/internal/Hunk.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->start = $start;
64 64
         if ($end === null) {
65
-            $end= $start;
65
+            $end = $start;
66 66
         }
67 67
         $this->end = $end;
68 68
         if (!is_array($lines)) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     {
203 203
         return array_values(array_filter(
204 204
             $this->lines,
205
-            function (Line $line) {
205
+            function(Line $line) {
206 206
                 return $line->getType() == Line::REMOVED;
207 207
             }
208 208
         ));
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     {
218 218
         return array_values(array_filter(
219 219
             $this->lines,
220
-            function (Line $line) {
220
+            function(Line $line) {
221 221
                 return $line->getType() == Line::ADDED;
222 222
             }
223 223
         ));
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     public function getLinesContent()
232 232
     {
233 233
         return array_map(
234
-            function (Line $line) {
234
+            function(Line $line) {
235 235
                 return $line->getContent();
236 236
             },
237 237
             $this->getAddedLines()
Please login to merge, or discard this patch.
src/PhpMerge/PhpMerge.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $baseLines = Line::createArray(
68 68
             array_map(
69
-                function ($l) {
69
+                function($l) {
70 70
                     return [$l, 0];
71 71
                 },
72 72
                 self::splitStringByLines($base)
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $i = -1;
116 116
 
117 117
         // Loop over all indexes of the base and all hunks.
118
-        while ($i <  count($base) || $a->valid() || $b->valid()) {
118
+        while ($i < count($base) || $a->valid() || $b->valid()) {
119 119
             // Assure that $aa is the first hunk by swaping $a and $b
120 120
             if ($a->valid() && $b->valid() && $a->current()->getStart() > $b->current()->getStart()) {
121 121
                 self::swap($a, $b, $flipped);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 $a->next();
164 164
             } else {
165 165
                 // Not dealing with a change, so return the line from the base.
166
-                if ($i>=0) {
166
+                if ($i >= 0) {
167 167
                     $merged[] = $base[$i]->getContent();
168 168
                 }
169 169
             }
Please login to merge, or discard this patch.
src/PhpMerge/GitMerge.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -344,11 +344,11 @@
 block discarded – undo
344 344
         if (!$this->dir) {
345 345
             // Greate a temporary directory.
346 346
             $tempfile = tempnam(sys_get_temp_dir(), '');
347
-            mkdir($tempfile . '.git');
347
+            mkdir($tempfile.'.git');
348 348
             if (file_exists($tempfile)) {
349 349
                 unlink($tempfile);
350 350
             }
351
-            $this->dir = $tempfile . '.git';
351
+            $this->dir = $tempfile.'.git';
352 352
             $this->git = $this->wrapper->init($this->dir);
353 353
         }
354 354
         if ($this->git) {
Please login to merge, or discard this patch.