Passed
Push — feature/code-analysis ( 00c5b4...e321b8 )
by Jonathan
13:27
created
app/Module/PatronymicLineage/Http/RequestHandlers/LineagesPage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 ->redirect(LineagesPage::class, ['tree' => $tree->name(), 'surname' => $surname]);
69 69
         }
70 70
 
71
-        if ($surname === '' ||  $surname === Individual::NOMEN_NESCIO) {
71
+        if ($surname === '' || $surname === Individual::NOMEN_NESCIO) {
72 72
             return Registry::responseFactory()->redirect(SurnamesList::class, ['tree' => $tree->name()]);
73 73
         }
74 74
 
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
         uasort($surname_variants, I18N::comparator());
87 87
         $surname_legend = implode('/', $surname_variants);
88 88
 
89
-        $title = I18N::translate('Patronymic Lineages') . ' — ' . $surname_legend;
89
+        $title = I18N::translate('Patronymic Lineages').' — '.$surname_legend;
90 90
 
91 91
         $lineages = app()->make(LineageBuilder::class, ['surname' => $surname])->buildLineages();
92 92
 
93
-        return $this->viewResponse($this->module->name() . '::lineages-page', [
93
+        return $this->viewResponse($this->module->name().'::lineages-page', [
94 94
             'title'         =>  $title,
95 95
             'module'        =>  $this->module,
96 96
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/PatronymicLineage/PatronymicLineageModule.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function loadRoutes(Map $router): void
74 74
     {
75
-        $router->attach('', '', static function (Map $router): void {
75
+        $router->attach('', '', static function(Map $router): void {
76 76
 
77
-            $router->attach('', '/module-maj/lineages', static function (Map $router): void {
77
+            $router->attach('', '/module-maj/lineages', static function(Map $router): void {
78 78
 
79
-                $router->attach('', '/Page', static function (Map $router): void {
79
+                $router->attach('', '/Page', static function(Map $router): void {
80 80
 
81 81
                     $router->get(SurnamesList::class, '/{tree}/list{/alpha}', SurnamesList::class);
82 82
                     $router->get(LineagesPage::class, '/{tree}/lineage/{surname}', LineagesPage::class);
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
 
110 110
         // If a surname is already in the query attribute, use it
111 111
         if ($surname === null) {
112
-            $surname_attr =  Validator::attributes($request)->string('surname', '');
113
-            $surname_param =  Validator::queryParams($request)->string('surname', '');
114
-            $surname_body =  Validator::parsedBody($request)->string('surname', '');
112
+            $surname_attr = Validator::attributes($request)->string('surname', '');
113
+            $surname_param = Validator::queryParams($request)->string('surname', '');
114
+            $surname_body = Validator::parsedBody($request)->string('surname', '');
115 115
             $surname = $surname_attr !== '' ? $surname_attr : (
116 116
                 $surname_param !== '' ? $surname_param : (
117 117
                 $surname_body !== '' ? $surname_body : null
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 'surname'   =>  $surname
135 135
             ] + $parameters);
136 136
         }
137
-        return route(SurnamesList::class, ['tree'  =>  $tree->name() ] + $parameters);
137
+        return route(SurnamesList::class, ['tree'  =>  $tree->name()] + $parameters);
138 138
     }
139 139
 
140 140
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function headContent(): string
154 154
     {
155
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
155
+        return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">';
156 156
     }
157 157
 
158 158
     /**
Please login to merge, or discard this patch.
app/Module/GeoDispersion/PlaceMappers/CoordinatesPlaceMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         if ($cacheKey === null) {
140 140
             return null;
141 141
         }
142
-        return Registry::cache()->array()->remember($cacheKey, function (): ?array {
142
+        return Registry::cache()->array()->remember($cacheKey, function(): ?array {
143 143
             $map_def = $this->data('map');
144 144
             if (
145 145
                 !$this->setGeometryEngine()
@@ -214,6 +214,6 @@  discard block
 block discarded – undo
214 214
         if ($map_def === null || !($map_def instanceof MapDefinitionInterface)) {
215 215
             return null;
216 216
         }
217
-        return spl_object_id($this) . '-map-' . $map_def->id();
217
+        return spl_object_id($this).'-map-'.$map_def->id();
218 218
     }
219 219
 }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Services/PlacesReferenceTableService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
         if ($source_parts === false) {
50 50
             return null;
51 51
         }
52
-        $source_parts = array_map(function (string $part): string {
52
+        $source_parts = array_map(function(string $part): string {
53 53
             if (preg_match('/^#([^#]+)#$/i', $part, $column_id) === 1) {
54 54
                 return $this->columnName($column_id[1]);
55 55
             }
56 56
             return $this->sanitizeString(str_replace(['?', '*'], ['_', '%'], $part));
57 57
         }, array_filter($source_parts));
58 58
         $source_parts[] = "'%'";
59
-        $concat_statement = 'CONCAT(' . implode(', ', $source_parts) . ')';
59
+        $concat_statement = 'CONCAT('.implode(', ', $source_parts).')';
60 60
 
61 61
         // Extract columns used in target
62 62
         $columns = [];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         // Get the mapping
68 68
         $rows = DB::table('maj_geodata_ref')  //DB::table('maj_geodata_ref')
69 69
             ->select($columns)
70
-            ->whereRaw($this->sanitizeString($source) . " LIKE " . $concat_statement)
70
+            ->whereRaw($this->sanitizeString($source)." LIKE ".$concat_statement)
71 71
             ->get();
72 72
 
73 73
         // Format the output ID
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
             return null;
76 76
         }
77 77
 
78
-        $mapping = (array) $rows->first();
78
+        $mapping = (array)$rows->first();
79 79
 
80 80
         return str_replace(
81
-            array_map(fn($tag) => '{' . $tag . '}', $columns_select[1]),
81
+            array_map(fn($tag) => '{'.$tag.'}', $columns_select[1]),
82 82
             array_map(fn($tag) => $mapping[$this->columnName($tag)] ?? '', $columns_select[1]),
83 83
             $target_format
84 84
         );
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Services/GeoAnalysisDataService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,14 +74,14 @@
 block discarded – undo
74 74
 
75 75
         return $query_individuals->unionAll($query_families)
76 76
             ->get()->pluck('g_gedcom')
77
-            ->flatMap(static function (string $gedcom): array {
77
+            ->flatMap(static function(string $gedcom): array {
78 78
                 preg_match_all('/\n2 PLAC (.+)/', $gedcom, $matches);
79 79
                 return $matches[1];
80 80
             })
81 81
             ->sort(I18N::comparator())->reverse()
82
-            ->mapWithKeys(static function (string $place): array {
82
+            ->mapWithKeys(static function(string $place): array {
83 83
                 $place_array = array_reverse(array_filter(array_map('trim', explode(",", $place))));
84
-                return [ count($place_array) => $place_array ];
84
+                return [count($place_array) => $place_array];
85 85
             })
86 86
             ->sortKeys()
87 87
             ->last() ?? [];
Please login to merge, or discard this patch.
app/Module/ModuleMyArtJaubTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function boot(): void
35 35
     {
36
-        View::registerNamespace($this->name(), $this->resourcesFolder() . 'views/');
36
+        View::registerNamespace($this->name(), $this->resourcesFolder().'views/');
37 37
 
38 38
         $this->loadRoutes(Registry::routeFactory()->routeMap());
39 39
     }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function resourcesFolder(): string
45 45
     {
46
-        return Webtrees::MODULES_DIR . trim($this->name(), '_') . '/resources/';
46
+        return Webtrees::MODULES_DIR.trim($this->name(), '_').'/resources/';
47 47
     }
48 48
 
49 49
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function customTranslations(string $language): array
71 71
     {
72
-        $translation_file = $this->resourcesFolder() . 'lang/' . $language . '/messages.php';
72
+        $translation_file = $this->resourcesFolder().'lang/'.$language.'/messages.php';
73 73
 
74 74
         try {
75 75
             $translation  = new Translation($translation_file);
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
     {
97 97
         /** @var ModuleThemeInterface $theme */
98 98
         $theme = app(ModuleThemeInterface::class);
99
-        $css_file = $this->resourcesFolder() . 'css/' . $theme->name() . '.min.css';
99
+        $css_file = $this->resourcesFolder().'css/'.$theme->name().'.min.css';
100 100
 
101 101
         if (file_exists($css_file)) {
102
-            return $this->assetUrl('css/' . $theme->name() . '.min.css');
102
+            return $this->assetUrl('css/'.$theme->name().'.min.css');
103 103
         } else {
104 104
             return $this->assetUrl('css/default.min.css');
105 105
         }
Please login to merge, or discard this patch.