Fix warning

This commit is contained in:
Laurent Destailleur 2020-12-01 15:50:59 +01:00
parent c215764627
commit 3632a7a02a

View File

@ -3115,10 +3115,10 @@ class Societe extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Returns if a profid sould be verified * Returns if a profid sould be verified to be unique
* *
* @param int $idprof 1,2,3,4,5,6 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm,5=idprof5,6=idprof6) * @param int $idprof 1,2,3,4,5,6 (Example: 1=siren, 2=siret, 3=naf, 4=rcs/rm, 5=eori, 6=idprof6)
* @return boolean true , false * @return boolean true if the ID must be unique
*/ */
public function id_prof_verifiable($idprof) public function id_prof_verifiable($idprof)
{ {
@ -3128,22 +3128,22 @@ class Societe extends CommonObject
switch ($idprof) switch ($idprof)
{ {
case 1: case 1:
$ret = (!$conf->global->SOCIETE_IDPROF1_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF1_UNIQUE) ? false : true);
break; break;
case 2: case 2:
$ret = (!$conf->global->SOCIETE_IDPROF2_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF2_UNIQUE) ? false : true);
break; break;
case 3: case 3:
$ret = (!$conf->global->SOCIETE_IDPROF3_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF3_UNIQUE) ? false : true);
break; break;
case 4: case 4:
$ret = (!$conf->global->SOCIETE_IDPROF4_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF4_UNIQUE) ? false : true);
break; break;
case 5: case 5:
$ret = (!$conf->global->SOCIETE_IDPROF5_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF5_UNIQUE) ? false : true);
break; break;
case 6: case 6:
$ret = (!$conf->global->SOCIETE_IDPROF6_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF6_UNIQUE) ? false : true);
break; break;
default: default:
$ret = false; $ret = false;