Passed
Branch main (f9aaf7)
by Jonathan
14:43
created
app/Module/GeoDispersion/Services/MapAdapterDataService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     private function mapAdapterMapper(): Closure
134 134
     {
135
-        return function (stdClass $row): ?GeoAnalysisMapAdapter {
135
+        return function(stdClass $row): ?GeoAnalysisMapAdapter {
136 136
             if (null === $map = $this->mapdefinition_service->find($row->majgm_map_id)) {
137 137
                 return null;
138 138
             }
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
                 }
144 144
 
145 145
                 return new GeoAnalysisMapAdapter(
146
-                    (int) $row->majgm_id,
147
-                    (int) $row->majgm_majgv_id,
146
+                    (int)$row->majgm_id,
147
+                    (int)$row->majgm_majgv_id,
148 148
                     $map,
149 149
                     app($row->majgm_mapper),
150 150
                     new MapViewConfig($row->majgm_feature_prop, $this->mapperConfigDecoder($row->majgm_config))
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Services/GeoAnalysisService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         return $this->module_service
51 51
             ->findByInterface(ModuleGeoAnalysisProviderInterface::class, $include_disabled)
52 52
             ->flatMap(fn(ModuleGeoAnalysisProviderInterface $module) => $module->listGeoAnalyses())
53
-            ->map(static function (string $analysis_class): ?GeoAnalysisInterface {
53
+            ->map(static function(string $analysis_class): ?GeoAnalysisInterface {
54 54
                 try {
55 55
                     $analysis = app($analysis_class);
56 56
                     return $analysis instanceof GeoAnalysisInterface ? $analysis : null;
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Services/PlaceMapperService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         return $this->module_service
51 51
             ->findByInterface(ModulePlaceMapperProviderInterface::class, $include_disabled)
52 52
             ->flatMap(fn(ModulePlaceMapperProviderInterface $module) => $module->listPlaceMappers())
53
-            ->map(static function (string $mapper_class): ?PlaceMapperInterface {
53
+            ->map(static function(string $mapper_class): ?PlaceMapperInterface {
54 54
                 try {
55 55
                     $mapper = app($mapper_class);
56 56
                     return $mapper instanceof PlaceMapperInterface ? $mapper : null;
Please login to merge, or discard this patch.
Module/GeoDispersion/PlaceMappers/Config/FilteredTopPlaceMapperConfig.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         return [
64 64
             'topPlaces' => $this->topPlaces()
65
-                ->map(fn(Place $place): array => [ $place->tree()->id(), $place->gedcomName() ])
65
+                ->map(fn(Place $place): array => [$place->tree()->id(), $place->gedcomName()])
66 66
                 ->toArray()
67 67
         ];
68 68
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     ->filter(
83 83
                         /** @psalm-suppress MissingClosureParamType */
84 84
                         fn($item): bool => is_array($item) && count($item) == 2
85
-                    )->map(function (array $item): ?Place {
85
+                    )->map(function(array $item): ?Place {
86 86
                         try {
87 87
                             return new Place($item[1], $this->tree_service->find($item[0]));
88 88
                         } catch (RuntimeException $ex) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function configContent(ModuleInterface $module, Tree $tree): string
104 104
     {
105
-        return view($module->name() . '::mappers/filtered-top-config', [
105
+        return view($module->name().'::mappers/filtered-top-config', [
106 106
             'tree'          =>  $tree,
107 107
             'top_places'    =>  $this->topPlaces()
108 108
         ]);
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
             return $this;
120 120
         }
121 121
 
122
-        $params = (array) $request->getParsedBody();
122
+        $params = (array)$request->getParsedBody();
123 123
 
124 124
         $top_places = $params['mapper_filt_top_places'] ?? [];
125 125
         if (is_array($top_places)) {
126 126
             $config = ['topPlaces' => []];
127 127
             foreach ($top_places as $top_place_id) {
128
-                $place = Place::find((int) $top_place_id, $tree);
128
+                $place = Place::find((int)$top_place_id, $tree);
129 129
                 if (mb_strlen($place->gedcomName()) > 0) {
130 130
                     $config['topPlaces'][] = $place;
131 131
                 }
Please login to merge, or discard this patch.
app/Module/Certificates/Hooks/SourceCertificateIconHook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
     {
60 60
         $permission_level = $tree->getPreference('MAJ_CERTIF_SHOW_CERT');
61 61
         if (
62
-            is_numeric($permission_level) && Auth::accessLevel($tree) <= (int) $permission_level &&
63
-            preg_match('/^' . $level . ' _ACT (.*)$/m', $source_record, $match) === 1
62
+            is_numeric($permission_level) && Auth::accessLevel($tree) <= (int)$permission_level &&
63
+            preg_match('/^'.$level.' _ACT (.*)$/m', $source_record, $match) === 1
64 64
         ) {
65
-            return view($this->module->name() . '::components/certificate-icon', [
65
+            return view($this->module->name().'::components/certificate-icon', [
66 66
                 'module_name'               =>  $this->module->name(),
67 67
                 'certificate'               =>  new Certificate($tree, $match[1]),
68 68
                 'url_obfuscator_service'    =>  $this->url_obfuscator_service,
Please login to merge, or discard this patch.
app/Module/Certificates/Hooks/CertificateTagEditorHook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function addExpectedTags(array $expected_tags): array
53 53
     {
54 54
         return array_merge_recursive($expected_tags, [
55
-            'SOUR' => [ '_ACT' ]
55
+            'SOUR' => ['_ACT']
56 56
         ]);
57 57
     }
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function getLabel(string $tag): string
64 64
     {
65 65
         if (substr($tag, -4) === '_ACT') {
66
-            return Registry::elementFactory()->make(substr('INDI:SOUR:_ACT', 0, -strlen($tag)) . $tag)->label();
66
+            return Registry::elementFactory()->make(substr('INDI:SOUR:_ACT', 0, -strlen($tag)).$tag)->label();
67 67
         }
68 68
         return '';
69 69
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function editForm(string $tag, string $id, string $name, string $value, Tree $tree): string
76 76
     {
77 77
         if (substr($tag, -4) === '_ACT') {
78
-            return Registry::elementFactory()->make(substr('INDI:SOUR:_ACT', 0, -strlen($tag)) . $tag)
78
+            return Registry::elementFactory()->make(substr('INDI:SOUR:_ACT', 0, -strlen($tag)).$tag)
79 79
                 ->edit($id, $name, $value, $tree);
80 80
         }
81 81
         return '';
Please login to merge, or discard this patch.
app/Module/Certificates/CertificatesModule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function loadRoutes($router): void
104 104
     {
105
-        $router->attach('', '', static function (Map $router): void {
105
+        $router->attach('', '', static function(Map $router): void {
106 106
 
107
-            $router->attach('', '/module-maj/certificates', static function (Map $router): void {
107
+            $router->attach('', '/module-maj/certificates', static function(Map $router): void {
108 108
 
109
-                $router->attach('', '/admin', static function (Map $router): void {
109
+                $router->attach('', '/admin', static function(Map $router): void {
110 110
 
111 111
                     $router->get(AdminConfigPage::class, '/config{/tree}', AdminConfigPage::class);
112 112
                     $router->post(AdminConfigAction::class, '/config/{tree}', AdminConfigAction::class)
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                         'permission_preference' =>  'MAJ_CERTIF_SHOW_CERT'
130 130
                     ]);
131 131
 
132
-                $router->attach('', '/certificate/{tree}/{cid}', static function (Map $router): void {
132
+                $router->attach('', '/certificate/{tree}/{cid}', static function(Map $router): void {
133 133
 
134 134
                     $router->extras([
135 135
                         'middleware'            =>  [AuthTreePreference::class],
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     public function headContent(): string
169 169
     {
170
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
170
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
171 171
     }
172 172
 
173 173
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function listUrl(Tree $tree, array $parameters = []): string
178 178
     {
179
-        return route(CertificatesList::class, ['tree' => $tree->name() ] + $parameters);
179
+        return route(CertificatesList::class, ['tree' => $tree->name()] + $parameters);
180 180
     }
181 181
 
182 182
     /**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function listIsEmpty(Tree $tree): bool
196 196
     {
197
-        return Auth::accessLevel($tree) > (int) $tree->getPreference('MAJ_CERTIF_SHOW_CERT', (string) Auth::PRIV_HIDE);
197
+        return Auth::accessLevel($tree) > (int)$tree->getPreference('MAJ_CERTIF_SHOW_CERT', (string)Auth::PRIV_HIDE);
198 198
     }
199 199
 
200 200
     /**
Please login to merge, or discard this patch.
app/Module/Certificates/Http/RequestHandlers/AdminConfigPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             throw new HttpAccessDeniedException();
88 88
         }
89 89
 
90
-        return $this->viewResponse($this->module->name() . '::admin/config', [
90
+        return $this->viewResponse($this->module->name().'::admin/config', [
91 91
             'module_name'       =>  $this->module->name(),
92 92
             'title'             =>  $this->module->title(),
93 93
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
app/Module/Certificates/Http/RequestHandlers/AutoCompleteFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,10 +72,10 @@
 block discarded – undo
72 72
             return collect();
73 73
         }
74 74
 
75
-        $query  = $request->getAttribute('query') ?? '';
75
+        $query = $request->getAttribute('query') ?? '';
76 76
 
77 77
         /** @var Collection<string> $results */
78
-        $results =  $this->certif_filesystem
78
+        $results = $this->certif_filesystem
79 79
             ->certificatesForCityContaining($tree, $city, $query)
80 80
             ->map(fn(Certificate $certificate): string => $certificate->filename());
81 81
 
Please login to merge, or discard this patch.