@@ -21,79 +21,79 @@ |
||
21 | 21 | */ |
22 | 22 | class MissingAncestor |
23 | 23 | { |
24 | - /** |
|
25 | - * @var Individual $individual |
|
26 | - */ |
|
27 | - private $individual; |
|
24 | + /** |
|
25 | + * @var Individual $individual |
|
26 | + */ |
|
27 | + private $individual; |
|
28 | 28 | |
29 | - /** |
|
30 | - * @var int $sosa |
|
31 | - */ |
|
32 | - private $sosa; |
|
29 | + /** |
|
30 | + * @var int $sosa |
|
31 | + */ |
|
32 | + private $sosa; |
|
33 | 33 | |
34 | - /** |
|
35 | - * @var bool $missing_father |
|
36 | - */ |
|
37 | - private $missing_father; |
|
34 | + /** |
|
35 | + * @var bool $missing_father |
|
36 | + */ |
|
37 | + private $missing_father; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @var bool $missing_mother |
|
41 | - */ |
|
42 | - private $missing_mother; |
|
39 | + /** |
|
40 | + * @var bool $missing_mother |
|
41 | + */ |
|
42 | + private $missing_mother; |
|
43 | 43 | |
44 | - /** |
|
45 | - * Constructor for MissingAncestor data class |
|
46 | - * |
|
47 | - * @param Individual $ancestor |
|
48 | - * @param int $sosa |
|
49 | - * @param bool $missing_father |
|
50 | - * @param bool $missing_mother |
|
51 | - */ |
|
52 | - public function __construct(Individual $ancestor, int $sosa, bool $missing_father, bool $missing_mother) |
|
53 | - { |
|
54 | - $this->individual = $ancestor; |
|
55 | - $this->sosa = $sosa; |
|
56 | - $this->missing_father = $missing_father; |
|
57 | - $this->missing_mother = $missing_mother; |
|
58 | - } |
|
44 | + /** |
|
45 | + * Constructor for MissingAncestor data class |
|
46 | + * |
|
47 | + * @param Individual $ancestor |
|
48 | + * @param int $sosa |
|
49 | + * @param bool $missing_father |
|
50 | + * @param bool $missing_mother |
|
51 | + */ |
|
52 | + public function __construct(Individual $ancestor, int $sosa, bool $missing_father, bool $missing_mother) |
|
53 | + { |
|
54 | + $this->individual = $ancestor; |
|
55 | + $this->sosa = $sosa; |
|
56 | + $this->missing_father = $missing_father; |
|
57 | + $this->missing_mother = $missing_mother; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * Reference individual of the row |
|
62 | - * |
|
63 | - * @return Individual |
|
64 | - */ |
|
65 | - public function individual(): Individual |
|
66 | - { |
|
67 | - return $this->individual; |
|
68 | - } |
|
60 | + /** |
|
61 | + * Reference individual of the row |
|
62 | + * |
|
63 | + * @return Individual |
|
64 | + */ |
|
65 | + public function individual(): Individual |
|
66 | + { |
|
67 | + return $this->individual; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * Minimum sosa of the reference individual |
|
72 | - * |
|
73 | - * @return int |
|
74 | - */ |
|
75 | - public function sosa(): int |
|
76 | - { |
|
77 | - return $this->sosa; |
|
78 | - } |
|
70 | + /** |
|
71 | + * Minimum sosa of the reference individual |
|
72 | + * |
|
73 | + * @return int |
|
74 | + */ |
|
75 | + public function sosa(): int |
|
76 | + { |
|
77 | + return $this->sosa; |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * Indicate whether the reference individual does not have a father |
|
82 | - * |
|
83 | - * @return bool |
|
84 | - */ |
|
85 | - public function isFatherMissing(): bool |
|
86 | - { |
|
87 | - return $this->missing_father; |
|
88 | - } |
|
80 | + /** |
|
81 | + * Indicate whether the reference individual does not have a father |
|
82 | + * |
|
83 | + * @return bool |
|
84 | + */ |
|
85 | + public function isFatherMissing(): bool |
|
86 | + { |
|
87 | + return $this->missing_father; |
|
88 | + } |
|
89 | 89 | |
90 | - /** |
|
91 | - * Indicate whether the reference individual does not have a mother |
|
92 | - * |
|
93 | - * @return bool |
|
94 | - */ |
|
95 | - public function isMotherMissing(): bool |
|
96 | - { |
|
97 | - return $this->missing_mother; |
|
98 | - } |
|
90 | + /** |
|
91 | + * Indicate whether the reference individual does not have a mother |
|
92 | + * |
|
93 | + * @return bool |
|
94 | + */ |
|
95 | + public function isMotherMissing(): bool |
|
96 | + { |
|
97 | + return $this->missing_mother; |
|
98 | + } |
|
99 | 99 | } |
@@ -30,52 +30,52 @@ |
||
30 | 30 | */ |
31 | 31 | class SosaConfigAction implements RequestHandlerInterface |
32 | 32 | { |
33 | - /** |
|
34 | - * @var UserService $user_service |
|
35 | - */ |
|
36 | - private $user_service; |
|
33 | + /** |
|
34 | + * @var UserService $user_service |
|
35 | + */ |
|
36 | + private $user_service; |
|
37 | 37 | |
38 | - /** |
|
39 | - * Constructor for SosaConfigAction Request Handler |
|
40 | - * |
|
41 | - * @param UserService $user_service |
|
42 | - */ |
|
43 | - public function __construct(UserService $user_service) |
|
44 | - { |
|
45 | - $this->user_service = $user_service; |
|
46 | - } |
|
38 | + /** |
|
39 | + * Constructor for SosaConfigAction Request Handler |
|
40 | + * |
|
41 | + * @param UserService $user_service |
|
42 | + */ |
|
43 | + public function __construct(UserService $user_service) |
|
44 | + { |
|
45 | + $this->user_service = $user_service; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * {@inheritDoc} |
|
50 | - * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | - */ |
|
52 | - public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | - { |
|
54 | - $tree = $request->getAttribute('tree'); |
|
55 | - assert($tree instanceof Tree); |
|
48 | + /** |
|
49 | + * {@inheritDoc} |
|
50 | + * @see \Psr\Http\Server\RequestHandlerInterface::handle() |
|
51 | + */ |
|
52 | + public function handle(ServerRequestInterface $request): ResponseInterface |
|
53 | + { |
|
54 | + $tree = $request->getAttribute('tree'); |
|
55 | + assert($tree instanceof Tree); |
|
56 | 56 | |
57 | - $params = $request->getParsedBody(); |
|
58 | - assert(is_array($params)); |
|
57 | + $params = $request->getParsedBody(); |
|
58 | + assert(is_array($params)); |
|
59 | 59 | |
60 | - $user_id = (int) $params['sosa-userid']; |
|
61 | - $root_id = $params['sosa-rootid'] ?? ''; |
|
62 | - $max_gen = $params['sosa-maxgen'] ?? ''; |
|
60 | + $user_id = (int) $params['sosa-userid']; |
|
61 | + $root_id = $params['sosa-rootid'] ?? ''; |
|
62 | + $max_gen = $params['sosa-maxgen'] ?? ''; |
|
63 | 63 | |
64 | - if (Auth::id() == $user_id || ($user_id == -1 && Auth::isManager($tree))) { |
|
65 | - $user = $user_id == -1 ? new DefaultUser() : $this->user_service->find($user_id); |
|
66 | - if ($user !== null && ($root_indi = Registry::individualFactory()->make($root_id, $tree)) !== null) { |
|
67 | - $tree->setUserPreference($user, 'MAJ_SOSA_ROOT_ID', $root_indi->xref()); |
|
68 | - $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', $max_gen); |
|
69 | - FlashMessages::addMessage(I18N::translate('The root individual has been updated.')); |
|
70 | - return redirect(route(SosaConfig::class, [ |
|
71 | - 'tree' => $tree->name(), |
|
72 | - 'compute' => 'yes', |
|
73 | - 'user_id' => $user_id |
|
74 | - ])); |
|
75 | - } |
|
76 | - } |
|
64 | + if (Auth::id() == $user_id || ($user_id == -1 && Auth::isManager($tree))) { |
|
65 | + $user = $user_id == -1 ? new DefaultUser() : $this->user_service->find($user_id); |
|
66 | + if ($user !== null && ($root_indi = Registry::individualFactory()->make($root_id, $tree)) !== null) { |
|
67 | + $tree->setUserPreference($user, 'MAJ_SOSA_ROOT_ID', $root_indi->xref()); |
|
68 | + $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', $max_gen); |
|
69 | + FlashMessages::addMessage(I18N::translate('The root individual has been updated.')); |
|
70 | + return redirect(route(SosaConfig::class, [ |
|
71 | + 'tree' => $tree->name(), |
|
72 | + 'compute' => 'yes', |
|
73 | + 'user_id' => $user_id |
|
74 | + ])); |
|
75 | + } |
|
76 | + } |
|
77 | 77 | |
78 | - FlashMessages::addMessage(I18N::translate('The root individual could not be updated.'), 'danger'); |
|
79 | - return redirect(route(SosaConfig::class, ['tree' => $tree->name()])); |
|
80 | - } |
|
78 | + FlashMessages::addMessage(I18N::translate('The root individual could not be updated.'), 'danger'); |
|
79 | + return redirect(route(SosaConfig::class, ['tree' => $tree->name()])); |
|
80 | + } |
|
81 | 81 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | if (($fact->getDate() || $fact->getPlace()) && $fact->canShow()) { |
68 | 68 | switch ($style) { |
69 | 69 | case 10: |
70 | - return '<i>'.$fact->getLabel().' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact) .' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1') .'</i>'; |
|
70 | + return '<i>'.$fact->getLabel().' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact) .' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1') .'</i>'; |
|
71 | 71 | default: |
72 | 72 | return $this->gedcomrecord->formatFirstMajorFact($facts, $style); |
73 | 73 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | */ |
20 | 20 | interface ModulePlaceMapperProviderInterface |
21 | 21 | { |
22 | - /** |
|
23 | - * List place mappers provided by the module as an array. |
|
24 | - * |
|
25 | - * @return string[] List of tasks |
|
26 | - */ |
|
27 | - public function listPlaceMappers(): array; |
|
22 | + /** |
|
23 | + * List place mappers provided by the module as an array. |
|
24 | + * |
|
25 | + * @return string[] List of tasks |
|
26 | + */ |
|
27 | + public function listPlaceMappers(): array; |
|
28 | 28 | } |
@@ -21,47 +21,47 @@ |
||
21 | 21 | */ |
22 | 22 | interface PlaceMapperInterface |
23 | 23 | { |
24 | - /** |
|
25 | - * Boot the Place mapper |
|
26 | - */ |
|
27 | - function boot(): void; |
|
24 | + /** |
|
25 | + * Boot the Place mapper |
|
26 | + */ |
|
27 | + function boot(): void; |
|
28 | 28 | |
29 | - /** |
|
30 | - * Get the configuration associated to the mapper |
|
31 | - * |
|
32 | - * @return PlaceMapperConfigInterface |
|
33 | - */ |
|
34 | - function config(): PlaceMapperConfigInterface; |
|
29 | + /** |
|
30 | + * Get the configuration associated to the mapper |
|
31 | + * |
|
32 | + * @return PlaceMapperConfigInterface |
|
33 | + */ |
|
34 | + function config(): PlaceMapperConfigInterface; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Set the configured associated to the mapper |
|
38 | - * |
|
39 | - * @param PlaceMapperConfigInterface $config |
|
40 | - */ |
|
41 | - function setConfig(PlaceMapperConfigInterface $config): void; |
|
36 | + /** |
|
37 | + * Set the configured associated to the mapper |
|
38 | + * |
|
39 | + * @param PlaceMapperConfigInterface $config |
|
40 | + */ |
|
41 | + function setConfig(PlaceMapperConfigInterface $config): void; |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get the data associated to the mapper, for a specific key |
|
45 | - * |
|
46 | - * @param string $key |
|
47 | - * @return null|mixed |
|
48 | - */ |
|
49 | - function data(string $key); |
|
43 | + /** |
|
44 | + * Get the data associated to the mapper, for a specific key |
|
45 | + * |
|
46 | + * @param string $key |
|
47 | + * @return null|mixed |
|
48 | + */ |
|
49 | + function data(string $key); |
|
50 | 50 | |
51 | - /** |
|
52 | - * Set the data associated to the mapper, for a specific key |
|
53 | - * |
|
54 | - * @param string $key |
|
55 | - * @param mixed $data |
|
56 | - */ |
|
57 | - function setData(string $key, $data): void; |
|
51 | + /** |
|
52 | + * Set the data associated to the mapper, for a specific key |
|
53 | + * |
|
54 | + * @param string $key |
|
55 | + * @param mixed $data |
|
56 | + */ |
|
57 | + function setData(string $key, $data): void; |
|
58 | 58 | |
59 | - /** |
|
60 | - * Return the property value of the feature identifying a place in a GeoJson map. |
|
61 | - * |
|
62 | - * @param Place $place |
|
63 | - * @param string $feature_property |
|
64 | - * @return string|NULL |
|
65 | - */ |
|
66 | - function map(Place $place, string $feature_property) : ?string; |
|
59 | + /** |
|
60 | + * Return the property value of the feature identifying a place in a GeoJson map. |
|
61 | + * |
|
62 | + * @param Place $place |
|
63 | + * @param string $feature_property |
|
64 | + * @return string|NULL |
|
65 | + */ |
|
66 | + function map(Place $place, string $feature_property) : ?string; |
|
67 | 67 | } |
68 | 68 | \ No newline at end of file |
@@ -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 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 MapDefinitionInterface[] List of map definitions |
|
26 | + */ |
|
27 | + public function listMapDefinition(): array; |
|
28 | 28 | } |
@@ -20,28 +20,28 @@ |
||
20 | 20 | */ |
21 | 21 | interface PlaceMapperConfigInterface extends JsonSerializable |
22 | 22 | { |
23 | - /** |
|
24 | - * Deserialise the mapper configuration from a string or an array |
|
25 | - * |
|
26 | - * @param mixed $config |
|
27 | - * @return self |
|
28 | - */ |
|
29 | - function jsonDeserialize($config): self; |
|
23 | + /** |
|
24 | + * Deserialise the mapper configuration from a string or an array |
|
25 | + * |
|
26 | + * @param mixed $config |
|
27 | + * @return self |
|
28 | + */ |
|
29 | + function jsonDeserialize($config): self; |
|
30 | 30 | |
31 | - /** |
|
32 | - * Check if the configuration contains a specific key |
|
33 | - * |
|
34 | - * @param string $key |
|
35 | - * @return bool |
|
36 | - */ |
|
37 | - function has(string $key): bool; |
|
31 | + /** |
|
32 | + * Check if the configuration contains a specific key |
|
33 | + * |
|
34 | + * @param string $key |
|
35 | + * @return bool |
|
36 | + */ |
|
37 | + function has(string $key): bool; |
|
38 | 38 | |
39 | - /** |
|
40 | - * Return the configuration associated with a key, or a default value if none found. |
|
41 | - * |
|
42 | - * @param string $key |
|
43 | - * @param mixed|null $default |
|
44 | - * @return mixed|null |
|
45 | - */ |
|
46 | - function get(string $key, $default = null); |
|
39 | + /** |
|
40 | + * Return the configuration associated with a key, or a default value if none found. |
|
41 | + * |
|
42 | + * @param string $key |
|
43 | + * @param mixed|null $default |
|
44 | + * @return mixed|null |
|
45 | + */ |
|
46 | + function get(string $key, $default = null); |
|
47 | 47 | } |
48 | 48 | \ No newline at end of file |
@@ -20,10 +20,10 @@ |
||
20 | 20 | interface ModuleGeoAnalysisProviderInterface |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * List geographical analyses provided by the module as an array. |
|
25 | - * |
|
26 | - * @return string[] List of tasks |
|
27 | - */ |
|
28 | - public function listGeoAnalyses(): array; |
|
23 | + /** |
|
24 | + * List geographical analyses provided by the module as an array. |
|
25 | + * |
|
26 | + * @return string[] List of tasks |
|
27 | + */ |
|
28 | + public function listGeoAnalyses(): array; |
|
29 | 29 | } |
@@ -21,26 +21,26 @@ |
||
21 | 21 | */ |
22 | 22 | interface GeoAnalysisInterface |
23 | 23 | { |
24 | - /** |
|
25 | - * Get the geographical dispersion analysis title |
|
26 | - * |
|
27 | - * @return string |
|
28 | - */ |
|
29 | - function title(): string; |
|
24 | + /** |
|
25 | + * Get the geographical dispersion analysis title |
|
26 | + * |
|
27 | + * @return string |
|
28 | + */ |
|
29 | + function title(): string; |
|
30 | 30 | |
31 | - /** |
|
32 | - * Gets the function to translate |
|
33 | - * |
|
34 | - * @return callable(int $count): string |
|
35 | - */ |
|
36 | - function itemsDescription(): callable; |
|
31 | + /** |
|
32 | + * Gets the function to translate |
|
33 | + * |
|
34 | + * @return callable(int $count): string |
|
35 | + */ |
|
36 | + function itemsDescription(): callable; |
|
37 | 37 | |
38 | - /** |
|
39 | - * Get the results of the geographical dispersion analysis |
|
40 | - * |
|
41 | - * @param Tree $tree |
|
42 | - * @param int $depth |
|
43 | - * @return GeoAnalysisResults |
|
44 | - */ |
|
45 | - function results(Tree $tree, int $depth): GeoAnalysisResults; |
|
38 | + /** |
|
39 | + * Get the results of the geographical dispersion analysis |
|
40 | + * |
|
41 | + * @param Tree $tree |
|
42 | + * @param int $depth |
|
43 | + * @return GeoAnalysisResults |
|
44 | + */ |
|
45 | + function results(Tree $tree, int $depth): GeoAnalysisResults; |
|
46 | 46 | } |
47 | 47 | \ No newline at end of file |