Completed
Pull Request — master (#1848)
by Rico
09:33
created
app/Http/Controllers/AdminTreesController.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -407,9 +407,9 @@  discard block
 block discarded – undo
407 407
     public function exportClient(Request $request, Tree $tree): Response
408 408
     {
409 409
         // Validate user parameters
410
-        $convert          = (bool)$request->get('convert');
411
-        $zip              = (bool)$request->get('zip');
412
-        $media            = (bool)$request->get('media');
410
+        $convert          = (bool) $request->get('convert');
411
+        $zip              = (bool) $request->get('zip');
412
+        $media            = (bool) $request->get('media');
413 413
         $media_path       = $request->get('media-path');
414 414
         $privatize_export = $request->get('privatize_export');
415 415
 
@@ -539,8 +539,8 @@  discard block
 block discarded – undo
539 539
     public function importAction(Request $request, Tree $tree): RedirectResponse
540 540
     {
541 541
         $source             = $request->get('source');
542
-        $keep_media         = (bool)$request->get('keep_media');
543
-        $WORD_WRAPPED_NOTES = (bool)$request->get('WORD_WRAPPED_NOTES');
542
+        $keep_media         = (bool) $request->get('keep_media');
543
+        $WORD_WRAPPED_NOTES = (bool) $request->get('WORD_WRAPPED_NOTES');
544 544
         $GEDCOM_MEDIA_PATH  = $request->get('GEDCOM_MEDIA_PATH');
545 545
 
546 546
         // Save these choices as defaults
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
      */
604 604
     public function index(Tree $tree = null): Response
605 605
     {
606
-        $multiple_tree_threshold = (int)Site::getPreference('MULTIPLE_TREE_THRESHOLD', self::MULTIPLE_TREE_THRESHOLD);
606
+        $multiple_tree_threshold = (int) Site::getPreference('MULTIPLE_TREE_THRESHOLD', self::MULTIPLE_TREE_THRESHOLD);
607 607
         $gedcom_files            = $this->gedcomFiles(WT_DATA_DIR);
608 608
 
609 609
         $all_trees = Tree::getAll();
@@ -1034,16 +1034,16 @@  discard block
 block discarded – undo
1034 1034
     public function preferencesUpdate(Request $request, Tree $tree): RedirectResponse
1035 1035
     {
1036 1036
         // Coming soon
1037
-        if ((bool)$request->get('all_trees')) {
1037
+        if ((bool) $request->get('all_trees')) {
1038 1038
             FlashMessages::addMessage(I18N::translate('The preferences for all family trees have been updated.'), 'success');
1039 1039
         }
1040
-        if ((bool)$request->get('new_trees')) {
1040
+        if ((bool) $request->get('new_trees')) {
1041 1041
             FlashMessages::addMessage(I18N::translate('The preferences for new family trees have been updated.'), 'success');
1042 1042
         }
1043 1043
 
1044 1044
         $tree->setPreference('ADVANCED_NAME_FACTS', implode(',', $request->get('ADVANCED_NAME_FACTS', [])));
1045 1045
         $tree->setPreference('ADVANCED_PLAC_FACTS', implode(',', $request->get('ADVANCED_PLAC_FACTS', [])));
1046
-        $tree->setPreference('ALLOW_THEME_DROPDOWN', (string)(bool)$request->get('ALLOW_THEME_DROPDOWN'));
1046
+        $tree->setPreference('ALLOW_THEME_DROPDOWN', (string) (bool) $request->get('ALLOW_THEME_DROPDOWN'));
1047 1047
         // For backwards compatibility with webtrees 1.x we store the two calendar formats in one variable
1048 1048
         // e.g. "gregorian_and_jewish"
1049 1049
         $tree->setPreference('CALENDAR_FORMAT', implode('_and_', array_unique([
@@ -1052,57 +1052,57 @@  discard block
 block discarded – undo
1052 1052
         ])));
1053 1053
         $tree->setPreference('CHART_BOX_TAGS', implode(',', $request->get('CHART_BOX_TAGS', [])));
1054 1054
         $tree->setPreference('CONTACT_USER_ID', $request->get('CONTACT_USER_ID'));
1055
-        $tree->setPreference('DEFAULT_PEDIGREE_GENERATIONS', (string)(int)$request->get('DEFAULT_PEDIGREE_GENERATIONS'));
1056
-        $tree->setPreference('EXPAND_NOTES', (string)(bool)$request->get('EXPAND_NOTES'));
1057
-        $tree->setPreference('EXPAND_SOURCES', (string)(bool)$request->get('EXPAND_SOURCES'));
1055
+        $tree->setPreference('DEFAULT_PEDIGREE_GENERATIONS', (string) (int) $request->get('DEFAULT_PEDIGREE_GENERATIONS'));
1056
+        $tree->setPreference('EXPAND_NOTES', (string) (bool) $request->get('EXPAND_NOTES'));
1057
+        $tree->setPreference('EXPAND_SOURCES', (string) (bool) $request->get('EXPAND_SOURCES'));
1058 1058
         $tree->setPreference('FAM_FACTS_ADD', implode(',', $request->get('FAM_FACTS_ADD', [])));
1059 1059
         $tree->setPreference('FAM_FACTS_QUICK', implode(',', $request->get('FAM_FACTS_QUICK', [])));
1060 1060
         $tree->setPreference('FAM_FACTS_UNIQUE', implode(',', $request->get('FAM_FACTS_UNIQUE', [])));
1061
-        $tree->setPreference('FULL_SOURCES', (string)(bool)$request->get('FULL_SOURCES'));
1061
+        $tree->setPreference('FULL_SOURCES', (string) (bool) $request->get('FULL_SOURCES'));
1062 1062
         $tree->setPreference('FORMAT_TEXT', $request->get('FORMAT_TEXT'));
1063
-        $tree->setPreference('GENERATE_UIDS', (string)(bool)$request->get('GENERATE_UIDS'));
1063
+        $tree->setPreference('GENERATE_UIDS', (string) (bool) $request->get('GENERATE_UIDS'));
1064 1064
         $tree->setPreference('GEONAMES_ACCOUNT', $request->get('GEONAMES_ACCOUNT'));
1065
-        $tree->setPreference('HIDE_GEDCOM_ERRORS', (string)(bool)$request->get('HIDE_GEDCOM_ERRORS'));
1065
+        $tree->setPreference('HIDE_GEDCOM_ERRORS', (string) (bool) $request->get('HIDE_GEDCOM_ERRORS'));
1066 1066
         $tree->setPreference('INDI_FACTS_ADD', implode(',', $request->get('INDI_FACTS_ADD', [])));
1067 1067
         $tree->setPreference('INDI_FACTS_QUICK', implode(',', $request->get('INDI_FACTS_QUICK', [])));
1068 1068
         $tree->setPreference('INDI_FACTS_UNIQUE', implode(',', $request->get('INDI_FACTS_UNIQUE', [])));
1069 1069
         $tree->setPreference('LANGUAGE', $request->get('LANGUAGE'));
1070
-        $tree->setPreference('MAX_DESCENDANCY_GENERATIONS', (string)(int)$request->get('MAX_DESCENDANCY_GENERATIONS'));
1071
-        $tree->setPreference('MAX_PEDIGREE_GENERATIONS', (string)(int)$request->get('MAX_PEDIGREE_GENERATIONS'));
1070
+        $tree->setPreference('MAX_DESCENDANCY_GENERATIONS', (string) (int) $request->get('MAX_DESCENDANCY_GENERATIONS'));
1071
+        $tree->setPreference('MAX_PEDIGREE_GENERATIONS', (string) (int) $request->get('MAX_PEDIGREE_GENERATIONS'));
1072 1072
         $tree->setPreference('MEDIA_UPLOAD', $request->get('MEDIA_UPLOAD'));
1073 1073
         $tree->setPreference('META_DESCRIPTION', $request->get('META_DESCRIPTION'));
1074 1074
         $tree->setPreference('META_TITLE', $request->get('META_TITLE'));
1075
-        $tree->setPreference('NO_UPDATE_CHAN', (string)(bool)$request->get('NO_UPDATE_CHAN'));
1076
-        $tree->setPreference('PEDIGREE_LAYOUT', (string)(bool)$request->get('PEDIGREE_LAYOUT'));
1075
+        $tree->setPreference('NO_UPDATE_CHAN', (string) (bool) $request->get('NO_UPDATE_CHAN'));
1076
+        $tree->setPreference('PEDIGREE_LAYOUT', (string) (bool) $request->get('PEDIGREE_LAYOUT'));
1077 1077
         $tree->setPreference('PEDIGREE_ROOT_ID', $request->get('PEDIGREE_ROOT_ID', WT_REGEX_XREF));
1078
-        $tree->setPreference('PEDIGREE_SHOW_GENDER', (string)(bool)$request->get('PEDIGREE_SHOW_GENDER'));
1078
+        $tree->setPreference('PEDIGREE_SHOW_GENDER', (string) (bool) $request->get('PEDIGREE_SHOW_GENDER'));
1079 1079
         $tree->setPreference('PREFER_LEVEL2_SOURCES', $request->get('PREFER_LEVEL2_SOURCES'));
1080 1080
         $tree->setPreference('QUICK_REQUIRED_FACTS', implode(',', $request->get('QUICK_REQUIRED_FACTS', [])));
1081 1081
         $tree->setPreference('QUICK_REQUIRED_FAMFACTS', implode(',', $request->get('QUICK_REQUIRED_FAMFACTS', [])));
1082 1082
         $tree->setPreference('REPO_FACTS_ADD', implode(',', $request->get('REPO_FACTS_ADD', [])));
1083 1083
         $tree->setPreference('REPO_FACTS_QUICK', implode(',', $request->get('REPO_FACTS_QUICK', [])));
1084 1084
         $tree->setPreference('REPO_FACTS_UNIQUE', implode(',', $request->get('REPO_FACTS_UNIQUE', [])));
1085
-        $tree->setPreference('SHOW_COUNTER', (string)(bool)$request->get('SHOW_COUNTER'));
1086
-        $tree->setPreference('SHOW_EST_LIST_DATES', (string)(bool)$request->get('SHOW_EST_LIST_DATES'));
1087
-        $tree->setPreference('SHOW_FACT_ICONS', (string)(bool)$request->get('SHOW_FACT_ICONS'));
1088
-        $tree->setPreference('SHOW_GEDCOM_RECORD', (string)(bool)$request->get('SHOW_GEDCOM_RECORD'));
1089
-        $tree->setPreference('SHOW_HIGHLIGHT_IMAGES', (string)(bool)$request->get('SHOW_HIGHLIGHT_IMAGES'));
1090
-        $tree->setPreference('SHOW_LAST_CHANGE', (string)(bool)$request->get('SHOW_LAST_CHANGE'));
1091
-        $tree->setPreference('SHOW_LDS_AT_GLANCE', (string)(bool)$request->get('SHOW_LDS_AT_GLANCE'));
1085
+        $tree->setPreference('SHOW_COUNTER', (string) (bool) $request->get('SHOW_COUNTER'));
1086
+        $tree->setPreference('SHOW_EST_LIST_DATES', (string) (bool) $request->get('SHOW_EST_LIST_DATES'));
1087
+        $tree->setPreference('SHOW_FACT_ICONS', (string) (bool) $request->get('SHOW_FACT_ICONS'));
1088
+        $tree->setPreference('SHOW_GEDCOM_RECORD', (string) (bool) $request->get('SHOW_GEDCOM_RECORD'));
1089
+        $tree->setPreference('SHOW_HIGHLIGHT_IMAGES', (string) (bool) $request->get('SHOW_HIGHLIGHT_IMAGES'));
1090
+        $tree->setPreference('SHOW_LAST_CHANGE', (string) (bool) $request->get('SHOW_LAST_CHANGE'));
1091
+        $tree->setPreference('SHOW_LDS_AT_GLANCE', (string) (bool) $request->get('SHOW_LDS_AT_GLANCE'));
1092 1092
         $tree->setPreference('SHOW_MEDIA_DOWNLOAD', $request->get('SHOW_MEDIA_DOWNLOAD'));
1093 1093
         $tree->setPreference('SHOW_NO_WATERMARK', $request->get('SHOW_NO_WATERMARK'));
1094
-        $tree->setPreference('SHOW_PARENTS_AGE', (string)(bool)$request->get('SHOW_PARENTS_AGE'));
1094
+        $tree->setPreference('SHOW_PARENTS_AGE', (string) (bool) $request->get('SHOW_PARENTS_AGE'));
1095 1095
         $tree->setPreference('SHOW_PEDIGREE_PLACES', $request->get('SHOW_PEDIGREE_PLACES'));
1096
-        $tree->setPreference('SHOW_PEDIGREE_PLACES_SUFFIX', (string)(bool)$request->get('SHOW_PEDIGREE_PLACES_SUFFIX'));
1096
+        $tree->setPreference('SHOW_PEDIGREE_PLACES_SUFFIX', (string) (bool) $request->get('SHOW_PEDIGREE_PLACES_SUFFIX'));
1097 1097
         $tree->setPreference('SHOW_RELATIVES_EVENTS', implode(',', $request->get('SHOW_RELATIVES_EVENTS', [])));
1098 1098
         $tree->setPreference('SOUR_FACTS_ADD', implode(',', $request->get('SOUR_FACTS_ADD', [])));
1099 1099
         $tree->setPreference('SOUR_FACTS_QUICK', implode(',', $request->get('SOUR_FACTS_QUICK', [])));
1100 1100
         $tree->setPreference('SOUR_FACTS_UNIQUE', implode(',', $request->get('SOUR_FACTS_UNIQUE', [])));
1101
-        $tree->setPreference('SUBLIST_TRIGGER_I', (string)(int)$request->get('SUBLIST_TRIGGER_I', 200));
1101
+        $tree->setPreference('SUBLIST_TRIGGER_I', (string) (int) $request->get('SUBLIST_TRIGGER_I', 200));
1102 1102
         $tree->setPreference('SURNAME_LIST_STYLE', $request->get('SURNAME_LIST_STYLE'));
1103 1103
         $tree->setPreference('SURNAME_TRADITION', $request->get('SURNAME_TRADITION'));
1104 1104
         $tree->setPreference('THEME_DIR', $request->get('THEME_DIR'));
1105
-        $tree->setPreference('USE_SILHOUETTE', (string)(bool)$request->get('USE_SILHOUETTE'));
1105
+        $tree->setPreference('USE_SILHOUETTE', (string) (bool) $request->get('USE_SILHOUETTE'));
1106 1106
         $tree->setPreference('WEBMASTER_USER_ID', $request->get('WEBMASTER_USER_ID'));
1107 1107
         $tree->setPreference('WEBTREES_EMAIL', $request->get('WEBTREES_EMAIL'));
1108 1108
         $tree->setPreference('title', $request->get('title'));
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
 
1608 1608
         foreach ($gedcom_files as $gedcom_file) {
1609 1609
             // Only import files that have changed
1610
-            $filemtime = (string)filemtime(WT_DATA_DIR . $gedcom_file);
1610
+            $filemtime = (string) filemtime(WT_DATA_DIR . $gedcom_file);
1611 1611
 
1612 1612
             $tree = Tree::findByName($gedcom_file) ?? Tree::create($gedcom_file, $gedcom_file);
1613 1613
 
@@ -1640,7 +1640,7 @@  discard block
 block discarded – undo
1640 1640
      */
1641 1641
     public function unconnected(Request $request, Tree $tree, User $user): Response
1642 1642
     {
1643
-        $associates = (bool)$request->get('associates');
1643
+        $associates = (bool) $request->get('associates');
1644 1644
 
1645 1645
         if ($associates) {
1646 1646
             $sql = "SELECT l_from, l_to FROM `##link` WHERE l_file = :tree_id AND l_type IN ('FAMS', 'FAMC', 'ASSO', '_ASSO')";
Please login to merge, or discard this patch.
app/Http/Controllers/HomePageController.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function treePageBlockEdit(Request $request, Tree $tree, User $user): Response
49 49
     {
50
-        $block_id = (int)$request->get('block_id');
50
+        $block_id = (int) $request->get('block_id');
51 51
         $block    = $this->treeBlock($request, $user);
52 52
         $title    = $block->getTitle() . ' — ' . I18N::translate('Preferences');
53 53
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function treePageBlockUpdate(Request $request, Tree $tree, User $user): RedirectResponse
73 73
     {
74
-        $block_id = (int)$request->get('block_id');
74
+        $block_id = (int) $request->get('block_id');
75 75
         $block    = $this->treeBlock($request, $user);
76 76
 
77 77
         $block->configureBlock($tree, $block_id);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     private function treeBlock(Request $request, User $user): ModuleBlockInterface
91 91
     {
92
-        $block_id = (int)$request->get('block_id');
92
+        $block_id = (int) $request->get('block_id');
93 93
 
94 94
         $block_info = Database::prepare(
95 95
             "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id"
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function userPageBlockEdit(Request $request, Tree $tree, User $user): Response
127 127
     {
128
-        $block_id = (int)$request->get('block_id');
128
+        $block_id = (int) $request->get('block_id');
129 129
         $block    = $this->userBlock($request, $user);
130 130
         $title    = $block->getTitle() . ' — ' . I18N::translate('Preferences');
131 131
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function userPageBlockUpdate(Request $request, Tree $tree, User $user): RedirectResponse
150 150
     {
151
-        $block_id = (int)$request->get('block_id');
151
+        $block_id = (int) $request->get('block_id');
152 152
         $block    = $this->userBlock($request, $user);
153 153
 
154 154
         $block->configureBlock($tree, $block_id);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     private function userBlock(Request $request, User $user): ModuleBlockInterface
168 168
     {
169
-        $block_id = (int)$request->get('block_id');
169
+        $block_id = (int) $request->get('block_id');
170 170
 
171 171
         $block_info = Database::prepare(
172 172
             "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id"
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             throw new NotFoundHttpException($block_info->module_name . ' is not a block');
185 185
         }
186 186
 
187
-        $block_owner_id = (int)$block_info->user_id;
187
+        $block_owner_id = (int) $block_info->user_id;
188 188
 
189 189
         if ($block_owner_id !== $user->getUserId() && !Auth::isAdmin()) {
190 190
             throw new AccessDeniedHttpException('You are not allowed to edit this block');
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function treePageBlock(Request $request, Tree $tree): Response
232 232
     {
233
-        $block_id = (int)$request->get('block_id');
233
+        $block_id = (int) $request->get('block_id');
234 234
 
235 235
         $block = Database::prepare(
236 236
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id = :tree_id AND user_id IS NULL"
@@ -296,8 +296,8 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function treePageDefaultUpdate(Request $request): RedirectResponse
298 298
     {
299
-        $main_blocks = (array)$request->get('main');
300
-        $side_blocks = (array)$request->get('side');
299
+        $main_blocks = (array) $request->get('main');
300
+        $side_blocks = (array) $request->get('side');
301 301
 
302 302
         $this->updateTreeBlocks(-1, $main_blocks, $side_blocks);
303 303
 
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
      */
342 342
     public function treePageUpdate(Request $request, Tree $tree): RedirectResponse
343 343
     {
344
-        $defaults = (bool)$request->get('defaults');
344
+        $defaults = (bool) $request->get('defaults');
345 345
 
346 346
         if ($defaults) {
347 347
             $main_blocks = $this->getBlocksForTreePage(-1, AUth::PRIV_NONE, 'main');
348 348
             $side_blocks = $this->getBlocksForTreePage(-1, Auth::PRIV_NONE, 'side');
349 349
         } else {
350
-            $main_blocks = (array)$request->get('main');
351
-            $side_blocks = (array)$request->get('side');
350
+            $main_blocks = (array) $request->get('main');
351
+            $side_blocks = (array) $request->get('side');
352 352
         }
353 353
 
354 354
         $this->updateTreeBlocks($tree->getTreeId(), $main_blocks, $side_blocks);
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public function userPageBlock(Request $request, Tree $tree, User $user): Response
397 397
     {
398
-        $block_id = (int)$request->get('block_id');
398
+        $block_id = (int) $request->get('block_id');
399 399
 
400 400
         $block = Database::prepare(
401 401
             "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id IS NULL AND user_id = :user_id"
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
      */
461 461
     public function userPageDefaultUpdate(Request $request): RedirectResponse
462 462
     {
463
-        $main_blocks = (array)$request->get('main');
464
-        $side_blocks = (array)$request->get('side');
463
+        $main_blocks = (array) $request->get('main');
464
+        $side_blocks = (array) $request->get('side');
465 465
 
466 466
         $this->updateUserBlocks(-1, $main_blocks, $side_blocks);
467 467
 
@@ -507,14 +507,14 @@  discard block
 block discarded – undo
507 507
      */
508 508
     public function userPageUpdate(Request $request, Tree $tree, User $user): RedirectResponse
509 509
     {
510
-        $defaults = (bool)$request->get('defaults');
510
+        $defaults = (bool) $request->get('defaults');
511 511
 
512 512
         if ($defaults) {
513 513
             $main_blocks = $this->getBlocksForUserPage(-1, -1, AUth::PRIV_NONE, 'main');
514 514
             $side_blocks = $this->getBlocksForUserPage(-1, -1, Auth::PRIV_NONE, 'side');
515 515
         } else {
516
-            $main_blocks = (array)$request->get('main');
517
-            $side_blocks = (array)$request->get('side');
516
+            $main_blocks = (array) $request->get('main');
517
+            $side_blocks = (array) $request->get('side');
518 518
         }
519 519
 
520 520
         $this->updateUserBlocks($user->getUserId(), $main_blocks, $side_blocks);
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public function userPageUserEdit(Request $request): Response
533 533
     {
534
-        $user_id     = (int)$request->get('user_id');
534
+        $user_id     = (int) $request->get('user_id');
535 535
         $user        = User::find($user_id);
536 536
         $main_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'main');
537 537
         $side_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'side');
@@ -560,9 +560,9 @@  discard block
 block discarded – undo
560 560
      */
561 561
     public function userPageUserUpdate(Request $request): RedirectResponse
562 562
     {
563
-        $user_id     = (int)$request->get('user_id');
564
-        $main_blocks = (array)$request->get('main');
565
-        $side_blocks = (array)$request->get('side');
563
+        $user_id     = (int) $request->get('user_id');
564
+        $main_blocks = (array) $request->get('main');
565
+        $side_blocks = (array) $request->get('side');
566 566
 
567 567
         $this->updateUserBlocks($user_id, $main_blocks, $side_blocks);
568 568
 
Please login to merge, or discard this patch.
app/Http/Controllers/AdminSiteController.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -263,35 +263,35 @@  discard block
 block discarded – undo
263 263
 
264 264
         $args = [];
265 265
         if ($search) {
266
-            $sql            .= " AND log_message LIKE CONCAT('%', :search, '%')";
266
+            $sql .= " AND log_message LIKE CONCAT('%', :search, '%')";
267 267
             $args['search'] = $search;
268 268
         }
269 269
         if ($from) {
270
-            $sql          .= " AND log_time >= :from";
270
+            $sql .= " AND log_time >= :from";
271 271
             $args['from'] = $from;
272 272
         }
273 273
         if ($to) {
274
-            $sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
274
+            $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
275 275
             $args['to'] = $to;
276 276
         }
277 277
         if ($type) {
278
-            $sql          .= " AND log_type = :type";
278
+            $sql .= " AND log_type = :type";
279 279
             $args['type'] = $type;
280 280
         }
281 281
         if ($text) {
282
-            $sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
282
+            $sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
283 283
             $args['text'] = $text;
284 284
         }
285 285
         if ($ip) {
286
-            $sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
286
+            $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
287 287
             $args['ip'] = $ip;
288 288
         }
289 289
         if ($username) {
290
-            $sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
290
+            $sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
291 291
             $args['user'] = $username;
292 292
         }
293 293
         if ($gedc) {
294
-            $sql          .= " AND gedcom_name = :gedc";
294
+            $sql .= " AND gedcom_name = :gedc";
295 295
             $args['gedc'] = $gedc;
296 296
         }
297 297
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         }
318 318
 
319 319
         if ($length) {
320
-            $sql            .= " LIMIT :limit OFFSET :offset";
320
+            $sql .= " LIMIT :limit OFFSET :offset";
321 321
             $args['limit']  = $length;
322 322
             $args['offset'] = $start;
323 323
         }
@@ -375,35 +375,35 @@  discard block
 block discarded – undo
375 375
 
376 376
         $args = [];
377 377
         if ($search) {
378
-            $sql            .= " AND log_message LIKE CONCAT('%', :search, '%')";
378
+            $sql .= " AND log_message LIKE CONCAT('%', :search, '%')";
379 379
             $args['search'] = $search;
380 380
         }
381 381
         if ($from) {
382
-            $sql          .= " AND log_time >= :from";
382
+            $sql .= " AND log_time >= :from";
383 383
             $args['from'] = $from;
384 384
         }
385 385
         if ($to) {
386
-            $sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
386
+            $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
387 387
             $args['to'] = $to;
388 388
         }
389 389
         if ($type) {
390
-            $sql          .= " AND log_type = :type";
390
+            $sql .= " AND log_type = :type";
391 391
             $args['type'] = $type;
392 392
         }
393 393
         if ($text) {
394
-            $sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
394
+            $sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
395 395
             $args['text'] = $text;
396 396
         }
397 397
         if ($ip) {
398
-            $sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
398
+            $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
399 399
             $args['ip'] = $ip;
400 400
         }
401 401
         if ($username) {
402
-            $sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
402
+            $sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
403 403
             $args['user'] = $username;
404 404
         }
405 405
         if ($gedc) {
406
-            $sql          .= " AND gedcom_name = :gedc";
406
+            $sql .= " AND gedcom_name = :gedc";
407 407
             $args['gedc'] = $gedc;
408 408
         }
409 409
 
@@ -436,31 +436,31 @@  discard block
 block discarded – undo
436 436
 
437 437
         $args = [];
438 438
         if ($from) {
439
-            $sql          .= " AND log_time >= :from";
439
+            $sql .= " AND log_time >= :from";
440 440
             $args['from'] = $from;
441 441
         }
442 442
         if ($to) {
443
-            $sql        .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
443
+            $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day
444 444
             $args['to'] = $to;
445 445
         }
446 446
         if ($type) {
447
-            $sql          .= " AND log_type = :type";
447
+            $sql .= " AND log_type = :type";
448 448
             $args['type'] = $type;
449 449
         }
450 450
         if ($text) {
451
-            $sql          .= " AND log_message LIKE CONCAT('%', :text, '%')";
451
+            $sql .= " AND log_message LIKE CONCAT('%', :text, '%')";
452 452
             $args['text'] = $text;
453 453
         }
454 454
         if ($ip) {
455
-            $sql        .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
455
+            $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')";
456 456
             $args['ip'] = $ip;
457 457
         }
458 458
         if ($username) {
459
-            $sql          .= " AND user_name LIKE CONCAT('%', :user, '%')";
459
+            $sql .= " AND user_name LIKE CONCAT('%', :user, '%')";
460 460
             $args['user'] = $username;
461 461
         }
462 462
         if ($gedc) {
463
-            $sql          .= " AND gedcom_name = :gedc";
463
+            $sql .= " AND gedcom_name = :gedc";
464 464
             $args['gedc'] = $gedc;
465 465
         }
466 466
 
Please login to merge, or discard this patch.
app/Tree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -294,7 +294,7 @@
 block discarded – undo
294 294
     public static function getAll()
295 295
     {
296 296
         if (empty(self::$trees)) {
297
-            $rows        = Database::prepare(
297
+            $rows = Database::prepare(
298 298
                 "SELECT g.gedcom_id AS tree_id, g.gedcom_name AS tree_name, gs1.setting_value AS tree_title" .
299 299
                 " FROM `##gedcom` g" .
300 300
                 " LEFT JOIN `##gedcom_setting`      gs1 ON (g.gedcom_id=gs1.gedcom_id AND gs1.setting_name='title')" .
Please login to merge, or discard this patch.
app/Http/Controllers/TimelineChartController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $this->checkModuleIsActive($tree, 'timeline_chart');
62 62
 
63
-        $scale = (int)$request->get('scale', self::SCALE_DEFAULT);
63
+        $scale = (int) $request->get('scale', self::SCALE_DEFAULT);
64 64
         $scale = min($scale, self::SCALE_MAX);
65 65
         $scale = max($scale, self::SCALE_MIN);
66 66
 
67
-        $xrefs = (array)$request->get('xrefs', []);
67
+        $xrefs = (array) $request->get('xrefs', []);
68 68
         $xrefs = array_unique($xrefs);
69 69
         $xrefs = array_filter($xrefs, function (string $xref) use ($tree): bool {
70 70
             $individual = Individual::getInstance($xref, $tree);
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 
101 101
         $zoom_in_url = route('timeline', [
102 102
             'ged'   => $tree->getName(),
103
-            'scale' => min(self::SCALE_MAX, $scale + (int)($scale * 0.2 + 1)),
103
+            'scale' => min(self::SCALE_MAX, $scale + (int) ($scale * 0.2 + 1)),
104 104
             'xrefs' => $xrefs,
105 105
         ]);
106 106
 
107 107
         $zoom_out_url = route('timeline', [
108 108
             'route' => 'timeline',
109 109
             'ged'   => $tree->getName(),
110
-            'scale' => max(self::SCALE_MIN, $scale - (int)($scale * 0.2 + 1)),
110
+            'scale' => max(self::SCALE_MIN, $scale - (int) ($scale * 0.2 + 1)),
111 111
             'xrefs' => $xrefs,
112 112
         ]);
113 113
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $this->checkModuleIsActive($tree, 'timeline_chart');
134 134
 
135
-        $scale = (int)$request->get('scale', self::SCALE_DEFAULT);
135
+        $scale = (int) $request->get('scale', self::SCALE_DEFAULT);
136 136
         $scale = min($scale, self::SCALE_MAX);
137 137
         $scale = max($scale, self::SCALE_MIN);
138 138
 
139
-        $xrefs = (array)$request->get('xrefs', []);
139
+        $xrefs = (array) $request->get('xrefs', []);
140 140
         $xrefs = array_unique($xrefs);
141 141
 
142 142
         /** @var Individual[] $individuals */
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             return $individual !== null && $individual->canShow();
149 149
         });
150 150
 
151
-        $baseyear    = (int)date('Y');
151
+        $baseyear    = (int) date('Y');
152 152
         $topyear     = 0;
153 153
         $indifacts   = [];
154 154
         $birthyears  = [];
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                         $topyear  = max($topyear, $date->y);
184 184
 
185 185
                         if (!$individual->isDead()) {
186
-                            $topyear = max($topyear, (int)date('Y'));
186
+                            $topyear = max($topyear, (int) date('Y'));
187 187
                         }
188 188
 
189 189
                         // do not add the same fact twice (prevents marriages from being added multiple times)
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
 
198 198
         if ($scale === 0) {
199
-            $scale = (int)(($topyear - $baseyear) / 20 * count($indifacts) / 4);
199
+            $scale = (int) (($topyear - $baseyear) / 20 * count($indifacts) / 4);
200 200
             if ($scale < 6) {
201 201
                 $scale = 6;
202 202
             }
Please login to merge, or discard this patch.
app/Services/UpgradeService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     {
74 74
         $latest_version = $this->fetchLatestVersion();
75 75
 
76
-        list(, , $url) = explode('|', $latest_version . '||');
76
+        list(,, $url) = explode('|', $latest_version . '||');
77 77
 
78 78
         return $url;
79 79
     }
Please login to merge, or discard this patch.
app/Http/Controllers/AdminUsersController.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function cleanup(Request $request): Response
52 52
     {
53
-        $months = (int)$request->get('months', 6);
53
+        $months = (int) $request->get('months', 6);
54 54
 
55 55
         $inactive_threshold   = time() - $months * 30 * self::SECONDS_PER_DAY;
56 56
         $unverified_threshold = time() - 7 * self::SECONDS_PER_DAY;
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 
60 60
         $inactive_users = array_filter($users, function (User $user) use ($inactive_threshold): bool {
61 61
             if ($user->getPreference('sessiontime') === '0') {
62
-                $datelogin = (int)$user->getPreference('reg_timestamp');
62
+                $datelogin = (int) $user->getPreference('reg_timestamp');
63 63
             } else {
64
-                $datelogin = (int)$user->getPreference('sessiontime');
64
+                $datelogin = (int) $user->getPreference('sessiontime');
65 65
             }
66 66
 
67 67
             return $datelogin < $inactive_threshold && $user->getPreference('verified');
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
         $unverified_users = array_filter($users, function (User $user) use ($unverified_threshold): bool {
71 71
             if ($user->getPreference('sessiontime') === '0') {
72
-                $datelogin = (int)$user->getPreference('reg_timestamp');
72
+                $datelogin = (int) $user->getPreference('reg_timestamp');
73 73
             } else {
74
-                $datelogin = (int)$user->getPreference('sessiontime');
74
+                $datelogin = (int) $user->getPreference('sessiontime');
75 75
             }
76 76
 
77 77
             return $datelogin < $unverified_threshold && !$user->getPreference('verified');
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function cleanupAction(Request $request): RedirectResponse
99 99
     {
100 100
         foreach (User::all() as $user) {
101
-            if ((bool)$request->get('del_' . $user->getUserId())) {
101
+            if ((bool) $request->get('del_' . $user->getUserId())) {
102 102
                 Log::addAuthenticationLog('Deleted user: ' . $user->getUserName());
103 103
                 $user->delete();
104 104
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $all_users = User::all();
125 125
 
126
-        $page_size = (int)$user->getPreference(' admin_users_page_size', 10);
126
+        $page_size = (int) $user->getPreference(' admin_users_page_size', 10);
127 127
 
128 128
         $title = I18N::translate('User administration');
129 129
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     public function data(Request $request, User $user): JsonResponse
146 146
     {
147 147
         $search = $request->get('search')['value'];
148
-        $start  = (int)$request->get('start');
149
-        $length = (int)$request->get('length');
148
+        $start  = (int) $request->get('start');
149
+        $length = (int) $request->get('length');
150 150
         $order  = $request->get('order', []);
151
-        $draw   = (int)$request->get('draw');
151
+        $draw   = (int) $request->get('draw');
152 152
 
153 153
         $sql_select =
154 154
             "SELECT SQL_CALC_FOUND_ROWS u.user_id, user_name, real_name, email, us1.setting_value AS language, us2.setting_value AS registered_at, us3.setting_value AS active_at, us4.setting_value AS verified, us5.setting_value AS verified_by_admin" .
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $args = [];
164 164
 
165 165
         if ($search) {
166
-            $sql_select       .= " AND (user_name LIKE CONCAT('%', :search_1, '%') OR real_name LIKE CONCAT('%', :search_2, '%') OR email LIKE CONCAT('%', :search_3, '%'))";
166
+            $sql_select .= " AND (user_name LIKE CONCAT('%', :search_1, '%') OR real_name LIKE CONCAT('%', :search_2, '%') OR email LIKE CONCAT('%', :search_3, '%'))";
167 167
             $args['search_1'] = $search;
168 168
             $args['search_2'] = $search;
169 169
             $args['search_3'] = $search;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         if ($length) {
194 194
             $user->setPreference('admin_users_page_size', $length);
195
-            $sql_select     .= " LIMIT :limit OFFSET :offset";
195
+            $sql_select .= " LIMIT :limit OFFSET :offset";
196 196
             $args['limit']  = $length;
197 197
             $args['offset'] = $start;
198 198
         }
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
         $rows = Database::prepare($sql_select)->execute($args)->fetchAll();
201 201
 
202 202
         // Total filtered/unfiltered rows
203
-        $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
204
-        $recordsTotal    = (int)Database::prepare("SELECT COUNT(*) FROM `##user` WHERE user_id > 0")->fetchOne();
203
+        $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
204
+        $recordsTotal    = (int) Database::prepare("SELECT COUNT(*) FROM `##user` WHERE user_id > 0")->fetchOne();
205 205
 
206 206
         $installed_languages = [];
207 207
         foreach (I18N::installedLocales() as $installed_locale) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function edit(Request $request): Response
291 291
     {
292
-        $user_id = (int)$request->get('user_id');
292
+        $user_id = (int) $request->get('user_id');
293 293
         $user    = User::find($user_id);
294 294
 
295 295
         if ($user === null) {
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function update(Request $request, User $user): RedirectResponse
374 374
     {
375
-        $user_id        = (int)$request->get('user_id');
375
+        $user_id        = (int) $request->get('user_id');
376 376
         $username       = $request->get('username');
377 377
         $real_name      = $request->get('real_name');
378 378
         $email          = $request->get('email');
@@ -382,11 +382,11 @@  discard block
 block discarded – undo
382 382
         $timezone       = $request->get('timezone');
383 383
         $contact_method = $request->get('contact_method');
384 384
         $comment        = $request->get('comment');
385
-        $auto_accept    = (bool)$request->get('auto_accept');
386
-        $canadmin       = (bool)$request->get('canadmin');
387
-        $visible_online = (bool)$request->get('visible_online');
388
-        $verified       = (bool)$request->get('verified');
389
-        $approved       = (bool)$request->get('approved');
385
+        $auto_accept    = (bool) $request->get('auto_accept');
386
+        $canadmin       = (bool) $request->get('canadmin');
387
+        $visible_online = (bool) $request->get('visible_online');
388
+        $verified       = (bool) $request->get('verified');
389
+        $approved       = (bool) $request->get('approved');
390 390
 
391 391
         $edit_user = User::find($user_id);
392 392
 
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
             ->setPreference('TIMEZONE', $timezone)
404 404
             ->setPreference('contactmethod', $contact_method)
405 405
             ->setPreference('comment', $comment)
406
-            ->setPreference('auto_accept', (string)$auto_accept)
407
-            ->setPreference('visibleonline', (string)$visible_online)
408
-            ->setPreference('verified', (string)$verified)
409
-            ->setPreference('verified_by_admin', (string)$approved);
406
+            ->setPreference('auto_accept', (string) $auto_accept)
407
+            ->setPreference('visibleonline', (string) $visible_online)
408
+            ->setPreference('verified', (string) $verified)
409
+            ->setPreference('verified_by_admin', (string) $approved);
410 410
 
411 411
         if ($pass1 !== '') {
412 412
             $edit_user->setPassword($pass1);
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         }
419 419
 
420 420
         foreach (Tree::getAll() as $tree) {
421
-            $path_length = (int)$request->get('RELATIONSHIP_PATH_LENGTH' . $tree->getTreeId());
421
+            $path_length = (int) $request->get('RELATIONSHIP_PATH_LENGTH' . $tree->getTreeId());
422 422
             $gedcom_id   = $request->get('gedcomid' . $tree->getTreeId(), '');
423 423
             $can_edit    = $request->get('canedit' . $tree->getTreeId(), '');
424 424
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 
430 430
             $tree->setUserPreference($edit_user, 'gedcomid', $gedcom_id);
431 431
             $tree->setUserPreference($edit_user, 'canedit', $can_edit);
432
-            $tree->setUserPreference($edit_user, 'RELATIONSHIP_PATH_LENGTH', (string)$path_length);
432
+            $tree->setUserPreference($edit_user, 'RELATIONSHIP_PATH_LENGTH', (string) $path_length);
433 433
         }
434 434
 
435 435
         $url = route('admin-users');
Please login to merge, or discard this patch.
app/Functions/FunctionsPrintLists.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 } else {
54 54
                     $size = 75.0 + 125.0 * ($count - $minimum) / ($maximum - $minimum);
55 55
                 }
56
-                $url  = route($route, [
56
+                $url = route($route, [
57 57
                     'surname' => $surn,
58 58
                     'ged'     => $tree->getName(),
59 59
                 ]);
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
                 }
131 131
                 $newcol = ceil($count / $col);
132 132
                 $html2  = '<table class="list_table"><tr>';
133
-                $html2  .= '<td class="list_value" style="padding: 14px;">';
133
+                $html2 .= '<td class="list_value" style="padding: 14px;">';
134 134
 
135 135
                 foreach ($html as $surns) {
136 136
                     $html2 .= $surns . '<br>';
137 137
                     $i++;
138 138
                     if ($i == $newcol && $i < $count) {
139
-                        $html2  .= '</td><td class="list_value" style="padding: 14px;">';
139
+                        $html2 .= '</td><td class="list_value" style="padding: 14px;">';
140 140
                         $newcol = $i + ceil($count / $col);
141 141
                     }
142 142
                 }
Please login to merge, or discard this patch.
app/Functions/FunctionsDb.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         // Convert the query into a SQL expression
79 79
         foreach ($query as $n => $q) {
80
-            $sql                   .= " AND n_full COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')";
80
+            $sql .= " AND n_full COLLATE :collate_" . $n . " LIKE CONCAT('%', :query_" . $n . ", '%')";
81 81
             $args['collate_' . $n] = I18N::collation();
82 82
             $args['query_' . $n]   = Database::escapeLike($q);
83 83
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $sql                   .= ":tree_id_" . $n;
89 89
             $args['tree_id_' . $n] = $tree->getTreeId();
90 90
         }
91
-        $sql  .= ")";
91
+        $sql .= ")";
92 92
         $list = [];
93 93
         $rows = Database::prepare($sql)->execute($args)->fetchAll();
94 94
         foreach ($rows as $row) {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $sql .= ")";
165 165
 
166 166
         if ($givn_sdx !== '') {
167
-            $sql      .= " AND (";
167
+            $sql .= " AND (";
168 168
             $givn_sdx = explode(':', $givn_sdx);
169 169
             foreach ($givn_sdx as $n => $sdx) {
170 170
                 $sql .= $n ? " OR " : "";
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         }
183 183
 
184 184
         if ($surn_sdx !== '') {
185
-            $sql      .= " AND (";
185
+            $sql .= " AND (";
186 186
             $surn_sdx = explode(':', $surn_sdx);
187 187
             foreach ($surn_sdx as $n => $sdx) {
188 188
                 $sql .= $n ? " OR " : "";
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         }
201 201
 
202 202
         if ($plac_sdx !== '') {
203
-            $sql      .= " AND (";
203
+            $sql .= " AND (";
204 204
             $plac_sdx = explode(':', $plac_sdx);
205 205
             foreach ($plac_sdx as $n => $sdx) {
206 206
                 $sql .= $n ? " OR " : "";
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                 "SELECT DISTINCT f_id AS xref, f_gedcom AS gedcom, d_type, d_day, d_month, d_year, d_fact" .
260 260
                 " FROM `##dates` JOIN `##families` ON d_gid = f_id AND d_file = f_file" .
261 261
                 " WHERE d_type = :type AND d_file = :tree_id";
262
-            $args    = [
262
+            $args = [
263 263
                 'type'    => $anniv->format('%@'),
264 264
                 'tree_id' => $tree->getTreeId(),
265 265
             ];
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
                     $where       .= " AND d_day = :day";
290 290
                     $args['day'] = $anniv->d;
291 291
                 }
292
-                $where         .= " AND d_mon = :month";
292
+                $where .= " AND d_mon = :month";
293 293
                 $args['month'] = $anniv->m;
294 294
             } else {
295 295
                 // SPECIAL CASES:
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                         } elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) {
304 304
                             $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2";
305 305
                         } else {
306
-                            $where       .= " AND d_day = :day AND d_mon = 2";
306
+                            $where .= " AND d_day = :day AND d_mon = 2";
307 307
                             $args['day'] = $anniv->d;
308 308
                         }
309 309
                         break;
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                         } elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) {
327 327
                             $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3";
328 328
                         } else {
329
-                            $where       .= " AND d_day = :day AND d_mon = 3";
329
+                            $where .= " AND d_day = :day AND d_mon = 3";
330 330
                             $args['day'] = $anniv->d;
331 331
                         }
332 332
                         break;
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
                 }
382 382
             }
383 383
             // Only events in the past (includes dates without a year)
384
-            $where        .= " AND d_year <= :year";
384
+            $where .= " AND d_year <= :year";
385 385
             $args['year'] = $anniv->y;
386 386
 
387 387
             if ($facts) {
Please login to merge, or discard this patch.