Completed
Branch develop (b6db7c)
by Greg
09:30
created
app/Http/Controllers/ListController.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     'ged'      => $tree->getName(),
130 130
                     'show_all' => 'yes',
131 131
                 ];
132
-                $show    = $request->get('show', 'surn');
132
+                $show = $request->get('show', 'surn');
133 133
             }
134 134
         } elseif ($surname) {
135 135
             $alpha    = $this->initialLetter($surname); // so we can highlight the initial letter
@@ -208,9 +208,9 @@  discard block
 block discarded – undo
208 208
                     echo '<a href="' . e(route($route, [
209 209
                             'alpha' => $letter,
210 210
                             'ged'   => $tree->getName(),
211
-                        ])) . '" class="wt-initial' . ($letter === $alpha ? ' active' : '') . '" title="' . I18N::number($count) . '">' . $this->surnameInitial((string)$letter) . '</a>';
211
+                        ])) . '" class="wt-initial' . ($letter === $alpha ? ' active' : '') . '" title="' . I18N::number($count) . '">' . $this->surnameInitial((string) $letter) . '</a>';
212 212
                 } else {
213
-                    echo '<span class="wt-initial text-muted">' . $this->surnameInitial((string)$letter) . '</span>';
213
+                    echo '<span class="wt-initial text-muted">' . $this->surnameInitial((string) $letter) . '</span>';
214 214
                 }
215 215
                 echo '</li>';
216 216
             }
@@ -305,12 +305,12 @@  discard block
 block discarded – undo
305 305
                               echo '<li class="wt-initials-list-item">';
306 306
                               if ($count > 0) {
307 307
                                   if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
308
-                                      echo '<a class="wt-initial active" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
308
+                                      echo '<a class="wt-initial active" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string) $givn_initial) . '</a>';
309 309
                                   } else {
310
-                                      echo '<a class="wt-initial" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
310
+                                      echo '<a class="wt-initial" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string) $givn_initial) . '</a>';
311 311
                                   }
312 312
                               } else {
313
-                                  echo '<span class="wt-initial text-muted">' . $this->givenNameInitial((string)$givn_initial) . '</span>';
313
+                                  echo '<span class="wt-initial text-muted">' . $this->givenNameInitial((string) $givn_initial) . '</span>';
314 314
                               }
315 315
                               echo '</li>';
316 316
                           }
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
         $formats = GedcomTag::getFileFormTypes();
373 373
 
374 374
         $action    = $request->get('action');
375
-        $page      = (int)$request->get('page');
376
-        $max       = (int)$request->get('max', 20);
375
+        $page      = (int) $request->get('page');
376
+        $max       = (int) $request->get('max', 20);
377 377
         $folder    = $request->get('folder', '');
378 378
         $filter    = $request->get('filter', '');
379 379
         $subdirs   = $request->get('subdirs', '1');
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
         // Pagination
398 398
         $count = count($media_objects);
399
-        $pages = (int)(($count + $max - 1) / $max);
399
+        $pages = (int) (($count + $max - 1) / $max);
400 400
         $page  = max(min($page, $pages), 1);
401 401
 
402 402
         $media_objects = array_slice($media_objects, ($page - 1) * $max, $max);
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
     private function allMedia(Tree $tree, string $folder, string $subfolders, string $sort, string $filter, string $form_type): array
