@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
5 | - * |
|
6 | - * @package MyArtJaub\Webtrees |
|
7 | - * @subpackage Hooks |
|
8 | - * @author Jonathan Jaubart <[email protected]> |
|
9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | - */ |
|
4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
5 | + * |
|
6 | + * @package MyArtJaub\Webtrees |
|
7 | + * @subpackage Hooks |
|
8 | + * @author Jonathan Jaubart <[email protected]> |
|
9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | declare(strict_types=1); |
14 | 14 | |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | */ |
20 | 20 | interface HookServiceInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * Select the hook collector to use for a specific hook interface |
|
24 | - * |
|
25 | - * @template THook of HookInterface |
|
26 | - * @param class-string<THook> $hook_interface |
|
27 | - * @return HookCollectorInterface|NULL |
|
28 | - */ |
|
29 | - public function use(string $hook_interface): ?HookCollectorInterface; |
|
22 | + /** |
|
23 | + * Select the hook collector to use for a specific hook interface |
|
24 | + * |
|
25 | + * @template THook of HookInterface |
|
26 | + * @param class-string<THook> $hook_interface |
|
27 | + * @return HookCollectorInterface|NULL |
|
28 | + */ |
|
29 | + public function use(string $hook_interface): ?HookCollectorInterface; |
|
30 | 30 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
5 | - * |
|
6 | - * @package MyArtJaub\Webtrees |
|
7 | - * @subpackage Hooks |
|
8 | - * @author Jonathan Jaubart <[email protected]> |
|
9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | - */ |
|
4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
5 | + * |
|
6 | + * @package MyArtJaub\Webtrees |
|
7 | + * @subpackage Hooks |
|
8 | + * @author Jonathan Jaubart <[email protected]> |
|
9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | declare(strict_types=1); |
14 | 14 | |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | */ |
20 | 20 | interface IndividualDatatablesExtenderInterface extends HookInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * Get the columns to be added to individuals datatables |
|
24 | - * |
|
25 | - * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
26 | - * @return array<string, array<string, array<string, mixed>>> |
|
27 | - */ |
|
28 | - public function individualColumns(iterable $records): array; |
|
22 | + /** |
|
23 | + * Get the columns to be added to individuals datatables |
|
24 | + * |
|
25 | + * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
26 | + * @return array<string, array<string, array<string, mixed>>> |
|
27 | + */ |
|
28 | + public function individualColumns(iterable $records): array; |
|
29 | 29 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | - * webtrees-lib: MyArtJaub library for webtrees |
|
5 | - * |
|
6 | - * @package MyArtJaub\Webtrees |
|
7 | - * @subpackage Hooks |
|
8 | - * @author Jonathan Jaubart <[email protected]> |
|
9 | - * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | - */ |
|
4 | + * webtrees-lib: MyArtJaub library for webtrees |
|
5 | + * |
|
6 | + * @package MyArtJaub\Webtrees |
|
7 | + * @subpackage Hooks |
|
8 | + * @author Jonathan Jaubart <[email protected]> |
|
9 | + * @copyright Copyright (c) 2011-2022, Jonathan Jaubart |
|
10 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | declare(strict_types=1); |
14 | 14 | |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | */ |
20 | 20 | interface SosaIndividualDatatablesExtenderInterface extends HookInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * Get the columns to be added to ancestors datatables |
|
24 | - * |
|
25 | - * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
26 | - * @return array<string, array<string, array<string, mixed>>> |
|
27 | - */ |
|
28 | - public function sosaIndividualColumns(iterable $records): array; |
|
22 | + /** |
|
23 | + * Get the columns to be added to ancestors datatables |
|
24 | + * |
|
25 | + * @param iterable<\Fisharebest\Webtrees\Individual> $records |
|
26 | + * @return array<string, array<string, array<string, mixed>>> |
|
27 | + */ |
|
28 | + public function sosaIndividualColumns(iterable $records): array; |
|
29 | 29 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | */ |
20 | 20 | interface ModuleGeoAnalysisProviderInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * List geographical analyses provided by the module as an array. |
|
24 | - * |
|
25 | - * @return string[] List of geographical analyses |
|
26 | - */ |
|
27 | - public function listGeoAnalyses(): array; |
|
22 | + /** |
|
23 | + * List geographical analyses provided by the module as an array. |
|
24 | + * |
|
25 | + * @return string[] List of geographical analyses |
|
26 | + */ |
|
27 | + public function listGeoAnalyses(): array; |
|
28 | 28 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | */ |
20 | 20 | interface ModuleMapDefinitionProviderInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * List map definitions provided by the module as an array. |
|
24 | - * |
|
25 | - * @return array<int, MapDefinitionInterface> List of map definitions |
|
26 | - */ |
|
27 | - public function listMapDefinition(): array; |
|
22 | + /** |
|
23 | + * List map definitions provided by the module as an array. |
|
24 | + * |
|
25 | + * @return array<int, MapDefinitionInterface> List of map definitions |
|
26 | + */ |
|
27 | + public function listMapDefinition(): array; |
|
28 | 28 | } |
@@ -22,20 +22,20 @@ |
||
22 | 22 | */ |
23 | 23 | interface ConfigurableTaskInterface |
24 | 24 | { |
25 | - /** |
|
26 | - * Returns the HTML code to display the specific task configuration. |
|
27 | - * |
|
28 | - * @param ServerRequestInterface $request |
|
29 | - * @return string HTML code |
|
30 | - */ |
|
31 | - public function configView(ServerRequestInterface $request): string; |
|
25 | + /** |
|
26 | + * Returns the HTML code to display the specific task configuration. |
|
27 | + * |
|
28 | + * @param ServerRequestInterface $request |
|
29 | + * @return string HTML code |
|
30 | + */ |
|
31 | + public function configView(ServerRequestInterface $request): string; |
|
32 | 32 | |
33 | - /** |
|
34 | - * Update the specific configuration of the task. |
|
35 | - * |
|
36 | - * @param ServerRequestInterface $request |
|
37 | - * @param TaskSchedule $task_schedule |
|
38 | - * @return bool Result of the update |
|
39 | - */ |
|
40 | - public function updateConfig(ServerRequestInterface $request, TaskSchedule $task_schedule): bool; |
|
33 | + /** |
|
34 | + * Update the specific configuration of the task. |
|
35 | + * |
|
36 | + * @param ServerRequestInterface $request |
|
37 | + * @param TaskSchedule $task_schedule |
|
38 | + * @return bool Result of the update |
|
39 | + */ |
|
40 | + public function updateConfig(ServerRequestInterface $request, TaskSchedule $task_schedule): bool; |
|
41 | 41 | } |
@@ -19,11 +19,11 @@ |
||
19 | 19 | */ |
20 | 20 | interface ModuleTasksProviderInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * List tasks provided by the module as an associative array. |
|
24 | - * They keys are used as task IDs for storage and reference. |
|
25 | - * |
|
26 | - * @return array<string, string> List of tasks |
|
27 | - */ |
|
28 | - public function listTasks(): array; |
|
22 | + /** |
|
23 | + * List tasks provided by the module as an associative array. |
|
24 | + * They keys are used as task IDs for storage and reference. |
|
25 | + * |
|
26 | + * @return array<string, string> List of tasks |
|
27 | + */ |
|
28 | + public function listTasks(): array; |
|
29 | 29 | } |
@@ -21,12 +21,12 @@ |
||
21 | 21 | */ |
22 | 22 | class Migration0 implements MigrationInterface |
23 | 23 | { |
24 | - /** |
|
25 | - * {@inheritDoc} |
|
26 | - * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade() |
|
27 | - */ |
|
28 | - public function upgrade(): void |
|
29 | - { |
|
30 | - // These migrations have been merged into migration 2. |
|
31 | - } |
|
24 | + /** |
|
25 | + * {@inheritDoc} |
|
26 | + * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade() |
|
27 | + */ |
|
28 | + public function upgrade(): void |
|
29 | + { |
|
30 | + // These migrations have been merged into migration 2. |
|
31 | + } |
|
32 | 32 | } |
@@ -23,41 +23,41 @@ |
||
23 | 23 | */ |
24 | 24 | class Migration2 implements MigrationInterface |
25 | 25 | { |
26 | - /** |
|
27 | - * {@inheritDoc} |
|
28 | - * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade() |
|
29 | - */ |
|
30 | - public function upgrade(): void |
|
31 | - { |
|
32 | - $in_transaction = DB::connection()->getPdo()->inTransaction(); |
|
33 | - |
|
34 | - // Clean up previous sosa table if it exists |
|
35 | - DB::schema()->dropIfExists('maj_sosa'); |
|
36 | - |
|
37 | - DB::schema()->create('maj_sosa', static function (Blueprint $table): void { |
|
38 | - |
|
39 | - $table->integer('majs_gedcom_id'); |
|
40 | - $table->integer('majs_user_id')->default(-1); |
|
41 | - $table->bigInteger('majs_sosa')->unsigned(); // Allow to calculate sosa on 64 generations |
|
42 | - $table->string('majs_i_id', 20); |
|
43 | - $table->tinyInteger('majs_gen')->nullable(); |
|
44 | - $table->smallInteger('majs_birth_year')->nullable(); |
|
45 | - $table->smallInteger('majs_birth_year_est')->nullable(); |
|
46 | - $table->smallInteger('majs_death_year')->nullable(); |
|
47 | - $table->smallInteger('majs_death_year_est')->nullable(); |
|
48 | - |
|
49 | - $table->primary(['majs_gedcom_id', 'majs_user_id', 'majs_sosa']); |
|
50 | - |
|
51 | - $table->index(['majs_gedcom_id', 'majs_user_id']); |
|
52 | - $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_i_id']); |
|
53 | - $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_gen']); |
|
54 | - |
|
55 | - $table->foreign('majs_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade'); |
|
56 | - $table->foreign('majs_user_id')->references('user_id')->on('user')->onDelete('cascade'); |
|
57 | - }); |
|
58 | - |
|
59 | - if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) { |
|
60 | - DB::connection()->beginTransaction(); |
|
61 | - } |
|
62 | - } |
|
26 | + /** |
|
27 | + * {@inheritDoc} |
|
28 | + * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade() |
|
29 | + */ |
|
30 | + public function upgrade(): void |
|
31 | + { |
|
32 | + $in_transaction = DB::connection()->getPdo()->inTransaction(); |
|
33 | + |
|
34 | + // Clean up previous sosa table if it exists |
|
35 | + DB::schema()->dropIfExists('maj_sosa'); |
|
36 | + |
|
37 | + DB::schema()->create('maj_sosa', static function (Blueprint $table): void { |
|
38 | + |
|
39 | + $table->integer('majs_gedcom_id'); |
|
40 | + $table->integer('majs_user_id')->default(-1); |
|
41 | + $table->bigInteger('majs_sosa')->unsigned(); // Allow to calculate sosa on 64 generations |
|
42 | + $table->string('majs_i_id', 20); |
|
43 | + $table->tinyInteger('majs_gen')->nullable(); |
|
44 | + $table->smallInteger('majs_birth_year')->nullable(); |
|
45 | + $table->smallInteger('majs_birth_year_est')->nullable(); |
|
46 | + $table->smallInteger('majs_death_year')->nullable(); |
|
47 | + $table->smallInteger('majs_death_year_est')->nullable(); |
|
48 | + |
|
49 | + $table->primary(['majs_gedcom_id', 'majs_user_id', 'majs_sosa']); |
|
50 | + |
|
51 | + $table->index(['majs_gedcom_id', 'majs_user_id']); |
|
52 | + $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_i_id']); |
|
53 | + $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_gen']); |
|
54 | + |
|
55 | + $table->foreign('majs_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade'); |
|
56 | + $table->foreign('majs_user_id')->references('user_id')->on('user')->onDelete('cascade'); |
|
57 | + }); |
|
58 | + |
|
59 | + if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) { |
|
60 | + DB::connection()->beginTransaction(); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | } |