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)
|
||||
{
|
||||
if ($state === 'Bruxelles') {
|
||||
return 'brussels';
|
||||
}
|
||||
|
||||
if ($state === 'Vlaams Gewest') {
|
||||
return 'flanders';
|
||||
}
|
||||
|
||||
if ($state === 'Région Wallonne') {
|
||||
return 'wallonia';
|
||||
}
|
||||
if ($state === 'all') {
|
||||
return 'all';
|
||||
switch ($state) {
|
||||
case 'Bruxelles':
|
||||
return 'brussels';
|
||||
case 'Région flamande':
|
||||
case 'Vlaams Gewest':
|
||||
return 'flanders';
|
||||
case 'Région Wallonne':
|
||||
return 'wallonia';
|
||||
case 'all':
|
||||
default:
|
||||
return 'all';
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -246,7 +244,7 @@ function getRelativeTimeFromTimestamp($timestamp)
|
|||
function format_phone_number($phoneNumber)
|
||||
{
|
||||
// Nettoyage du numéro : retirer espaces, tirets, points, etc.
|
||||
|
||||
if (!$phoneNumber) return;
|
||||
|
||||
$cleanedNumber = preg_replace('/\D+/', '', $phoneNumber);
|
||||
$phoneType = detectBelgianPhoneType($cleanedNumber);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user