fix: phpstan level=6

This commit is contained in:
origami11@yandex.ru 2025-10-06 12:49:36 +03:00
parent acbf2c847d
commit 48269bd424
41 changed files with 324 additions and 347 deletions

View file

@ -3,7 +3,7 @@
namespace ctiso;
class Security {
static function generatePassword($length = 9, $strength = 0) {
static function generatePassword(int $length = 9, int $strength = 0): string {
$vowels = 'aeuy';
$consonants = 'bdghjmnpqrstvz';
if ($strength & 1) {
@ -18,7 +18,7 @@ class Security {
if ($strength & 8) {
$consonants .= '@#$%';
}
$password = '';
$alt = time() % 2;
for ($i = 0; $i < $length; $i++) {