Test Setup Failed
Pull Request — master (#79)
by
unknown
01:24
created
src/Traits/GenericSequence.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,8 +239,12 @@
 block discarded – undo
239 239
     {
240 240
         $n = count($this);
241 241
 
242
-        if ($n < 2) return 0;
243
-        if ($r < 0) return $n - (abs($r) % $n);
242
+        if ($n < 2) {
243
+            return 0;
244
+        }
245
+        if ($r < 0) {
246
+            return $n - (abs($r) % $n);
247
+        }
244 248
 
245 249
         return $r % $n;
246 250
     }
Please login to merge, or discard this patch.
src/Traits/Capacity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
     {
119 119
         $this->capacity = max(
120 120
             self::MIN_CAPACITY,
121
-            $this->capacity()  * $this->getDecayFactor()
121
+            $this->capacity() * $this->getDecayFactor()
122 122
         );
123 123
     }
124 124
 
Please login to merge, or discard this patch.
src/Map.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -642,15 +642,15 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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]);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -964,7 +964,8 @@
 block discarded – undo
964 964
  * @template-covariant TKey
965 965
  * @template-covariant TValue
966 966
  */
967
-final class PairRef {
967
+final class PairRef
968
+{
968 969
     /**
969 970
      * @var int
970 971
      */
Please login to merge, or discard this patch.