Completed
Pull Request — master (#1904)
by Rico
08:41
created
app/Http/Controllers/FamilyController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     private function significant(Family $family): stdClass
64 64
     {
65
-        $significant = (object)[
65
+        $significant = (object) [
66 66
             'family'     => $family,
67 67
             'individual' => null,
68 68
             'surname'    => '',
Please login to merge, or discard this patch.
app/Http/Controllers/MessageController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -328,8 +328,8 @@  discard block
 block discarded – undo
328 328
     private function validContacts(Tree $tree): array
329 329
     {
330 330
         $contacts = [
331
-            User::find((int)$tree->getPreference('CONTACT_USER_ID')),
332
-            User::find((int)$tree->getPreference('WEBMASTER_USER_ID')),
331
+            User::find((int) $tree->getPreference('CONTACT_USER_ID')),
332
+            User::find((int) $tree->getPreference('WEBMASTER_USER_ID')),
333 333
         ];
334 334
 
335 335
         return array_filter($contacts);
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     {
354 354
         // Create a dummy user, so we can send messages from the tree.
355 355
         $from = new User(
356
-            (object)[
356
+            (object) [
357 357
                 'user_id'   => null,
358 358
                 'user_name' => '',
359 359
                 'real_name' => $tree->getTitle(),
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
         // Create a dummy user, so we can reply to visitors.
365 365
         $sender = new User(
366
-            (object)[
366
+            (object) [
367 367
                 'user_id'   => null,
368 368
                 'user_name' => '',
369 369
                 'real_name' => $sender_name,
Please login to merge, or discard this patch.
app/Date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@
 block discarded – undo
448 448
      */
449 449
     public function julianDay(): int
450 450
     {
451
-        return (int)(($this->minimumJulianDay() + $this->maximumJulianDay()) / 2);
451
+        return (int) (($this->minimumJulianDay() + $this->maximumJulianDay()) / 2);
452 452
     }
453 453
 
454 454
     /**
Please login to merge, or discard this patch.
app/Database.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,8 +88,7 @@  discard block
 block discarded – undo
88 88
         self::$table_prefix = $config['tblpfx'];
89 89
 
90 90
         $dsn = (substr($config['dbhost'], 0, 1) === '/' ?
91
-            "mysql:unix_socket='{$config['dbhost']};dbname={$config['dbname']}" :
92
-            "mysql:host={$config['dbhost']};dbname={$config['dbname']};port={$config['dbport']}"
91
+            "mysql:unix_socket='{$config['dbhost']};dbname={$config['dbname']}" : "mysql:host={$config['dbhost']};dbname={$config['dbname']};port={$config['dbport']}"
93 92
         );
94 93
 
95 94
         // Create the underlying PDO object.
@@ -222,7 +221,7 @@  discard block
 block discarded – undo
222 221
     public static function updateSchema($namespace, $schema_name, $target_version): bool
223 222
     {
224 223
         try {
225
-            $current_version = (int)Site::getPreference($schema_name);
224
+            $current_version = (int) Site::getPreference($schema_name);
226 225
         } catch (PDOException $ex) {
227 226
             DebugBar::addThrowable($ex);
228 227
 
@@ -239,7 +238,7 @@  discard block
 block discarded – undo
239 238
             $migration = new $class();
240 239
             $migration->upgrade();
241 240
             $current_version++;
242
-            Site::setPreference($schema_name, (string)$current_version);
241
+            Site::setPreference($schema_name, (string) $current_version);
243 242
             $updates_applied = true;
244 243
         }
245 244
 
Please login to merge, or discard this patch.
app/Report/ReportHtml.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $this->pageh = $tmpw;
146 146
         }
147 147
         // Store the pagewidth without margins
148
-        $this->noMarginWidth = (int)($this->pagew - $this->leftmargin - $this->rightmargin);
148
+        $this->noMarginWidth = (int) ($this->pagew - $this->leftmargin - $this->rightmargin);
149 149
         // If RTL
150 150
         if ($this->rtl) {
151 151
             $this->alignRTL  = 'right';
@@ -727,14 +727,14 @@  discard block
 block discarded – undo
727 727
     public function textWrap($str, $width): string
728 728
     {
729 729
         // Calculate the line width
730
-        $lw = (int)($width / ($this->getCurrentStyleHeight() / 2));
730
+        $lw = (int) ($width / ($this->getCurrentStyleHeight() / 2));
731 731
         // Wordwrap each line
732 732
         $lines = explode("\n", $str);
733 733
         // Line Feed counter
734 734
         $lfct     = count($lines);
735 735
         $wraptext = '';
736 736
         foreach ($lines as $line) {
737
-            $wtext    = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true);
737
+            $wtext = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true);
738 738
             $wraptext .= $wtext;
739 739
             // Add a new line as long as it’s not the last line
740 740
             if ($lfct > 1) {
Please login to merge, or discard this patch.
app/Module/PlacesModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     private function getPersonalFacts(Individual $individual): array
143 143
     {
144
-        $facts      = $individual->getFacts();
144
+        $facts = $individual->getFacts();
145 145
         foreach ($individual->getSpouseFamilies() as $family) {
146 146
             $facts = array_merge($facts, $family->getFacts());
147 147
             // Add birth of children from this family to the facts array
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                     'provider' => 'openstreetmap',
216 216
                     'style'    => 'mapnik',
217 217
                 ];
218
-                self::$map_providers  = [
218
+                self::$map_providers = [
219 219
                     'openstreetmap' => [
220 220
                         'name'   => 'OpenStreetMap',
221 221
                         'styles' => ['mapnik' => 'Mapnik'],
Please login to merge, or discard this patch.
app/Theme/AbstractTheme.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     {
215 215
         if ($analytics_id) {
216 216
             // Add extra dimensions (i.e. filtering categories)
217
-            $dimensions = (object)[
217
+            $dimensions = (object) [
218 218
                 'dimension1' => $this->tree ? $this->tree->getName() : '-',
219 219
                 'dimension2' => $this->tree ? Auth::accessLevel($this->tree) : '-',
220 220
             ];
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         if ($project_id && $security_id) {
277 277
             return
278 278
                 '<script>' .
279
-                'var sc_project=' . (int)$project_id . ',sc_invisible=1,sc_security="' . $security_id .
279
+                'var sc_project=' . (int) $project_id . ',sc_invisible=1,sc_security="' . $security_id .
280 280
                 '",scJsHost = (("https:"===document.location.protocol)?"https://secure.":"http://www.");' .
281 281
                 'document.write("<sc"+"ript src=\'"+scJsHost+"statcounter.com/counter/counter.js\'></"+"script>");' .
282 282
                 '</script>';
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
     public function menuSearchPhonetic(): Menu
1799 1799
     {
1800 1800
         /* I18N: search using “sounds like”, rather than exact spelling */
1801
-        return new Menu(I18N::translate('Phonetic search'), route('search-phonetic', ['ged'    => $this->tree->getName(), 'action' => 'soundex',]), 'menu-search-soundex', ['rel' => 'nofollow']);
1801
+        return new Menu(I18N::translate('Phonetic search'), route('search-phonetic', ['ged'    => $this->tree->getName(), 'action' => 'soundex', ]), 'menu-search-soundex', ['rel' => 'nofollow']);
1802 1802
     }
1803 1803
 
1804 1804
     /**
Please login to merge, or discard this patch.
app/Stats.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
             100 * $tot_sindi_per,
477 477
         ]);
478 478
         $chl           = I18N::translate('Without sources') . ' - ' . I18N::percentage(1 - $tot_sindi_per, 1) . '|' .
479
-                     I18N::translate('With sources') . ' - ' . I18N::percentage($tot_sindi_per, 1);
479
+                        I18N::translate('With sources') . ' - ' . I18N::percentage($tot_sindi_per, 1);
480 480
         $chart_title   = I18N::translate('Individuals with sources');
481 481
 
482 482
         return '<img src="https://chart.googleapis.com/chart?cht=p3&amp;chd=e:' . $chd . '&amp;chs=' . $size . '&amp;chco=' . $color_from . ',' . $color_to . '&amp;chf=bg,s,ffffff00&amp;chl=' . rawurlencode($chl) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . $chart_title . '" title="' . $chart_title . '">';
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
             I18N::translate('Females') . ' - ' . $per_f . '|' .
1069 1069
             I18N::translate('Males') . ' - ' . $per_m;
1070 1070
         $chart_title = I18N::translate('Males') . ' - ' . $per_m . I18N::$list_separator .
1071
-                   I18N::translate('Females') . ' - ' . $per_f;
1071
+                    I18N::translate('Females') . ' - ' . $per_f;
1072 1072
 
1073 1073
         return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_female},{$color_male}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . '" title="' . $chart_title . '" />';
1074 1074
     }
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
             I18N::translate('Living') . ' - ' . $per_l . '|' .
1194 1194
             I18N::translate('Dead') . ' - ' . $per_d . '|';
1195 1195
         $chart_title = I18N::translate('Living') . ' - ' . $per_l . I18N::$list_separator .
1196
-                   I18N::translate('Dead') . ' - ' . $per_d;
1196
+                    I18N::translate('Dead') . ' - ' . $per_d;
1197 1197
 
1198 1198
         return "<img src=\"https://chart.googleapis.com/chart?cht=p3&amp;chd=e:{$chd}&amp;chs={$size}&amp;chco={$color_living},{$color_dead}&amp;chf=bg,s,ffffff00&amp;chl={$chl}\" width=\"{$sizes[0]}\" height=\"{$sizes[1]}\" alt=\"" . $chart_title . '" title="' . $chart_title . '" />';
1199 1199
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2216,7 +2216,7 @@
 block discarded – undo
2216 2216
             $centuries = '';
2217 2217
             $counts    = [];
2218 2218
             foreach ($rows as $values) {
2219
-                $counts[]  = round(100 * $values->total / $tot, 0);
2219
+                $counts[] = round(100 * $values->total / $tot, 0);
2220 2220
                 $centuries .= $this->centuryName($values->century) . ' - ' . I18N::number((int) $values->total) . '|';
2221 2221
             }
2222 2222
             $chd = $this->arrayToExtendedEncoding($counts);
Please login to merge, or discard this patch.
app/Module/RecentChangesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $days      = (int) $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS);
58 58
         $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE);
59 59
         $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE);
60
-        $show_user = (bool)$this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER);
60
+        $show_user = (bool) $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER);
61 61
 
62 62
         extract($cfg, EXTR_OVERWRITE);
63 63
 
Please login to merge, or discard this patch.