Skip to content
Extraits de code Groupes Projets
Valider 1af04dbc rédigé par marcimat's avatar marcimat
Parcourir les fichiers

chore: Rector up to PHP 8.0 sur ecrire/iterateur

parent c278efd6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -167,7 +167,7 @@ function inc_csv_to_array_dist($data) { ...@@ -167,7 +167,7 @@ function inc_csv_to_array_dist($data) {
if (trim($v) == '') { if (trim($v) == '') {
$v = 'col' . $i; $v = 'col' . $i;
} // reperer des eventuelles cases vides } // reperer des eventuelles cases vides
if (is_numeric($v) and $v < 0) { if (is_numeric($v) && $v < 0) {
$v = '__' . $v; $v = '__' . $v;
} // ne pas risquer d'ecraser une cle numerique } // ne pas risquer d'ecraser une cle numerique
if (is_numeric($v)) { if (is_numeric($v)) {
...@@ -273,7 +273,7 @@ function inc_ls_to_array_dist($data) { ...@@ -273,7 +273,7 @@ function inc_ls_to_array_dist($data) {
$a = $glob_to_array($data); $a = $glob_to_array($data);
foreach ($a as &$v) { foreach ($a as &$v) {
$b = (array)@stat($v); $b = (array)@stat($v);
foreach ($b as $k => $ignore) { foreach (array_keys($b) as $k) {
if (is_numeric($k)) { if (is_numeric($k)) {
unset($b[$k]); unset($b[$k]);
} }
...@@ -306,13 +306,9 @@ function XMLObjectToArray($object) { ...@@ -306,13 +306,9 @@ function XMLObjectToArray($object) {
$xml_array[$key][$k] = $v; $xml_array[$key][$k] = $v;
} }
} }
if ($object->hasChildren()) { $xml_array[$key][] = $object->hasChildren()
$xml_array[$key][] = XMLObjectToArray( ? XMLObjectToArray($object->current())
$object->current() : (string) $object->current();
);
} else {
$xml_array[$key][] = strval($object->current());
}
} }
return $xml_array; return $xml_array;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter