@@ -62,7 +62,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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() |
@@ -66,7 +66,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -344,11 +344,11 @@ |
||
| 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) { |