@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | } catch (Throwable $exception) { |
| 747 | 747 | $module_name = basename(dirname($filename)); |
| 748 | 748 | $message = 'Fatal error in module: ' . $module_name; |
| 749 | - $message .= '<br>' . $exception; |
|
| 749 | + $message .= '<br>' . $exception; |
|
| 750 | 750 | FlashMessages::addMessage($message, 'danger'); |
| 751 | 751 | } |
| 752 | 752 | |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | public function findByName(string $module_name, bool $include_disabled = false): ?ModuleInterface |
| 875 | 875 | { |
| 876 | 876 | return $this->all($include_disabled) |
| 877 | - ->first(static function (ModuleInterface $module) use ($module_name): bool { |
|
| 877 | + ->first(static function (ModuleInterface $module) use ($module_name) : bool { |
|
| 878 | 878 | return $module->name() === $module_name; |
| 879 | 879 | }); |
| 880 | 880 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | try { |
| 110 | 110 | $results = json_decode($body, false, JSON_THROW_ON_ERROR); |
| 111 | 111 | |
| 112 | - $results = array_map(fn () => '', $results); |
|
| 112 | + $results = array_map(fn() => '', $results); |
|
| 113 | 113 | |
| 114 | 114 | return []; |
| 115 | 115 | } catch (JsonException $ex) { |
@@ -212,14 +212,14 @@ |
||
| 212 | 212 | default: |
| 213 | 213 | $alt_link = I18N::translate('Show place hierarchy'); |
| 214 | 214 | $alt_url = $this->listUrl($tree, ['action2' => 'hierarchy', 'place_id' => $place_id]); |
| 215 | - $content .= view('modules/place-hierarchy/list', ['columns' => $this->getList($tree)]); |
|
| 215 | + $content .= view('modules/place-hierarchy/list', ['columns' => $this->getList($tree)]); |
|
| 216 | 216 | break; |
| 217 | 217 | case 'hierarchy': |
| 218 | 218 | case 'hierarchy-e': |
| 219 | 219 | $alt_link = I18N::translate('Show all places in a list'); |
| 220 | 220 | $alt_url = $this->listUrl($tree, ['action2' => 'list', 'place_id' => 0]); |
| 221 | 221 | $data = $this->getHierarchy($place); |
| 222 | - $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 222 | + $content .= (null === $data || $showmap) ? '' : view('place-hierarchy', $data); |
|
| 223 | 223 | if (null === $data || $action2 === 'hierarchy-e') { |
| 224 | 224 | $content .= view('modules/place-hierarchy/events', [ |
| 225 | 225 | 'indilist' => $this->search_service->searchIndividualsInPlace($place), |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | } catch (RequestException $ex) { |
| 67 | 67 | // Service down? Quota exceeded? |
| 68 | 68 | // Don't try for another hour. |
| 69 | - $cache->remember($key, fn () => [], 3600); |
|
| 69 | + $cache->remember($key, fn() => [], 3600); |
|
| 70 | 70 | |
| 71 | 71 | return []; |
| 72 | 72 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | if ($record instanceof Individual) { |
| 102 | 102 | $facts = $record->facts(static::INDIVIDUAL_EVENTS, true) |
| 103 | - ->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
| 103 | + ->merge($record->spouseFamilies()->map(fn(Family $family): Collection => $family->facts(static::FAMILY_EVENTS, true))); |
|
| 104 | 104 | } elseif ($record instanceof Family) { |
| 105 | 105 | $facts = $record->facts(static::FAMILY_EVENTS, true); |
| 106 | 106 | } else { |
@@ -110,11 +110,11 @@ discard block |
||
| 110 | 110 | // iCalendar only supports exact Gregorian dates. |
| 111 | 111 | $facts = $facts |
| 112 | 112 | ->flatten() |
| 113 | - ->filter(fn (Fact $fact): bool => $fact->date()->isOK()) |
|
| 114 | - ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '') |
|
| 115 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
| 116 | - ->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
| 117 | - ->mapWithKeys(fn (Fact $fact): array => [ |
|
| 113 | + ->filter(fn(Fact $fact): bool => $fact->date()->isOK()) |
|
| 114 | + ->filter(fn(Fact $fact): bool => $fact->date()->qual1 === '') |
|
| 115 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) |
|
| 116 | + ->filter(fn(Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJulianDay()) |
|
| 117 | + ->mapWithKeys(fn(Fact $fact): array => [ |
|
| 118 | 118 | route(static::class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact->id()]) => |
| 119 | 119 | $fact->label() . ' — ' . $fact->date()->display(false, null, false), |
| 120 | 120 | ]); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $record = Auth::checkRecordAccess($record); |
| 150 | 150 | |
| 151 | 151 | $fact = $record->facts() |
| 152 | - ->filter(fn (Fact $fact): bool => $fact->id() === $fact_id) |
|
| 152 | + ->filter(fn(Fact $fact): bool => $fact->id() === $fact_id) |
|
| 153 | 153 | ->first(); |
| 154 | 154 | |
| 155 | 155 | if ($fact instanceof Fact) { |