qual: phpstan

htdocs/core/modules/security/generate/modGeneratePassPerso.class.php	85	Property modGeneratePassPerso::$id (int) does not accept string.
htdocs/core/modules/security/generate/modGeneratePassPerso.class.php	105	Property modGeneratePassPerso::$length2 (int) does not accept string.
htdocs/core/modules/security/generate/modGeneratePassPerso.class.php	110	Property modGeneratePassPerso::$WithoutAmbi (int) does not accept string.
This commit is contained in:
thibdrev
2024-01-22 13:48:01 +01:00
committed by GitHub
parent 427eb21282
commit 1165ea9ab8

View File

@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/security/generate/modules_genpassw
class modGeneratePassPerso extends ModeleGenPassword
{
/**
* @var int ID
* @var string ID
*/
public $id;
@@ -42,7 +42,7 @@ class modGeneratePassPerso extends ModeleGenPassword
/**
* Minimum length (text visible by end user)
*
* @var string
* @var int
*/
public $length;
@@ -102,12 +102,12 @@ class modGeneratePassPerso extends ModeleGenPassword
$this->Ambi = array("1", "I", "l", "|", "O", "0");
$tabConf = explode(";", getDolGlobalString('USER_PASSWORD_PATTERN'));
$this->length2 = $tabConf[0];
$this->length2 = (int) $tabConf[0];
$this->NbMaj = $tabConf[1];
$this->NbNum = $tabConf[2];
$this->NbSpe = $tabConf[3];
$this->NbRepeat = $tabConf[4];
$this->WithoutAmbi = $tabConf[5];
$this->WithoutAmbi = (int) $tabConf[5];
}
/**