FIX Handling more state possible values in switch case
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dd3361682f
commit
fc0fb25f60
|
|
@ -138,19 +138,17 @@ function getAcfStateNameFromEnglish($localisation)
|
||||||
|
|
||||||
function getGenericStateNameFromAcfStateName($state)
|
function getGenericStateNameFromAcfStateName($state)
|
||||||
{
|
{
|
||||||
if ($state === 'Bruxelles') {
|
switch ($state) {
|
||||||
return 'brussels';
|
case 'Bruxelles':
|
||||||
}
|
return 'brussels';
|
||||||
|
case 'Région flamande':
|
||||||
if ($state === 'Vlaams Gewest') {
|
case 'Vlaams Gewest':
|
||||||
return 'flanders';
|
return 'flanders';
|
||||||
}
|
case 'Région Wallonne':
|
||||||
|
return 'wallonia';
|
||||||
if ($state === 'Région Wallonne') {
|
case 'all':
|
||||||
return 'wallonia';
|
default:
|
||||||
}
|
return 'all';
|
||||||
if ($state === 'all') {
|
|
||||||
return 'all';
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -246,7 +244,7 @@ function getRelativeTimeFromTimestamp($timestamp)
|
||||||
function format_phone_number($phoneNumber)
|
function format_phone_number($phoneNumber)
|
||||||
{
|
{
|
||||||
// Nettoyage du numéro : retirer espaces, tirets, points, etc.
|
// Nettoyage du numéro : retirer espaces, tirets, points, etc.
|
||||||
|
if (!$phoneNumber) return;
|
||||||
|
|
||||||
$cleanedNumber = preg_replace('/\D+/', '', $phoneNumber);
|
$cleanedNumber = preg_replace('/\D+/', '', $phoneNumber);
|
||||||
$phoneType = detectBelgianPhoneType($cleanedNumber);
|
$phoneType = detectBelgianPhoneType($cleanedNumber);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user