Passed
Push — main ( 9fcb9f...c808ff )
by Jonathan
04:18
created
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewListData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $module_name = $this->module->name();
66 66
         return Registry::responseFactory()->response(['data' => $this->geoview_data_service->all($tree, true)
67 67
             ->map(fn(AbstractGeoAnalysisView $view) => [
68
-                'edit' => view($module_name . '::admin/view-table-options', [
68
+                'edit' => view($module_name.'::admin/view-table-options', [
69 69
                     'view_id' => $view->id(),
70 70
                     'view_enabled' => $view->isEnabled(),
71 71
                     'view_edit_route' => route(GeoAnalysisViewEditPage::class, [
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
                     ]),
84 84
                 ]),
85 85
                 'enabled' =>  [
86
-                    'display' => view($module_name . '::components/yes-no-icons', ['yes' => $view->isEnabled()]),
86
+                    'display' => view($module_name.'::components/yes-no-icons', ['yes' => $view->isEnabled()]),
87 87
                     'raw' => $view->isEnabled() ? 0 : 1
88 88
                 ],
89 89
                 'type' =>  $view->icon($module),
90 90
                 'description' => [
91
-                    'display' => '<bdi>' . e($view->description()) . '</bdi>',
91
+                    'display' => '<bdi>'.e($view->description()).'</bdi>',
92 92
                     'raw' => e($view->description())
93 93
                 ],
94 94
                 'analysis' => [
95
-                    'display' => '<bdi>' . e($view->analysis()->title()) . '</bdi>',
95
+                    'display' => '<bdi>'.e($view->analysis()->title()).'</bdi>',
96 96
                     'raw' => e($view->analysis()->title())
97 97
                 ],
98 98
                 'place_depth' => [
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterAddAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $view = $this->geoview_data_service->find($tree, $view_id);
83 83
 
84 84
         $map = $this->map_definition_service->find(Validator::parsedBody($request)->string('map_adapter_map', ''));
85
-        $mapping_property   = Validator::parsedBody($request)->string('map_adapter_property_selected', '');
85
+        $mapping_property = Validator::parsedBody($request)->string('map_adapter_property_selected', '');
86 86
 
87 87
         $mapper = null;
88 88
         try {
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
                 'success'
114 114
             );
115 115
             //phpcs:ignore Generic.Files.LineLength.TooLong
116
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter “' . $new_adapter_id . '” has been added.');
116
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter “'.$new_adapter_id.'” has been added.');
117 117
         } else {
118 118
             FlashMessages::addMessage(
119 119
                 I18N::translate('An error occured while adding a new map configuration.'),
120 120
                 'danger'
121 121
             );
122 122
             //phpcs:ignore Generic.Files.LineLength.TooLong
123
-            Log::addConfigurationLog('Module ' . $this->module->title() . ' : Map Adapter could not be added. See error log.');
123
+            Log::addConfigurationLog('Module '.$this->module->title().' : Map Adapter could not be added. See error log.');
124 124
         }
125 125
 
126 126
         return Registry::responseFactory()->redirect(GeoAnalysisViewEditPage::class, [
Please login to merge, or discard this patch.
Module/GeoDispersion/PlaceMappers/Config/FilteredTopPlaceMapperConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         return [
65 65
             'topPlaces' => $this->topPlaces()
66
-                ->map(fn(Place $place): array => [ $place->tree()->id(), $place->gedcomName() ])
66
+                ->map(fn(Place $place): array => [$place->tree()->id(), $place->gedcomName()])
67 67
                 ->toArray()
68 68
         ];
69 69
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     ->filter(
87 87
                         /** @psalm-suppress MissingClosureParamType */
88 88
                         fn($item): bool => is_array($item) && count($item) === 2
89
-                    )->map(function (array $item): ?Place {
89
+                    )->map(function(array $item): ?Place {
90 90
                         try {
91 91
                             return new Place($item[1], $this->tree_service->find($item[0]));
92 92
                         } catch (RuntimeException $ex) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function configContent(ModuleInterface $module, Tree $tree): string
108 108
     {
109
-        return view($module->name() . '::mappers/filtered-top-config', [
109
+        return view($module->name().'::mappers/filtered-top-config', [
110 110
             'tree'          =>  $tree,
111 111
             'top_places'    =>  $this->topPlaces()
112 112
         ]);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $top_places = Validator::parsedBody($request)->array('mapper_filt_top_places');
129 129
         $config = ['topPlaces' => []];
130 130
         foreach ($top_places as $top_place_id) {
131
-            $place = Place::find((int) $top_place_id, $tree);
131
+            $place = Place::find((int)$top_place_id, $tree);
132 132
             if (mb_strlen($place->gedcomName()) > 0) {
133 133
                 $config['topPlaces'][] = $place;
134 134
             }
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Http/RequestHandlers/SurnamesList.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,24 +59,24 @@
 block discarded – undo
59 59
         $initial = Validator::attributes($request)->string('alpha', '');
60 60
 
61 61
         $initials_list = collect($this->module->surnameAlpha($tree, false, false, I18N::locale()))
62
-            ->reject(function (int $count, string $initial): bool {
62
+            ->reject(function(int $count, string $initial): bool {
63 63
                 return $initial === '@' || $initial === ',';
64 64
             });
65 65
 
66 66
         $show_all = Validator::queryParams($request)->string('show_all', 'no');
67 67
 
68 68
         if ($show_all === 'yes') {
69
-            $title = I18N::translate('Patronymic Lineages') . ' — ' . I18N::translate('All');
69
+            $title = I18N::translate('Patronymic Lineages').' — '.I18N::translate('All');
70 70
             $surnames = $this->module->surnames($tree, '', '', false, false, I18N::locale());
71 71
         } elseif (mb_strlen($initial) === 1) {
72
-            $title = I18N::translate('Patronymic Lineages') . ' — ' . $initial;
72
+            $title = I18N::translate('Patronymic Lineages').' — '.$initial;
73 73
             $surnames = $this->module->surnames($tree, '', $initial, false, false, I18N::locale());
74 74
         } else {
75
-            $title =  I18N::translate('Patronymic Lineages');
75
+            $title = I18N::translate('Patronymic Lineages');
76 76
             $surnames = [];
77 77
         }
78 78
 
79
-        return $this->viewResponse($this->module->name() . '::surnames-page', [
79
+        return $this->viewResponse($this->module->name().'::surnames-page', [
80 80
             'title'         =>  $title,
81 81
             'module'        =>  $this->module,
82 82
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/Model/LineageBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             }
102 102
         }
103 103
 
104
-        return $root_lineages->sort(function (LineageRootNode $a, LineageRootNode $b) {
104
+        return $root_lineages->sort(function(LineageRootNode $a, LineageRootNode $b) {
105 105
             if ($a->numberChildNodes() === $b->numberChildNodes()) {
106 106
                 return 0;
107 107
             }
Please login to merge, or discard this patch.
app/Module/Certificates/Http/RequestHandlers/CertificatePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             return Registry::responseFactory()->redirect(TreePage::class, ['tree' => $tree->name()]);
101 101
         }
102 102
 
103
-        return $this->viewResponse($this->module->name() . '::certificate-page', [
103
+        return $this->viewResponse($this->module->name().'::certificate-page', [
104 104
             'title'                     =>  I18N::translate('Certificate - %s', $certificate->name()),
105 105
             'tree'                      =>  $tree,
106 106
             'module_name'               =>  $this->module->name(),
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaComputeAction.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $user = $user_id === -1 ? new DefaultUser() : $this->user_service->find($user_id);
59 59
 
60 60
             /** @var SosaCalculatorService $sosa_calc_service */
61
-            $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, [ 'tree' => $tree, 'user' => $user]);
61
+            $sosa_calc_service = app()->makeWith(SosaCalculatorService::class, ['tree' => $tree, 'user' => $user]);
62 62
 
63 63
             if (
64 64
                 $partial_from !== '' &&
@@ -70,8 +70,7 @@  discard block
 block discarded – undo
70 70
             }
71 71
 
72 72
             return $res ?
73
-                Registry::responseFactory()->response() :
74
-                Registry::responseFactory()->response(
73
+                Registry::responseFactory()->response() : Registry::responseFactory()->response(
75 74
                     I18N::translate('An error occurred while computing Sosa ancestors.'),
76 75
                     StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR
77 76
                 );
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaConfigAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             $user = $user_id === -1 ? new DefaultUser() : $this->user_service->find($user_id);
66 66
             if ($user !== null && ($root_indi = Registry::individualFactory()->make($root_id, $tree)) !== null) {
67 67
                 $tree->setUserPreference($user, 'MAJ_SOSA_ROOT_ID', $root_indi->xref());
68
-                $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', (string) $max_gen);
68
+                $tree->setUserPreference($user, 'MAJ_SOSA_MAX_GEN', (string)$max_gen);
69 69
                 FlashMessages::addMessage(I18N::translate('The root individual has been updated.'));
70 70
                 return Registry::responseFactory()->redirect(SosaConfig::class, [
71 71
                     'tree' => $tree->name(),
Please login to merge, or discard this patch.
app/Common/GeoDispersion/Config/GenericPlaceMapperConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
     public function jsonDeserialize($config): self
101 101
     {
102 102
         if (is_string($config)) {
103
-            return $this->jsonDeserialize((array) json_decode($config));
103
+            return $this->jsonDeserialize((array)json_decode($config));
104 104
         }
105 105
         if (is_array($config)) {
106 106
             return $this->setConfig($config);
Please login to merge, or discard this patch.