523 523
     {
524 524
         // All files in the folder, plus external files
525
-        $sql  =
525
+        $sql =
526 526
             "SELECT m_id AS xref, m_gedcom AS gedcom" .
527 527
             " FROM `##media`" .
528 528
             " JOIN `##media_file` USING (m_id, m_file)" .
@@ -541,11 +541,11 @@  discard block
 block discarded – undo
541 541
         // Include / exclude subfolders (but always include external)
542 542
         switch ($subfolders) {
543 543
             case 'include':
544
-                $sql    .= " AND (multimedia_file_refn LIKE CONCAT(?, '%') $sql_external)";
544
+                $sql .= " AND (multimedia_file_refn LIKE CONCAT(?, '%') $sql_external)";
545 545
                 $args[] = Database::escapeLike($folder);
546 546
                 break;
547 547
             case 'exclude':
548
-                $sql    .= " AND (multimedia_file_refn LIKE CONCAT(?, '%') AND multimedia_file_refn NOT LIKE CONCAT(?, '%/%') $sql_external)";
548
+                $sql .= " AND (multimedia_file_refn LIKE CONCAT(?, '%') AND multimedia_file_refn NOT LIKE CONCAT(?, '%/%') $sql_external)";
549 549
                 $args[] = Database::escapeLike($folder);
550 550
                 $args[] = Database::escapeLike($folder);
551 551
                 break;
@@ -553,13 +553,13 @@  discard block
 block discarded – undo
553 553
 
554 554
         // Apply search terms
555 555
         if ($filter) {
556
-            $sql    .= " AND (SUBSTRING_INDEX(multimedia_file_refn, '/', -1) LIKE CONCAT('%', ?, '%') OR descriptive_title LIKE CONCAT('%', ?, '%'))";
556
+            $sql .= " AND (SUBSTRING_INDEX(multimedia_file_refn, '/', -1) LIKE CONCAT('%', ?, '%') OR descriptive_title LIKE CONCAT('%', ?, '%'))";
557 557
             $args[] = Database::escapeLike($filter);
558 558
             $args[] = Database::escapeLike($filter);
559 559
         }
560 560
 
561 561
         if ($form_type) {
562
-            $sql    .= " AND source_media_type = ?";
562
+            $sql .= " AND source_media_type = ?";
563 563
             $args[] = $form_type;
564 564
         }
565 565
 
@@ -1479,7 +1479,7 @@  discard block
 block discarded – undo
1479 1479
         ];
1480 1480
 
1481 1481
         foreach ($this->getAlphabetForLocale(WT_LOCALE) as $n => $letter) {
1482
-            $sql                   .= " AND n_surn COLLATE :collate_" . $n . " NOT LIKE :letter_" . $n;
1482
+            $sql .= " AND n_surn COLLATE :collate_" . $n . " NOT LIKE :letter_" . $n;
1483 1483
             $args['collate_' . $n] = I18N::collation();
1484 1484
             $args['letter_' . $n]  = $letter . '%';
1485 1485
         }
@@ -1500,7 +1500,7 @@  discard block
 block discarded – undo
1500 1500
             'tree_id' => $tree->getTreeId(),
1501 1501
         ];
1502 1502
 
1503
-        $count_no_surname = (int)Database::prepare($sql)->execute($args)->fetchOne();
1503
+        $count_no_surname = (int) Database::prepare($sql)->execute($args)->fetchOne();
1504 1504
         if ($count_no_surname !== 0) {
1505 1505
             // Special code to indicate "no surname"
1506 1506
             $alphas[','] = $count_no_surname;
@@ -1566,7 +1566,7 @@  discard block
 block discarded – undo
1566 1566
         ];
1567 1567
 
1568 1568
         if ($surn) {
1569
-            $sql               .= " AND n_surn COLLATE :collate_1 = :surn";
1569
+            $sql .= " AND n_surn COLLATE :collate_1 = :surn";
1570 1570
             $args['collate_1'] = I18N::collation();
1571 1571
             $args['surn']      = $surn;
1572 1572
         } elseif ($salpha === ',') {
@@ -1619,7 +1619,7 @@  discard block
 block discarded – undo
1619 1619
         ];
1620 1620
 
1621 1621
         if ($surn) {
1622
-            $sql               .= " AND n_surn COLLATE :collate_1 = :surn";
1622
+            $sql .= " AND n_surn COLLATE :collate_1 = :surn";
1623 1623
             $args['collate_1'] = I18N::collation();
1624 1624
             $args['surn']      = $surn;
1625 1625
         } elseif ($salpha === ',') {
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
             // All surnames
1633 1633
             $sql .= " AND n_surn NOT IN ('', '@N.N.')";
1634 1634
         }
