@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | public function boot(): void |
70 | 70 | { |
71 | 71 | $this->traitBoot(); |
72 | - View::registerCustomView('::modules/privacy-policy/page', $this->name() . '::privacy-policy'); |
|
72 | + View::registerCustomView('::modules/privacy-policy/page', $this->name().'::privacy-policy'); |
|
73 | 73 | |
74 | - if ((int) $this->getPreference('MAJ_USE_LEGACY_XREF') === 1) { |
|
74 | + if ((int)$this->getPreference('MAJ_USE_LEGACY_XREF') === 1) { |
|
75 | 75 | Registry::xrefFactory(new LegacyXrefFactory()); |
76 | 76 | } |
77 | 77 | } |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function loadRoutes(Map $router): void |
84 | 84 | { |
85 | - $router->attach('', '', static function (Map $router): void { |
|
85 | + $router->attach('', '', static function(Map $router): void { |
|
86 | 86 | |
87 | - $router->attach('', '/module-maj/misc', static function (Map $router): void { |
|
87 | + $router->attach('', '/module-maj/misc', static function(Map $router): void { |
|
88 | 88 | |
89 | - $router->attach('', '/config/admin', static function (Map $router): void { |
|
89 | + $router->attach('', '/config/admin', static function(Map $router): void { |
|
90 | 90 | |
91 | 91 | $router->get(AdminConfigPage::class, '', AdminConfigPage::class); |
92 | 92 | $router->post(AdminConfigAction::class, '', AdminConfigAction::class); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function listSubscribedHooks(): array |
121 | 121 | { |
122 | 122 | return [ |
123 | - app()->makeWith(TitlesCardHook::class, [ 'module' => $this ]) |
|
123 | + app()->makeWith(TitlesCardHook::class, ['module' => $this]) |
|
124 | 124 | ]; |
125 | 125 | } |
126 | 126 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return parent::generate($prefix, $suffix); |
55 | 55 | } |
56 | 56 | |
57 | - $setting_name = 'MAJ_MISC_XREF_NEXT_' . $prefix; |
|
57 | + $setting_name = 'MAJ_MISC_XREF_NEXT_'.$prefix; |
|
58 | 58 | // Lock the row, so that only one new XREF may be generated at a time. |
59 | 59 | DB::table('gedcom_setting') |
60 | 60 | ->where('gedcom_id', '=', $tree->id()) |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | |
65 | 65 | $increment = 1.0; |
66 | 66 | do { |
67 | - $num = (int) $tree->getPreference($setting_name) + (int) $increment; |
|
67 | + $num = (int)$tree->getPreference($setting_name) + (int)$increment; |
|
68 | 68 | |
69 | 69 | // This exponential increment allows us to scan over large blocks of |
70 | 70 | // existing data in a reasonable time. |
71 | 71 | $increment *= 1.01; |
72 | 72 | |
73 | - $xref = $prefix . $num . $suffix; |
|
73 | + $xref = $prefix.$num.$suffix; |
|
74 | 74 | |
75 | 75 | // Records may already exist with this sequence number. |
76 | 76 | $already_used = |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | DB::table('change')->where('gedcom_id', '=', $tree->id())->where('xref', '=', $xref)->exists(); |
83 | 83 | } while ($already_used); |
84 | 84 | |
85 | - $tree->setPreference($setting_name, (string) $num); |
|
85 | + $tree->setPreference($setting_name, (string)$num); |
|
86 | 86 | |
87 | 87 | return $xref; |
88 | 88 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ); |
62 | 62 | $this->module->setPreference( |
63 | 63 | 'MAJ_DISPLAY_CNIL', |
64 | - (string) Validator::parsedBody($request)->integer('MAJ_DISPLAY_CNIL', 0) |
|
64 | + (string)Validator::parsedBody($request)->integer('MAJ_DISPLAY_CNIL', 0) |
|
65 | 65 | ); |
66 | 66 | $this->module->setPreference( |
67 | 67 | 'MAJ_CNIL_REFERENCE', |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ); |
70 | 70 | $this->module->setPreference( |
71 | 71 | 'MAJ_USE_LEGACY_XREF', |
72 | - (string) Validator::parsedBody($request)->integer('MAJ_USE_LEGACY_XREF', 0) |
|
72 | + (string)Validator::parsedBody($request)->integer('MAJ_USE_LEGACY_XREF', 0) |
|
73 | 73 | ); |
74 | 74 | |
75 | 75 | FlashMessages::addMessage( |
@@ -65,7 +65,7 @@ |
||
65 | 65 | public function recordNameAppend(GedcomRecord $record, bool $use_long = false, string $size = ''): string |
66 | 66 | { |
67 | 67 | if ($use_long && $record instanceof Individual) { |
68 | - return view($this->module()->name() . '::hooks/name-append', [ |
|
68 | + return view($this->module()->name().'::hooks/name-append', [ |
|
69 | 69 | 'module_name' => $this->module()->name(), |
70 | 70 | 'source_status_service' => $this->source_status_service, |
71 | 71 | 'individual' => $record, |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | private function extractCitations(Fact $fact) |
49 | 49 | { |
50 | - $extract_regex = '/\n(2 SOUR @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9] .*)*)/'; |
|
50 | + $extract_regex = '/\n(2 SOUR @('.Gedcom::REGEX_XREF.')@(?:\n[3-9] .*)*)/'; |
|
51 | 51 | preg_match_all($extract_regex, $fact->gedcom(), $matches, PREG_SET_ORDER); |
52 | 52 | $citations = []; |
53 | 53 | foreach ($matches as $match) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | ->withProperty( |
157 | 157 | 'places', |
158 | 158 | $feature_data->places() |
159 | - ->map(fn(GeoAnalysisPlace $place): string => $place->place()->firstParts(1)->first()) |
|
159 | + ->map(fn(GeoAnalysisPlace $place) : string => $place->place()->firstParts(1)->first()) |
|
160 | 160 | ->sort(I18N::comparator()) |
161 | 161 | ->toArray() |
162 | 162 | ); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | ->each( |
171 | 171 | fn (MapFeatureAnalysisData $data) => |
172 | 172 | $data->places()->each( |
173 | - function (GeoAnalysisPlace $place) use ($result): void { |
|
173 | + function(GeoAnalysisPlace $place) use ($result): void { |
|
174 | 174 | $result->exclude($place); |
175 | 175 | } |
176 | 176 | ) |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $features_mapping = new Collection(); |
191 | 191 | |
192 | 192 | $byplaces = $result->knownPlaces(); |
193 | - $byplaces->each(function (GeoAnalysisResultItem $item) use ($features_mapping, $result): void { |
|
193 | + $byplaces->each(function(GeoAnalysisResultItem $item) use ($features_mapping, $result): void { |
|
194 | 194 | $id = $this->place_mapper->map($item->place()->place(), $this->config->mapMappingProperty()); |
195 | 195 | |
196 | 196 | if ($id !== null && mb_strlen($id) > 0) { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | }); |
205 | 205 | |
206 | - return [ $features_mapping, $result]; |
|
206 | + return [$features_mapping, $result]; |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |