mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 11:09:26 +00:00
Merge pull request #771 from zachborboa/master
Clean up: Reduce nesting
This commit is contained in:
+11
-13
@@ -90,20 +90,18 @@ class ArrayUtil
|
||||
} else {
|
||||
$return[$key] = $value;
|
||||
}
|
||||
} elseif ($value instanceof \CURLFile) {
|
||||
$return[$key] = $value;
|
||||
} elseif ($value instanceof \CURLStringFile) {
|
||||
$return[$key] = $value;
|
||||
} else {
|
||||
if ($value instanceof \CURLFile) {
|
||||
$return[$key] = $value;
|
||||
} elseif ($value instanceof \CURLStringFile) {
|
||||
$return[$key] = $value;
|
||||
} else {
|
||||
$return = array_merge(
|
||||
$return,
|
||||
self::arrayFlattenMultidim(
|
||||
$value,
|
||||
$prefix ? $prefix . '[' . $key . ']' : $key
|
||||
)
|
||||
);
|
||||
}
|
||||
$return = array_merge(
|
||||
$return,
|
||||
self::arrayFlattenMultidim(
|
||||
$value,
|
||||
$prefix ? $prefix . '[' . $key . ']' : $key
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user