1635
-        $sql               .= " GROUP BY n_surn COLLATE :collate_2, n_file) AS n2 ON (n1.n_surn = n2.n_surn COLLATE :collate_3 AND n1.n_file = n2.n_file)";
1635
+        $sql .= " GROUP BY n_surn COLLATE :collate_2, n_file) AS n2 ON (n1.n_surn = n2.n_surn COLLATE :collate_3 AND n1.n_file = n2.n_file)";
1636 1636
         $args['collate_2'] = I18N::collation();
1637 1637
         $args['collate_3'] = I18N::collation();
1638 1638
 
@@ -1674,7 +1674,7 @@  discard block
 block discarded – undo
1674 1674
         ];
1675 1675
 
1676 1676
         if ($surn) {
1677
-            $sql               .= " AND n_surn COLLATE :collate_1 = :surn";
1677
+            $sql .= " AND n_surn COLLATE :collate_1 = :surn";
1678 1678
             $args['collate_1'] = I18N::collation();
1679 1679
             $args['surn']      = $surn;
1680 1680
         } elseif ($salpha === ',') {
@@ -1691,7 +1691,7 @@  discard block
 block discarded – undo
1691 1691
             $sql .= " AND " . $this->getInitialSql('n_givn', $galpha);
1692 1692
         }
1693 1693
 
1694
-        $sql               .= " ORDER BY CASE n_surn WHEN '@N.N.' THEN 1 ELSE 0 END, n_surn COLLATE :collate_2, CASE n_givn WHEN '@P.N.' THEN 1 ELSE 0 END, n_givn COLLATE :collate_3";
1694
+        $sql .= " ORDER BY CASE n_surn WHEN '@N.N.' THEN 1 ELSE 0 END, n_surn COLLATE :collate_2, CASE n_givn WHEN '@P.N.' THEN 1 ELSE 0 END, n_givn COLLATE :collate_3";
1695 1695
         $args['collate_2'] = I18N::collation();
1696 1696
         $args['collate_3'] = I18N::collation();
1697 1697
 
Please login to merge, or discard this patch.
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -260,91 +260,91 @@
 block discarded – undo
260 260
 			<div class="wt-page-content">
261 261
           <?php
262 262
 
