Skip to content

Commit 38f265f

Browse files
committed
fix: avoid character positioning to break starting from alpha feature
1 parent 1fa4ba3 commit 38f265f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PasswordGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public function generate(PasswordGeneratorConfig $generatorConfig): string {
8484

8585
shuffle($password);
8686

87+
$password = $this->avoidConsecutiveCharacters($password);
88+
8789
if($generatorConfig->getAlwaysStartWithCharacter() &&
8890
($lowerCount > 0 || $upperCount > 0)) {
8991
foreach($password as $index => $char) {
@@ -104,8 +106,6 @@ public function generate(PasswordGeneratorConfig $generatorConfig): string {
104106
}
105107
}
106108

107-
$password = $this->avoidConsecutiveCharacters($password);
108-
109109
return implode("", $password);
110110
}
111111

0 commit comments

Comments
 (0)