Upgrade to 3.6.2
This commit is contained in:
@@ -306,9 +306,11 @@ class File
|
||||
|
||||
// determine if any pattern matches the MIME type;
|
||||
// once any pattern matches, `$carry` is `true` and the rest is skipped
|
||||
$matches = array_reduce($rules['mime'], function ($carry, $pattern) use ($mime) {
|
||||
return $carry || Mime::matches($mime, $pattern);
|
||||
}, false);
|
||||
$matches = array_reduce(
|
||||
$rules['mime'],
|
||||
fn ($carry, $pattern) => $carry || Mime::matches($mime, $pattern),
|
||||
false
|
||||
);
|
||||
|
||||
if ($matches !== true) {
|
||||
throw new Exception([
|
||||
@@ -416,11 +418,14 @@ class File
|
||||
* Returns the file size in a
|
||||
* human-readable format
|
||||
*
|
||||
* @param string|null|false $locale Locale for number formatting,
|
||||
* `null` for the current locale,
|
||||
* `false` to disable number formatting
|
||||
* @return string
|
||||
*/
|
||||
public function niceSize(): string
|
||||
public function niceSize($locale = null): string
|
||||
{
|
||||
return F::niceSize($this->root);
|
||||
return F::niceSize($this->root, $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user