263
-          if ($show === 'indi' || $show === 'surn') {
264
-              $surns = $this->surnames($tree, $surname, $alpha, $show_marnm === 'yes', $families);
265
-              if ($show === 'surn') {
266
-                  // Show the surname list
267
-                  switch ($tree->getPreference('SURNAME_LIST_STYLE')) {
268
-                      case 'style1':
263
+            if ($show === 'indi' || $show === 'surn') {
264
+                $surns = $this->surnames($tree, $surname, $alpha, $show_marnm === 'yes', $families);
265
+                if ($show === 'surn') {
266
+                    // Show the surname list
267
+                    switch ($tree->getPreference('SURNAME_LIST_STYLE')) {
268
+                        case 'style1':
269 269
                           echo FunctionsPrintLists::surnameList($surns, 3, true, $route, $tree);
270
-                          break;
271
-                      case 'style3':
270
+                            break;
271
+                        case 'style3':
272 272
                           echo FunctionsPrintLists::surnameTagCloud($surns, $route, true, $tree);
273
-                          break;
274
-                      case 'style2':
273
+                            break;
274
+                        case 'style2':
275 275
                       default:
276 276
                           echo view('lists/surnames-table', [
277
-                              'surnames' => $surns,
278
-                              'route'    => $route,
279
-                          ]);
280
-                          break;
281
-                  }
282
-              } else {
283
-                  // Show the list
284
-                  $count = 0;
285
-                  foreach ($surns as $surnames) {
286
-                      foreach ($surnames as $list) {
287
-                          $count += count($list);
288
-                      }
289
-                  }
290
-                  // Don't sublists short lists.
291
-                  if ($count < $tree->getPreference('SUBLIST_TRIGGER_I')) {
292
-                      $falpha = '';
293
-                  } else {
294
-                      $givn_initials = $this->givenAlpha($tree, $surname, $alpha, $show_marnm === 'yes', $families);
295
-                      // Break long lists by initial letter of given name
296
-                      if ($surname || $show_all === 'yes') {
297
-                          if ($show_all === 'no') {
298
-                              echo '<h2 class="wt-page-title">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
299
-                          }
300
-                          // Don't show the list until we have some filter criteria
301
-                          $show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
302
-                          $list = [];
303
-                          echo '<ul class="d-flex flex-wrap justify-content-center wt-initials-list">';
304
-                          foreach ($givn_initials as $givn_initial => $count) {
305
-                              echo '<li class="wt-initials-list-item">';
306
-                              if ($count > 0) {
307
-                                  if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
308
-                                      echo '<a class="wt-initial active" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
309
-                                  } else {
310
-                                      echo '<a class="wt-initial" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
311
-                                  }
312
-                              } else {
313
-                                  echo '<span class="wt-initial text-muted">' . $this->givenNameInitial((string)$givn_initial) . '</span>';
314
-                              }
315
-                              echo '</li>';
316
-                          }
317
-                          // Search spiders don't get the "show all" option as the other links give them everything.
318
-                          if (Session::has('initiated')) {
319
-                              echo '<li class="wt-initials-list-item">';
320
-                              if ($show_all_firstnames === 'yes') {
321
-                                  echo '<span class="wt-initial warning">' . I18N::translate('All') . '</span>';
322
-                              } else {
323
-                                  echo '<a class="wt-initial" href="' . e(route($route, ['show_all_firstnames' => 'yes'] + $params)) . '" title="' . I18N::number($count) . '">' . I18N::translate('All') . '</a>';
324
-                              }
325
-                              echo '</li>';
326
-                          }
327
-                          echo '</ul>';
328
-                          echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
329
-                      }
330
-                  }
331
-                  if ($show === 'indi') {
332
-                      if ($route === 'individual-list') {
333
-                          echo view('lists/individuals-table', [
334
-                              'individuals' => $this->individuals($tree, $surname, $alpha, $falpha, $show_marnm === 'yes', false),
335
-                              'sosa'        => false,
336
-                              'tree'        => $tree,
337
-                          ]);
338
-                      } else {
339
-                          echo view('lists/families-table', [
340
-                              'families' => $this->families($tree, $surname, $alpha, $falpha, $show_marnm === 'yes'),
341
-                              'tree'     => $tree,
342
-                          ]);
343
-                      }
344
-                  }
345
-              }
346
-          }
347
-          ?>
277
+                                'surnames' => $surns,
278
+                                'route'    => $route,
279
+                            ]);
280
+                            break;
281
+                    }
282
+                } else {
283
+                    // Show the list
284
+                    $count = 0;
285
+                    foreach ($surns as $surnames) {
286
+                        foreach ($surnames as $list) {
287
+                            $count += count($list);
288
+                        }
289
+                    }
290
+                    // Don't sublists short lists.
291
+                    if ($count < $tree->getPreference('SUBLIST_TRIGGER_I')) {
292
+                        $falpha = '';
293
+                    } else {
294
+                        $givn_initials = $this->givenAlpha($tree, $surname, $alpha, $show_marnm === 'yes', $families);
295
+                        // Break long lists by initial letter of given name
296
+                        if ($surname || $show_all === 'yes') {
297
+                            if ($show_all === 'no') {
298
+                                echo '<h2 class="wt-page-title">', I18N::translate('Individuals with surname %s', $legend), '</h2>';
299
+                            }
300
+                            // Don't show the list until we have some filter criteria
301
+                            $show = ($falpha || $show_all_firstnames === 'yes') ? 'indi' : 'none';
302
+                            $list = [];
303
+                            echo '<ul class="d-flex flex-wrap justify-content-center wt-initials-list">';
304
+                            foreach ($givn_initials as $givn_initial => $count) {
305
+                                echo '<li class="wt-initials-list-item">';
306
+                                if ($count > 0) {
307
+                                    if ($show === 'indi' && $givn_initial === $falpha && $show_all_firstnames === 'no') {
308
+                                        echo '<a class="wt-initial active" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
309
+                                    } else {
310
+                                        echo '<a class="wt-initial" href="' . e(route($route, ['falpha' => $givn_initial] + $params)) . '" title="' . I18N::number($count) . '">' . $this->givenNameInitial((string)$givn_initial) . '</a>';
311
+                                    }
312
+                                } else {
313
+                                    echo '<span class="wt-initial text-muted">' . $this->givenNameInitial((string)$givn_initial) . '</span>';
314
+                                }
315
+                                echo '</li>';
316
+                            }
317
+                            // Search spiders don't get the "show all" option as the other links give them everything.
318
+                            if (Session::has('initiated')) {
319
+                                echo '<li class="wt-initials-list-item">';
320
+                                if ($show_all_firstnames === 'yes') {
321
+                                    echo '<span class="wt-initial warning">' . I18N::translate('All') . '</span>';
322
+                                } else {
323
+                                    echo '<a class="wt-initial" href="' . e(route($route, ['show_all_firstnames' => 'yes'] + $params)) . '" title="' . I18N::number($count) . '">' . I18N::translate('All') . '</a>';
324
+                                }
325
+                                echo '</li>';
326
+                            }
327
+                            echo '</ul>';
328
+                            echo '<p class="center alpha_index">', implode(' | ', $list), '</p>';
329
+                        }
330
+                    }
331
+                    if ($show === 'indi') {
332
+                        if ($route === 'individual-list') {
333
+                            echo view('lists/individuals-table', [
334
+                                'individuals' => $this->individuals($tree, $surname, $alpha, $falpha, $show_marnm === 'yes', false),
335
+                                'sosa'        => false,
336
+                                'tree'        => $tree,
337
+                            ]);
338
+                        } else {
339
+                            echo view('lists/families-table', [
340
+                                'families' => $this->families($tree, $surname, $alpha, $falpha, $show_marnm === 'yes'),
341
+                                'tree'     => $tree,
342
+                            ]);
343
+                        }
344
+                    }
345
+                }
346
+            }
347
+            ?>
348 348
 			</div>
