@@ -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 | ); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | foreach ($branches as $branch) { |
| 69 | 69 | // When PHP 7.1 is no longer supported, change to using spl_object_id. |
| 70 | 70 | $branchHash = spl_object_hash($branch); |
| 71 | - $hash .= ';' . $branchHash; |
|
| 71 | + $hash .= ';'.$branchHash; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (!isset(self::$constructMemoization[$hash])) { |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | yield $this->root; |
| 275 | 275 | } else { |
| 276 | 276 | foreach ($branch as $string) { |
| 277 | - yield $this->root . $string; |
|
| 277 | + yield $this->root.$string; |
|
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | } |
@@ -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 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | if ($constraint->getMax() === null) { |
| 18 | 18 | return $translator->trans( |
| 19 | - 'The password must contain at least one symbol (%characters%).|' . |
|
| 19 | + 'The password must contain at least one symbol (%characters%).|'. |
|
| 20 | 20 | 'The password must contain at least %count% symbols (%characters%).', |
| 21 | 21 | [ |
| 22 | 22 | '%count%' => $constraint->getMin(), |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | if ($constraint->getMin() === 0) { |
| 36 | 36 | return $translator->trans( |
| 37 | - 'The password must contain at most one symbol (%characters%).|' . |
|
| 37 | + 'The password must contain at most one symbol (%characters%).|'. |
|
| 38 | 38 | 'The password must contain at most %count% symbols (%characters%).', |
| 39 | 39 | [ |
| 40 | 40 | '%count%' => $constraint->getMax(), |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | if ($constraint->getMin() === $constraint->getMax()) { |
| 47 | 47 | return $translator->trans( |
| 48 | - 'The password must contain exactly one symbol (%characters%).|' . |
|
| 48 | + 'The password must contain exactly one symbol (%characters%).|'. |
|
| 49 | 49 | 'The password must contain exactly %count% symbols (%characters%).', |
| 50 | 50 | [ |
| 51 | 51 | '%count%' => $constraint->getMin(), |