@@ -149,7 +149,7 @@ |
||
149 | 149 | */ |
150 | 150 | public function order(): int |
151 | 151 | { |
152 | - return ($this->hasSource() ? 1 : 0) * (1 + ($this->hasSupportingDocument() ? 1 : 0)); |
|
152 | + return ($this->hasSource() ? 1 : 0) * (1 + ($this->hasSupportingDocument() ? 1 : 0)); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -228,7 +228,7 @@ |
||
228 | 228 | public function order(): int |
229 | 229 | { |
230 | 230 | return ($this->factHasDate() ? 1 : 0) * ($this->hasSource() ? 1 : -1) * |
231 | - ( 1 + ($this->factHasPreciseDate() ? 1 : 0) * (1 + |
|
231 | + (1 + ($this->factHasPreciseDate() ? 1 : 0) * (1 + |
|
232 | 232 | 0b010 * ($this->sourceMatchesFactDate() ? 1 : 0) + |
233 | 233 | 0b100 * ($this->hasSupportingDocument() ? 1 : 0) |
234 | 234 | ) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function headContent(): string |
77 | 77 | { |
78 | - return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">'; |
|
78 | + return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">'; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function bodyContent(): string |
86 | 86 | { |
87 | - return '<script src="' . $this->assetUrl('js/issourced.min.js') . '"></script>'; |
|
87 | + return '<script src="'.$this->assetUrl('js/issourced.min.js').'"></script>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -106,14 +106,14 @@ discard block |
||
106 | 106 | $source_status_service = app(SourceStatusService::class); |
107 | 107 | |
108 | 108 | $spouse_families_status = $individual->spouseFamilies()->map( |
109 | - function (Family $sfamily) use ($source_status_service): array { |
|
110 | - return [ $sfamily, $source_status_service->sourceStatusForMarriage($sfamily)]; |
|
109 | + function(Family $sfamily) use ($source_status_service): array { |
|
110 | + return [$sfamily, $source_status_service->sourceStatusForMarriage($sfamily)]; |
|
111 | 111 | } |
112 | - )->filter(function (array $item): bool { |
|
112 | + )->filter(function(array $item): bool { |
|
113 | 113 | return $item[1]->isSet(); |
114 | 114 | }); |
115 | 115 | |
116 | - return view($this->name() . '::sidebar/content', [ |
|
116 | + return view($this->name().'::sidebar/content', [ |
|
117 | 117 | 'module_name' => $this->name(), |
118 | 118 | 'individual' => $individual, |
119 | 119 | 'source_status_individual' => $source_status_service->sourceStatusForRecord($individual), |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | public function listSubscribedHooks(): array |
131 | 131 | { |
132 | 132 | return [ |
133 | - app()->makeWith(IsSourcedStatusHook::class, [ 'module' => $this ]), |
|
134 | - app()->makeWith(IsSourcedStatusColumnsHook::class, [ 'module' => $this ]) |
|
133 | + app()->makeWith(IsSourcedStatusHook::class, ['module' => $this]), |
|
134 | + app()->makeWith(IsSourcedStatusColumnsHook::class, ['module' => $this]) |
|
135 | 135 | ]; |
136 | 136 | } |
137 | 137 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | // How to update the database schema for this module |
56 | 56 | private const SCHEMA_TARGET_VERSION = 2; |
57 | 57 | private const SCHEMA_SETTING_NAME = 'MAJ_HOOKS_SCHEMA_VERSION'; |
58 | - private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema'; |
|
58 | + private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * {@inheritDoc} |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function loadRoutes(Map $router): void |
98 | 98 | { |
99 | - $router->attach('', '', static function (Map $router): void { |
|
99 | + $router->attach('', '', static function(Map $router): void { |
|
100 | 100 | |
101 | - $router->attach('', '/module-maj/hooks', static function (Map $router): void { |
|
101 | + $router->attach('', '/module-maj/hooks', static function(Map $router): void { |
|
102 | 102 | |
103 | - $router->attach('', '/config/admin', static function (Map $router): void { |
|
103 | + $router->attach('', '/config/admin', static function(Map $router): void { |
|
104 | 104 | |
105 | 105 | $router->get(AdminConfigPage::class, '', AdminConfigPage::class); |
106 | 106 | $router->get(ModulesHooksPage::class, '/{hook_name}', ModulesHooksPage::class); |
@@ -77,9 +77,9 @@ |
||
77 | 77 | */ |
78 | 78 | protected function updateHookOrder(HookCollectorInterface $hook_collector, ServerRequestInterface $request): void |
79 | 79 | { |
80 | - $params = (array) $request->getParsedBody(); |
|
80 | + $params = (array)$request->getParsedBody(); |
|
81 | 81 | |
82 | - $order = (array) ($params['order'] ?? []); |
|
82 | + $order = (array)($params['order'] ?? []); |
|
83 | 83 | $order = array_flip($order); |
84 | 84 | |
85 | 85 | foreach ($hook_collector->hooks() as $hook) { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | throw new HttpNotFoundException(I18N::translate('The attached module could not be found.')); |
59 | 59 | } |
60 | 60 | |
61 | - return $this->viewResponse($this->module->name() . '::admin/config', [ |
|
61 | + return $this->viewResponse($this->module->name().'::admin/config', [ |
|
62 | 62 | 'title' => $this->module->title(), |
63 | 63 | 'hook_interfaces_list' => $this->hook_service->all(true) |
64 | 64 | ]); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | DB::schema()->drop('maj_hooks'); |
35 | 35 | } |
36 | 36 | |
37 | - DB::schema()->create('maj_hook_order', static function (Blueprint $table): void { |
|
37 | + DB::schema()->create('maj_hook_order', static function(Blueprint $table): void { |
|
38 | 38 | $table->string('majho_module_name', 32); |
39 | 39 | $table->string('majho_hook_name', 64); |
40 | 40 | $table->integer('majho_hook_order')->nullable(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function all(bool $include_disabled = false): Collection |
76 | 76 | { |
77 | - return Registry::cache()->array()->remember('all-hooks', function () use ($include_disabled): Collection { |
|
77 | + return Registry::cache()->array()->remember('all-hooks', function() use ($include_disabled): Collection { |
|
78 | 78 | $hooks_info = DB::table('maj_hook_order') |
79 | 79 | ->get() |
80 | 80 | ->groupBy(['majho_hook_name', 'majho_module_name']); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ) as $hook_instance |
105 | 105 | ) { |
106 | 106 | $hook_module_info = $hook_info->get($hook_instance->module()->name(), collect())->first(); |
107 | - $hook_order = $hook_module_info instanceof stdClass ? (int) $hook_module_info->majho_hook_order : 0; |
|
107 | + $hook_order = $hook_module_info instanceof stdClass ? (int)$hook_module_info->majho_hook_order : 0; |
|
108 | 108 | $hook_collector->register($hook_instance, $hook_order); |
109 | 109 | } |
110 | 110 | } |
@@ -57,10 +57,9 @@ |
||
57 | 57 | return ''; |
58 | 58 | } |
59 | 59 | |
60 | - $titles = $this->individualTitles($individual, '/(.*?) ((' . $title_separator . ')(.*))/i'); |
|
60 | + $titles = $this->individualTitles($individual, '/(.*?) (('.$title_separator.')(.*))/i'); |
|
61 | 61 | |
62 | - return count($titles) === 0 ? '' : |
|
63 | - view($this->module()->name() . '::components/card-titles', [ 'titles' => $titles ]); |
|
62 | + return count($titles) === 0 ? '' : view($this->module()->name().'::components/card-titles', ['titles' => $titles]); |
|
64 | 63 | } |
65 | 64 | |
66 | 65 | /** |