349 349
         <?php
350 350
 
Please login to merge, or discard this patch.
app/Http/Controllers/FamilyBookChartController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
         $this->checkIndividualAccess($individual);
56 56
 
57 57
         $minimum_generations = 2;
58
-        $maximum_generations = (int)$tree->getPreference('MAX_DESCENDANCY_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
59
-        $default_generations = (int)$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
58
+        $maximum_generations = (int) $tree->getPreference('MAX_DESCENDANCY_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
59
+        $default_generations = (int) $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
60 60
 
61
-        $show_spouse = (bool)$request->get('show_spouse');
62
-        $generations = (int)$request->get('generations', $default_generations);
61
+        $show_spouse = (bool) $request->get('show_spouse');
62
+        $generations = (int) $request->get('generations', $default_generations);
63 63
         $generations = min($generations, $maximum_generations);
64 64
         $generations = max($generations, $minimum_generations);
65 65
 
66 66
         // Generations of ancestors/descendants in each mini-tree.
67
-        $book_size = (int)$request->get('book_size', 2);
67
+        $book_size = (int) $request->get('book_size', 2);
68 68
         $book_size = min($book_size, 5);
69 69
         $book_size = max($book_size, 2);
70 70
 
@@ -101,20 +101,20 @@  discard block
 block discarded – undo
101 101
         $this->checkIndividualAccess($individual);
102 102
 
103 103
         $minimum_generations = 2;
104
-        $maximum_generations = (int)$tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
105
-        $default_generations = (int)$tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
104
+        $maximum_generations = (int) $tree->getPreference('MAX_PEDIGREE_GENERATIONS', self::DEFAULT_MAXIMUM_GENERATIONS);
105
+        $default_generations = (int) $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS', self::DEFAULT_GENERATIONS);
106 106
 
107
-        $book_size   = (int)$request->get('book_size', 2);
108
-        $show_spouse = (bool)$request->get('show_spouse');
107
+        $book_size   = (int) $request->get('book_size', 2);
108
+        $show_spouse = (bool) $request->get('show_spouse');
109 109
 
110
-        $generations = (int)$request->get('generations', $default_generations);
110
+        $generations = (int) $request->get('generations', $default_generations);
111 111
         $generations = min($generations, $maximum_generations);
112 112
         $generations = max($generations, $minimum_generations);
113 113
         $descendants = $this->descendants($individual, $generations, []);
114 114
 
115 115
         // @TODO - this is just a wrapper around the old code.
116 116
         ob_start();
117
-        $this->box = (object)[
117
+        $this->box = (object) [
118 118
             'width'  => Theme::theme()->parameter('chart-box-x'),
119 119
             'height' => Theme::theme()->parameter('chart-box-y'),
120 120
         ];
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 echo '<table cellspacing="0" cellpadding="0" border="0" >';
174 174
                 foreach ($children as $i => $child) {
175 175
                     echo '<tr><td>';
176
-                    $kids    = $this->printDescendency($child, $generation + 1);
176
+                    $kids = $this->printDescendency($child, $generation + 1);
177 177
                     $numkids += $kids;
178 178
                     echo '</td>';
179 179
                     // Print the lines
Please login to merge, or discard this patch.
app/Http/Controllers/EditMediaController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -512,7 +512,7 @@
 block discarded – undo
512 512
     private function maxUploadFilesize(): string
513 513
     {
514 514
         $bytes = UploadedFile::getMaxFilesize();
515
-        $kb    = (int)($bytes / 1024);
515
+        $kb    = (int) ($bytes / 1024);
516 516
 
517 517
         return I18N::translate('%s KB', I18N::number($kb));
518 518
     }
Please login to merge, or discard this patch.
app/Http/Controllers/CalendarController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -528,7 +528,7 @@
 block discarded – undo
528 528
         $html = '';
529 529
 
530 530
         foreach ($list as $id => $facts) {
531
-            $tmp  = GedcomRecord::getInstance($id, $tree);
531
+            $tmp = GedcomRecord::getInstance($id, $tree);
532 532
             $html .= $tag1 . '<a href="' . e($tmp->url()) . '">' . $tmp->getFullName() . '</a> ';
533 533
             $html .= '<div class="indent">' . $facts . '</div>' . $tag2;
534 534
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
             if (strlen($match[1]) > strlen($match[2])) {
73 73
                 $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2];
74 74
             }
75
-            $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}");
75
+            $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}");
76 76
             $view     = 'year';
77 77
         } else {
78 78
             // advanced-year "decade/century wildcard"
79 79
             if (preg_match('/^(\d+)(\?+)$/', $year, $match)) {
80 80
                 $y1       = $match[1] . str_replace('?', '0', $match[2]);
81 81
                 $y2       = $match[1] . str_replace('?', '9', $match[2]);
82
-                $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}");
82
+                $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}");
83 83
                 $view     = 'year';
84 84
             } else {
85 85
                 if ($year < 0) {
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
             if (strlen($match[1]) > strlen($match[2])) {
192 192
                 $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2];
193 193
             }
194
-            $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}");
194
+            $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}");
195 195
             $view     = 'year';
