diff --git a/composer.json b/composer.json index 70b33ea..62f3f79 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "maglnet/composer-require-checker": "^4.7", "phpunit/phpunit": "^10.5", "roave/infection-static-analysis-plugin": "^1.34", + "symplify/easy-coding-standard": "^12.1", "vimeo/psalm": "^5.20" }, "autoload": { diff --git a/src/Password.php b/src/Password.php index 50412d3..6ad1b89 100644 --- a/src/Password.php +++ b/src/Password.php @@ -22,9 +22,9 @@ final class Password * Generates user-friendly random password containing at least one lower case letter, one uppercase letter and one * digit. The remaining characters in the password are chosen at random from those three sets * - * @param int $length + * @param int $length The length of the password to generate. * - * @return string + * @return string The generated password. */ public static function generate(int $length): string { @@ -35,7 +35,7 @@ public static function generate(int $length): string $password = implode( '', array_map( - static fn (int $i) => $chars[random_int($i, $chars_length - $i)], + static fn(int $i) => $chars[random_int($i, $chars_length - $i)], range(1, $length), ), );