@@ -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( |