@@ -642,15 +642,15 @@ |
||
| 642 | 642 | */ |
| 643 | 643 | private function compactPairRefs() |
| 644 | 644 | { |
| 645 | - // Renumber indices from 0 ascending. |
|
| 646 | - $this->pairRefs = array_slice($this->pairRefs, 0); |
|
| 647 | - $this->nextPairIndex = count($this->pairRefs); |
|
| 645 | + // Renumber indices from 0 ascending. |
|
| 646 | + $this->pairRefs = array_slice($this->pairRefs, 0); |
|
| 647 | + $this->nextPairIndex = count($this->pairRefs); |
|
| 648 | 648 | |
| 649 | - $updateIndex = function(PairRef $pairRef, int $position): void { |
|
| 650 | - $pairRef->pairIndex = $position; |
|
| 651 | - }; |
|
| 649 | + $updateIndex = function(PairRef $pairRef, int $position): void { |
|
| 650 | + $pairRef->pairIndex = $position; |
|
| 651 | + }; |
|
| 652 | 652 | |
| 653 | - array_walk($this->pairRefs, $updateIndex); |
|
| 653 | + array_walk($this->pairRefs, $updateIndex); |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | private function lookupKey($key, &$hash = null) |
| 296 | 296 | { |
| 297 | 297 | $hash = $this->getHash($key); |
| 298 | - if (!array_key_exists($hash, $this->table)) { |
|
| 298 | + if ( ! array_key_exists($hash, $this->table)) { |
|
| 299 | 299 | return null; |
| 300 | 300 | } |
| 301 | 301 | |
@@ -503,11 +503,11 @@ discard block |
||
| 503 | 503 | $pairRef = new PairRef($pairIndex, $key, $value); |
| 504 | 504 | $this->pairRefs[$pairIndex] = $pairRef; |
| 505 | 505 | |
| 506 | - if (!array_key_exists($hash, $this->table)) { |
|
| 506 | + if ( ! array_key_exists($hash, $this->table)) { |
|
| 507 | 507 | $this->table[$hash] = $pairRef; |
| 508 | 508 | } else { |
| 509 | - $hashMatch =& $this->table[$hash]; |
|
| 510 | - if (!is_array($hashMatch)) { |
|
| 509 | + $hashMatch = & $this->table[$hash]; |
|
| 510 | + if ( ! is_array($hashMatch)) { |
|
| 511 | 511 | $this->table[$hash] = [$hashMatch, $pairRef]; |
| 512 | 512 | } else { |
| 513 | 513 | $hashMatch[] = $pairRef; |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | // Remove from lookup table. |
| 581 | 581 | |
| 582 | - $hashMatch =& $this->table[$hash]; |
|
| 582 | + $hashMatch = & $this->table[$hash]; |
|
| 583 | 583 | |
| 584 | 584 | if ($hashMatch instanceof PairRef) { |
| 585 | 585 | unset($this->table[$hash]); |