Upgrade to 3.6.1

This commit is contained in:
Bastian Allgeier
2021-12-07 12:39:37 +01:00
parent 9fc43ea22c
commit 70b8439c49
134 changed files with 19987 additions and 1100 deletions

View File

@@ -74,7 +74,7 @@ class Blueprint
$props = $this->preset($props);
// normalize the name
$props['name'] = $props['name'] ?? 'default';
$props['name'] ??= 'default';
// normalize and translate the title
$props['title'] = $this->i18n($props['title'] ?? ucfirst($props['name']));
@@ -337,7 +337,7 @@ class Blueprint
$normalize = function ($props) use ($name) {
// inject the filename as name if no name is set
$props['name'] = $props['name'] ?? $name;
$props['name'] ??= $name;
// normalize the title
$title = $props['title'] ?? ucfirst($props['name']);
@@ -567,9 +567,7 @@ class Blueprint
// set all options to false
if ($options === false) {
return array_map(function () {
return false;
}, $defaults);
return array_map(fn () => false, $defaults);
}
// extend options if possible
@@ -579,7 +577,7 @@ class Blueprint
$alias = $aliases[$key] ?? null;
if ($alias !== null) {
$options[$alias] = $options[$alias] ?? $value;
$options[$alias] ??= $value;
unset($options[$key]);
}
}
@@ -765,9 +763,10 @@ class Blueprint
*/
public function sections(): array
{
return array_map(function ($section) {
return $this->section($section['name']);
}, $this->sections);
return A::map(
$this->sections,
fn ($section) => $this->section($section['name'])
);
}
/**