@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $this->maxDifferences = (int)(($length1 + $length2 + 1) / 2); |
|
| 58 | + $this->maxDifferences = (int) (($length1 + $length2 + 1) / 2); |
|
| 59 | 59 | |
| 60 | 60 | if ($length1 * $length2 > self::TOO_LONG) { |
| 61 | 61 | // Limit complexity to D^POW_LIMIT for long sequences. |
| 62 | - $this->maxDifferences = (int)\pow($this->maxDifferences, self::POW_LIMIT - 1.0); |
|
| 62 | + $this->maxDifferences = (int) \pow($this->maxDifferences, self::POW_LIMIT - 1.0); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $this->initializeLcs($length1); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $delta = $N - $M; |
| 170 | 170 | $isEven = ($delta & 1) === 1 ? false : true; |
| 171 | 171 | |
| 172 | - $limit = \min($this->maxDifferences, (int)(($N + $M + 1) / 2)); |
|
| 172 | + $limit = \min($this->maxDifferences, (int) (($N + $M + 1) / 2)); |
|
| 173 | 173 | |
| 174 | 174 | // Offset to make it odd/even. |
| 175 | 175 | // a 0 or 1 that we add to the start offset to make it odd/even |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | $maxProgress = array_fill( |
| 318 | 318 | 0, |
| 319 | - (int)(\max($forwardEndDiag - $forwardStartDiag, $backwardEndDiag - $backwardStartDiag) / 2 + 1), |
|
| 319 | + (int) (\max($forwardEndDiag - $forwardStartDiag, $backwardEndDiag - $backwardStartDiag) / 2 + 1), |
|
| 320 | 320 | [0, 0, 0]); |
| 321 | 321 | // The first entry is current, it is initialized with 0s. |
| 322 | 322 | $numProgress = 0; |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - return $maxProgress[(int)($numProgress / 2)]; |
|
| 376 | + return $maxProgress[(int) ($numProgress / 2)]; |
|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | /** |