| @@ -80,7 +80,7 @@ | ||
| 80 | 80 |      { | 
| 81 | 81 | $this->formerPasswords = array_merge($this->formerPasswords, $formerPasswords); | 
| 82 | 82 | |
| 83 | -        StableSort::usort($this->formerPasswords, static function (FormerPassword $a, FormerPassword $b): int { | |
| 83 | +        StableSort::usort($this->formerPasswords, static function(FormerPassword $a, FormerPassword $b): int { | |
| 84 | 84 | return $b->getDate() <=> $a->getDate(); | 
| 85 | 85 | }); | 
| 86 | 86 | } | 
| @@ -42,7 +42,7 @@ | ||
| 42 | 42 |      { | 
| 43 | 43 | $this->constraints[] = new DateIntervalConstraint($min, $max, $weight); | 
| 44 | 44 | |
| 45 | - StableSort::usort($this->constraints, static function ( | |
| 45 | + StableSort::usort($this->constraints, static function( | |
| 46 | 46 | DateIntervalConstraint $a, | 
| 47 | 47 | DateIntervalConstraint $b | 
| 48 | 48 |          ): int { | 
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 | $pspell = pspell_new($locale); | 
| 58 | 58 |          } catch (ErrorException $exception) { | 
| 59 | 59 | throw new RuntimeException( | 
| 60 | - 'An error occurred while loading the word list: ' . $exception->getMessage(), | |
| 60 | + 'An error occurred while loading the word list: '.$exception->getMessage(), | |
| 61 | 61 | /*code*/0, | 
| 62 | 62 | $exception | 
| 63 | 63 | ); | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | $check = pspell_check($this->pspell, $formattedWord); | 
| 82 | 82 |              } catch (ErrorException $exception) { | 
| 83 | 83 | throw new RuntimeException( | 
| 84 | - 'An error occurred while using the word list: ' . $exception->getMessage(), | |
| 84 | + 'An error occurred while using the word list: '.$exception->getMessage(), | |
| 85 | 85 | /*code*/0, | 
| 86 | 86 | $exception | 
| 87 | 87 | ); | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | private function applyInternal(CharTree $charTree, int $minLength, ?int $maxLength): CharTree | 
| 68 | 68 |      { | 
| 69 | 69 | // When PHP 7.1 is no longer supported, change to using spl_object_id. | 
| 70 | - $hash = spl_object_hash($charTree) . ';' . $minLength . ';' . $maxLength; | |
| 70 | + $hash = spl_object_hash($charTree).';'.$minLength.';'.$maxLength; | |
| 71 | 71 | |
| 72 | 72 |          if (!isset(self::$memoization[$hash])) { | 
| 73 | 73 | self::$memoization[$hash] = $this->format($charTree, $minLength, $maxLength); | 
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 | private function applyInternalStartingWithRoot(CharTree $charTree, int $minLength, ?int $maxLength): CharTree | 
| 144 | 144 |      { | 
| 145 | 145 | // When PHP 7.1 is no longer supported, change to using spl_object_id. | 
| 146 | - $hash = spl_object_hash($charTree) . ';' . $minLength . ';' . $maxLength; | |
| 146 | + $hash = spl_object_hash($charTree).';'.$minLength.';'.$maxLength; | |
| 147 | 147 | |
| 148 | 148 |          if (!isset(self::$startsWithMemoization[$hash])) { | 
| 149 | 149 | self::$startsWithMemoization[$hash] = $this->generateStartingWithRoot($charTree, $minLength, $maxLength); | 
| @@ -169,8 +169,8 @@ discard block | ||
| 169 | 169 | $rootLength = mb_strlen($root); | 
| 170 | 170 |          if ($rootLength <= $maxLength || $maxLength === null) { | 
| 171 | 171 | $branches = $charTree->getBranches(); | 
| 172 | - $branchMinLength = $minLength <= $rootLength ? 0 : $minLength - $rootLength; | |
| 173 | - $branchMaxLength = $maxLength === null ? null : $maxLength - $rootLength; | |
| 172 | + $branchMinLength = $minLength <= $rootLength ? 0 : $minLength-$rootLength; | |
| 173 | + $branchMaxLength = $maxLength === null ? null : $maxLength-$rootLength; | |
| 174 | 174 | |
| 175 | 175 | $substringBranches = []; | 
| 176 | 176 |              foreach ($branches as $branch) { | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | private function applyInternal(CharTree $charTree, int $length): CharTree | 
| 52 | 52 |      { | 
| 53 | 53 | // When PHP 7.1 is no longer supported, change to using spl_object_id. | 
| 54 | - $hash = spl_object_hash($charTree) . ';' . $length; | |
| 54 | + $hash = spl_object_hash($charTree).';'.$length; | |
| 55 | 55 | |
| 56 | 56 |          if (!isset(self::$memoization[$hash])) { | 
| 57 | 57 | self::$memoization[$hash] = $this->format($charTree, $length); | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | 76 | $rootLength = mb_strlen($root); | 
| 77 | - $branchLength = $length - $rootLength; | |
| 77 | + $branchLength = $length-$rootLength; | |
| 78 | 78 | |
| 79 | 79 |          if ($branchLength < 0) { | 
| 80 | 80 |              return CharTree::fromString(''); | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | private function applyInternal(CharTree $charTree, int $minLength, ?int $maxLength): CharTree | 
| 63 | 63 |      { | 
| 64 | 64 | // When PHP 7.1 is no longer supported, change to using spl_object_id. | 
| 65 | - $hash = spl_object_hash($charTree) . ';' . $minLength . ';' . $maxLength; | |
| 65 | + $hash = spl_object_hash($charTree).';'.$minLength.';'.$maxLength; | |
| 66 | 66 | |
| 67 | 67 |          if (!isset(self::$memoization[$hash])) { | 
| 68 | 68 | self::$memoization[$hash] = $this->format($charTree, $minLength, $maxLength); | 
| @@ -95,8 +95,8 @@ discard block | ||
| 95 | 95 | } | 
| 96 | 96 | |
| 97 | 97 | $rootLength = mb_strlen($root); | 
| 98 | - $branchMinLength = $minLength <= $rootLength ? 0 : $minLength - $rootLength; | |
| 99 | - $branchMaxLength = $maxLength === null ? null : $maxLength - $rootLength; | |
| 98 | + $branchMinLength = $minLength <= $rootLength ? 0 : $minLength-$rootLength; | |
| 99 | + $branchMaxLength = $maxLength === null ? null : $maxLength-$rootLength; | |
| 100 | 100 | |
| 101 | 101 | $filteredBranches = []; | 
| 102 | 102 |          foreach ($branches as $branch) { | 
| @@ -42,7 +42,7 @@ | ||
| 42 | 42 | $hash = password_hash($password, $this->algorithm, $this->options); | 
| 43 | 43 |          } catch (ErrorException $exception) { | 
| 44 | 44 | throw new RuntimeException( | 
| 45 | - 'An error occurred while hashing the password: ' . $exception->getMessage(), | |
| 45 | + 'An error occurred while hashing the password: '.$exception->getMessage(), | |
| 46 | 46 | /*code*/0, | 
| 47 | 47 | $exception | 
| 48 | 48 | ); | 
| @@ -78,7 +78,7 @@ | ||
| 78 | 78 | return false; | 
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | -        if ($this->count !== null && $this->first + $this->count <= $pos) { | |
| 81 | +        if ($this->count !== null && $this->first+$this->count <= $pos) { | |
| 82 | 82 | return false; | 
| 83 | 83 | } | 
| 84 | 84 | |
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | } | 
| 27 | 27 | |
| 28 | 28 | // When PHP 7.1 is no longer supported, change to using spl_object_id. | 
| 29 | - $hash = spl_object_hash($charTree) . ';' . $position; | |
| 29 | + $hash = spl_object_hash($charTree).';'.$position; | |
| 30 | 30 | |
| 31 | 31 |          if (!isset(self::$memoization[$hash])) { | 
| 32 | 32 | self::$memoization[$hash] = $this->cutInternal($charTree, $position); | 
| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | 51 | $rootLength = mb_strlen($root); | 
| 52 | - $branchPosition = $position - $rootLength; | |
| 52 | + $branchPosition = $position-$rootLength; | |
| 53 | 53 | |
| 54 | 54 |          if ($branchPosition < 0) { | 
| 55 | 55 | return [['', $charTree]]; | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | assert(is_string($branchRoot)); | 
| 66 | 66 | assert(is_object($branchTree)); | 
| 67 | 67 | |
| 68 | - $cutCharTrees[] = [$root . $branchRoot, $branchTree]; | |
| 68 | + $cutCharTrees[] = [$root.$branchRoot, $branchTree]; | |
| 69 | 69 | } | 
| 70 | 70 | } | 
| 71 | 71 | |