196 196
         } else {
197 197
             // advanced-year "decade/century wildcard"
198 198
             if (preg_match('/^(\d+)(\?+)$/', $year, $match)) {
199 199
                 $y1       = $match[1] . str_replace('?', '0', $match[2]);
200 200
                 $y2       = $match[1] . str_replace('?', '9', $match[2]);
201
-                $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}");
201
+                $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}");
202 202
                 $view     = 'year';
203 203
             } else {
204 204
                 if ($year < 0) {
Please login to merge, or discard this patch.
app/Http/Controllers/FamilyController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     private function significant(Family $family)
65 65
     {
66
-        $significant = (object)[
66
+        $significant = (object) [
67 67
             'family'     => $family,
68 68
             'individual' => null,
69 69
             'surname'    => '',
Please login to merge, or discard this patch.
app/Http/Controllers/ReportEngineController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                     $input['control'] = FunctionsEdit::formControlSource($tree, $source, $attributes);
122 122
                     break;
123 123
                 case 'DATE':
124
-                    $attributes       += [
124
+                    $attributes += [
125 125
                         'type'  => 'text',
126 126
                         'value' => $input['default'],
127 127
                     ];
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
                 default:
136 136
                     switch ($input['type']) {
137 137
                         case 'text':
138
-                            $attributes       += [
138
+                            $attributes += [
139 139
                                 'type'  => 'text',
140 140
                                 'value' => $input['default'],
141 141
                             ];
142 142
                             $input['control'] = '<input ' . Html::attributes($attributes) . '>';
143 143
                             break;
144 144
                         case 'checkbox':
145
-                            $attributes       += [
145
+                            $attributes += [
146 146
                                 'type'    => 'checkbox',
147
-                                'checked' => (bool)$input['default'],
147
+                                'checked' => (bool) $input['default'],
148 148
                             ];
149 149
                             $input['control'] = '<input ' . Html::attributes($attributes) . '>';
150 150
                             break;
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function delete(Request $request): Response
43 43
     {
44
-        $user_id = (int)$request->get('user_id');
44
+        $user_id = (int) $request->get('user_id');
45 45
 
46 46
         $user = User::find($user_id);
47 47
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function masquerade(Request $request): Response
82 82
     {
83
-        $user_id = (int)$request->get('user_id');
83
+        $user_id = (int) $request->get('user_id');
84 84
 
85 85
         $user = User::find($user_id);
86 86
 
Please login to merge, or discard this patch.
app/Http/Controllers/FanChartController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
         $this->checkIndividualAccess($individual);
66 66
 
67
-        $chart_style = (int)$request->get('chart_style', self::DEFAULT_STYLE);
68
-        $fan_width   = (int)$request->get('fan_width', self::DEFAULT_WIDTH);
69
-        $generations = (int)$request->get('generations', self::DEFAULT_GENERATIONS);
67
+        $chart_style = (int) $request->get('chart_style', self::DEFAULT_STYLE);
68
+        $fan_width   = (int) $request->get('fan_width', self::DEFAULT_WIDTH);
69
+        $generations = (int) $request->get('generations', self::DEFAULT_GENERATIONS);
70 70
 
71 71
         $fan_width = min($fan_width, self::MAXIMUM_WIDTH);
72 72
         $fan_width = max($fan_width, self::MINIMUM_WIDTH);
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 
111 111
         $this->checkIndividualAccess($individual);
112 112
 
113
-        $chart_style = (int)$request->get('chart_style', self::DEFAULT_STYLE);
114
-        $fan_width   = (int)$request->get('fan_width', self::DEFAULT_WIDTH);
115
-        $generations = (int)$request->get('generations', self::DEFAULT_GENERATIONS);
113
+        $chart_style = (int) $request->get('chart_style', self::DEFAULT_STYLE);
114
+        $fan_width   = (int) $request->get('fan_width', self::DEFAULT_WIDTH);
115
+        $generations = (int) $request->get('generations', self::DEFAULT_GENERATIONS);
116 116
 
117 117
         $fan_width = min($fan_width, self::MAXIMUM_WIDTH);
118 118
         $fan_width = max($fan_width, self::MINIMUM_WIDTH);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $scale = $fanw / 640;
142 142
 
143 143
         // Create the image
144
-        $image = imagecreate((int)$fanw, (int)$fanh);
144
+        $image = imagecreate((int) $fanw, (int) $fanh);
145 145
 
146 146
         // Create colors
147 147
         $transparent = imagecolorallocate($image, 0, 0, 0);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         ];
159 159
 
160 160
 
161
-        imagefilledrectangle($image, 0, 0, (int)$fanw, (int)$fanh, $transparent);
161
+        imagefilledrectangle($image, 0, 0, (int) $fanw, (int) $fanh, $transparent);
162 162
 
163 163
         $fandeg = 90 * $chart_style;
164 164
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             // clean current generation area
174 174
             $deg2 = 360 + ($fandeg - 180) / 2;
175 175
             $deg1 = $deg2 - $fandeg;
176
-            imagefilledarc($image, (int)$cx, (int)$cy, (int)$rx, (int)$rx, (int)$deg1, (int)$deg2, $backgrounds['U'], IMG_ARC_PIE);
176
+            imagefilledarc($image, (int) $cx, (int) $cy, (int) $rx, (int) $rx, (int) $deg1, (int) $deg2, $backgrounds['U'], IMG_ARC_PIE);
177 177
             $rx -= 3;
178 178
 
179 179
             // calculate new angle
@@ -203,15 +203,15 @@  discard block
 block discarded – undo
203 203
 
204 204
                     $background = $backgrounds[$person->getSex()];
205 205
 
206
-                    imagefilledarc($image, (int)$cx, (int)$cy, (int)$rx, (int)$rx, (int)$deg1, (int)$deg2, $background, IMG_ARC_PIE);
206
+                    imagefilledarc($image, (int) $cx, (int) $cy, (int) $rx, (int) $rx, (int) $deg1, (int) $deg2, $background, IMG_ARC_PIE);
207 207
 
208 208
                     // split and center text by lines
209
-                    $wmax = (int)($angle * 7 / 7 * $scale);
209
+                    $wmax = (int) ($angle * 7 / 7 * $scale);
210 210
                     $wmax = min($wmax, 35 * $scale);
211 211
                     if ($gen == 0) {
212 212
                         $wmax = min($wmax, 17 * $scale);
213 213
                     }
214
-                    $text = $this->splitAlignText($text, (int)$wmax);
214
+                    $text = $this->splitAlignText($text, (int) $wmax);
215 215
 
216 216
                     // text angle
217 217
                     $tangle = 270 - ($deg1 + $angle / 2);
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                     imagettftext(
249 249
                         $image,
250 250
                         7,
251
-                        $tangle, (int)$tx, (int)$ty,
251
+                        $tangle, (int) $tx, (int) $ty,
252 252
                         $foreground,
253 253
                         WT_ROOT . 'resources/fonts/DejaVuSans.ttf',
254 254
                         $text
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                     }
379 379
                     $line .= "$word";
380 380
                 } else {
381
-                    $p = max(0, (int)(($maxlen - $len) / 2));
381
+                    $p = max(0, (int) (($maxlen - $len) / 2));
382 382
                     if (!empty($line)) {
383 383
                         $line = str_repeat(' ', $p) . $line; // center alignment using spaces
384 384
                         $text .= $line . "\n";
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             if (in_array(ord($line{0}), $RTLOrd)) {
394 394
                 $len /= 2;
395 395
             }
396
-            $p    = max(0, (int)(($maxlen - $len) / 2));
396
+            $p    = max(0, (int) (($maxlen - $len) / 2));
397 397
             $line = str_repeat(' ', $p) . $line; // center alignment using spaces
398 398
             $text .= $line;
399 399
         }
@@ -413,9 +413,9 @@  discard block
 block discarded – undo
413 413
     {
414 414
         return imagecolorallocate(
415 415
             $image,
416
-            (int)hexdec(substr($css_color, 0, 2)),
417
-            (int)hexdec(substr($css_color, 2, 2)),
418
-            (int)hexdec(substr($css_color, 4, 2))
416
+            (int) hexdec(substr($css_color, 0, 2)),
417
+            (int) hexdec(substr($css_color, 2, 2)),
418
+            (int) hexdec(substr($css_color, 4, 2))
419 419
         );
420 420
     }
421 421
 
Please login to merge, or discard this patch.
app/Census/CensusColumnAgeFemale5Years.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
                 $years -= $years % 5;
43 43
             }
44 44
 
45
-            return (string)$years;
45
+            return (string) $years;
46 46
         }
47 47
     }
48 48
 }
Please login to merge, or discard this patch.