exists()) { $identifiant = $base.$suffixe; $suffixe++; } return $identifiant; } public function genererCodeSecret(): string { $code = ''; for ($i = 0; $i < 6; $i++) { $code .= self::ALPHABET_CODE[random_int(0, strlen(self::ALPHABET_CODE) - 1)]; } return $code; } }