Upgrade to 3.6.2

This commit is contained in:
Bastian Allgeier
2022-02-01 11:42:39 +01:00
parent f62d1a39ca
commit 848ea36dcf
108 changed files with 2887 additions and 2622 deletions

View File

@@ -482,11 +482,14 @@ class Dir
* Returns a nicely formatted size of all the contents of the folder
*
* @param string $dir The path of the directory
* @param string|null|false $locale Locale for number formatting,
* `null` for the current locale,
* `false` to disable number formatting
* @return mixed
*/
public static function niceSize(string $dir)
public static function niceSize(string $dir, $locale = null)
{
return F::niceSize(static::size($dir));
return F::niceSize(static::size($dir), $locale);
}
/**
@@ -513,9 +516,7 @@ class Dir
// add absolute paths
if ($absolute === true) {
$result = array_map(function ($item) use ($dir) {
return $dir . '/' . $item;
}, $result);
$result = array_map(fn ($item) => $dir . '/' . $item, $result);
}
return $result;