@@ -162,14 +162,14 @@ |
||
| 162 | 162 | $M = $topL2 - $bottomL2 + 1; |
| 163 | 163 | |
| 164 | 164 | $delta = $N - $M; |
| 165 | - $isEven = ($delta & 1) == 1? false : true; |
|
| 165 | + $isEven = ($delta & 1) == 1 ? false : true; |
|
| 166 | 166 | |
| 167 | 167 | $limit = min($this->maxDifferences, intval(ceil(($N + $M + 1) / 2))); |
| 168 | 168 | |
| 169 | 169 | // Offset to make it odd/even. |
| 170 | 170 | // a 0 or 1 that we add to the start offset to make it odd/even |
| 171 | - $valueToAddForward = ($M & 1) == 1? 1 : 0; |
|
| 172 | - $valueToAddBackward = ($N & 1) == 1? 1 : 0; |
|
| 171 | + $valueToAddForward = ($M & 1) == 1 ? 1 : 0; |
|
| 172 | + $valueToAddBackward = ($N & 1) == 1 ? 1 : 0; |
|
| 173 | 173 | |
| 174 | 174 | $startForward = -$M; |
| 175 | 175 | $endForward = $N; |
@@ -253,8 +253,7 @@ discard block |
||
| 253 | 253 | if ($x <= 0) { |
| 254 | 254 | $startBackward = $k + 1; |
| 255 | 255 | $valueToAddBackward = 0; |
| 256 | - } |
|
| 257 | - elseif ($y <= 0 && $endBackward > $k - 1) { |
|
| 256 | + } elseif ($y <= 0 && $endBackward > $k - 1) { |
|
| 258 | 257 | $endBackward = $k - 1; |
| 259 | 258 | } |
| 260 | 259 | } |
@@ -324,8 +323,7 @@ discard block |
||
| 324 | 323 | $maxProgress[0][0] = $x; |
| 325 | 324 | $maxProgress[0][1] = $y; |
| 326 | 325 | $maxProgress[0][2] = $progress; |
| 327 | - } |
|
| 328 | - elseif ($progress == $maxProgress[0][2]) { |
|
| 326 | + } elseif ($progress == $maxProgress[0][2]) { |
|
| 329 | 327 | $numProgress++; |
| 330 | 328 | $maxProgress[$numProgress][0] = $x; |
| 331 | 329 | $maxProgress[$numProgress][1] = $y; |
@@ -353,8 +351,7 @@ discard block |
||
| 353 | 351 | $maxProgress[0][0] = $x; |
| 354 | 352 | $maxProgress[0][1] = $y; |
| 355 | 353 | $maxProgress[0][2] = $progress; |
| 356 | - } |
|
| 357 | - elseif ($progress == $maxProgress[0][2] && !$maxProgressForward) { |
|
| 354 | + } elseif ($progress == $maxProgress[0][2] && !$maxProgressForward) { |
|
| 358 | 355 | $numProgress++; |
| 359 | 356 | $maxProgress[$numProgress][0] = $x; |
| 360 | 357 | $maxProgress[$numProgress][1] = $y; |
@@ -282,12 +282,12 @@ |
||
| 282 | 282 | public function equals(RangeDifference $other): bool |
| 283 | 283 | { |
| 284 | 284 | return |
| 285 | - $this->kind === $other->getKind() && |
|
| 286 | - $this->leftStart === $other->getLeftStart() && |
|
| 287 | - $this->leftLength === $other->getLeftLength() && |
|
| 288 | - $this->rightStart === $other->getRightStart() && |
|
| 289 | - $this->rightLength === $other->getRightLength() && |
|
| 290 | - $this->ancestorStart === $other->getAncestorStart() && |
|
| 285 | + $this->kind === $other->getKind() && |
|
| 286 | + $this->leftStart === $other->getLeftStart() && |
|
| 287 | + $this->leftLength === $other->getLeftLength() && |
|
| 288 | + $this->rightStart === $other->getRightStart() && |
|
| 289 | + $this->rightLength === $other->getRightLength() && |
|
| 290 | + $this->ancestorStart === $other->getAncestorStart() && |
|
| 291 | 291 | $this->ancestorLength === $other->getAncestorLength(); |
| 292 | 292 | } |
| 293 | 293 | |