Completed
Branch develop (b6db7c)
by Greg
09:30
created
app/Http/Controllers/BranchesController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
     public function page(Request $request): Response
44 44
     {
45 45
         $surname     = $request->get('surname', '');
46
-        $soundex_std = (bool)$request->get('soundex_std');
47
-        $soundex_dm  = (bool)$request->get('soundex_dm');
46
+        $soundex_std = (bool) $request->get('soundex_std');
47
+        $soundex_dm  = (bool) $request->get('soundex_dm');
48 48
 
49 49
         if ($surname !== '') {
50 50
             $title = /* I18N: %s is a surname */
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function list(Request $request, Tree $tree, User $user): Response
73 73
     {
74
-        $soundex_dm  = (bool)$request->get('soundex_dm');
75
-        $soundex_std = (bool)$request->get('soundex_std');
74
+        $soundex_dm  = (bool) $request->get('soundex_dm');
75
+        $soundex_std = (bool) $request->get('soundex_std');
76 76
         $surname     = $request->get('surname', '');
77 77
 
78 78
         // Highlight direct-line ancestors of this individual.
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $sdx = Soundex::russell($surname);
161 161
             if ($sdx !== '') {
162 162
                 foreach (explode(':', $sdx) as $value) {
163
-                    $sql    .= " OR n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
163
+                    $sql .= " OR n_soundex_surn_std LIKE CONCAT('%', ?, '%')";
164 164
                     $args[] = $value;
165 165
                 }
166 166
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             $sdx = Soundex::daitchMokotoff($surname);
171 171
             if ($sdx !== '') {
172 172
                 foreach (explode(':', $sdx) as $value) {
173
-                    $sql    .= " OR n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
173
+                    $sql .= " OR n_soundex_surn_dm LIKE CONCAT('%', ?, '%')";
174 174
                     $args[] = $value;
175 175
                 }
176 176
             }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     private static function sosaGeneration($sosa)
342 342
     {
343
-        $generation = (int)log($sosa, 2) + 1;
343
+        $generation = (int) log($sosa, 2) + 1;
344 344
 
345 345
         return '<sup title="' . I18N::translate('Generation') . '">' . $generation . '</sup>';
346 346
     }
Please login to merge, or discard this patch.
app/Http/Controllers/AdminController.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
      */
699 699
     public function changesLogData(Request $request): Response
700 700
     {
701
-        list($select, , $where, $args1) = $this->changesQuery($request);
701
+        list($select,, $where, $args1) = $this->changesQuery($request);
702 702
         list($order_by, $limit, $args2) = $this->dataTablesPagination($request);
703 703
 
704 704
         $rows = Database::prepare(
@@ -706,8 +706,8 @@  discard block
 block discarded – undo
706 706
         )->execute(array_merge($args1, $args2))->fetchAll();
707 707
 
708 708
         // Total filtered/unfiltered rows
709
-        $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
710
-        $recordsTotal    = (int)Database::prepare("SELECT COUNT(*) FROM `##change`")->fetchOne();
709
+        $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
710
+        $recordsTotal    = (int) Database::prepare("SELECT COUNT(*) FROM `##change`")->fetchOne();
711 711
 
712 712
         $data      = [];
713 713
         $algorithm = new MyersDiff;
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 
758 758
         // See http://www.datatables.net/usage/server-side
759 759
         return new JsonResponse([
760
-            'draw'            => (int)$request->get('draw'),
760
+            'draw'            => (int) $request->get('draw'),
761 761
             'recordsTotal'    => $recordsTotal,
762 762
             'recordsFiltered' => $recordsFiltered,
763 763
             'data'            => $data,
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
      */
774 774
     public function changesLogDownload(Request $request): Response
775 775
     {
776
-        list($select, , $where, $args) = $this->changesQuery($request);
776
+        list($select,, $where, $args) = $this->changesQuery($request);
777 777
 
778 778
         $rows = Database::prepare($select . $where)->execute($args)->fetchAll();
779 779
 
@@ -917,8 +917,8 @@  discard block
 block discarded – undo
917 917
             'RESN',
918 918
         ];
919 919
 
920
-        $start  = (int)$request->get('start', 0);
921
-        $length = (int)$request->get('length', 20);
920
+        $start  = (int) $request->get('start', 0);
921
+        $length = (int) $request->get('length', 20);
922 922
         $search = $request->get('search', []);
923 923
         $search = $search['value'] ?? '';
924 924
 
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
         $args  = [];
939 939
 
940 940
         if ($search !== '') {
941
-            $where           .= " AND (multimedia_file_refn LIKE CONCAT('%', :search1, '%') OR multimedia_file_refn LIKE CONCAT('%', :search2, '%'))";
941
+            $where .= " AND (multimedia_file_refn LIKE CONCAT('%', :search1, '%') OR multimedia_file_refn LIKE CONCAT('%', :search2, '%'))";
942 942
             $args['search1'] = $search;
943 943
             $args['search2'] = $search;
944 944
         }
@@ -957,8 +957,8 @@  discard block
 block discarded – undo
957 957
         )->fetchAll();
958 958
 
959 959
         // Total filtered/unfiltered rows
960
-        $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
961
-        $recordsTotal    = (int)Database::prepare($select2)->fetchOne();
960
+        $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne();
961
+        $recordsTotal    = (int) Database::prepare($select2)->fetchOne();
962 962
 
963 963
         // Turn each row from the query into a row for the table
964 964
         $data = array_map(function (stdClass $datum) use ($ignore_facts) {
@@ -1000,7 +1000,7 @@  discard block
 block discarded – undo
1000 1000
         }, $data);
1001 1001
 
1002 1002
         return new JsonResponse([
1003
-            'draw'            => (int)$request->get('draw'),
1003
+            'draw'            => (int) $request->get('draw'),
1004 1004
             'recordsTotal'    => $recordsTotal,
1005 1005
             'recordsFiltered' => $recordsFiltered,
1006 1006
             'data'            => $data,
@@ -1089,8 +1089,8 @@  discard block
 block discarded – undo
1089 1089
      */
1090 1090
     public function webtrees1ThumbnailsData(Request $request): JsonResponse
1091 1091
     {
1092
-        $start  = (int)$request->get('start', 0);
1093
-        $length = (int)$request->get('length', 20);
1092
+        $start  = (int) $request->get('start', 0);
1093
+        $length = (int) $request->get('length', 20);
1094 1094
         $search = $request->get('search', []);
1095 1095
         $search = $search['value'] ?? '';
1096 1096
 
@@ -1121,7 +1121,7 @@  discard block
 block discarded – undo
1121 1121
         $data = array_map(function (string $thumbnail) {
1122 1122
             $original = $this->findOriginalFileFromThumbnail($thumbnail);
1123 1123
 
1124
-            $original_url  = route('unused-media-thumbnail', [
1124
+            $original_url = route('unused-media-thumbnail', [
1125 1125
                 'folder' => dirname($original),
1126 1126
                 'file'   => basename($original),
1127 1127
                 'w'      => 100,
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
         }, $thumbnails);
1164 1164
 
1165 1165
         return new JsonResponse([
1166
-            'draw'            => (int)$request->get('draw'),
1166
+            'draw'            => (int) $request->get('draw'),
1167 1167
             'recordsTotal'    => $recordsTotal,
1168 1168
             'recordsFiltered' => $recordsFiltered,
1169 1169
             'data'            => $data,
@@ -1481,7 +1481,7 @@  discard block
 block discarded – undo
1481 1481
      */
1482 1482
     public function treePrivacyUpdate(Request $request, Tree $tree): RedirectResponse
1483 1483
     {
1484
-        foreach ((array)$request->get('delete') as $default_resn_id) {
1484
+        foreach ((array) $request->get('delete') as $default_resn_id) {
1485 1485
             Database::prepare(
1486 1486
                 "DELETE FROM `##default_resn` WHERE default_resn_id = :default_resn_id"
1487 1487
             )->execute([
@@ -1489,13 +1489,13 @@  discard block
 block discarded – undo
1489 1489
             ]);
1490 1490
         }
1491 1491
 
1492
-        $xrefs     = (array)$request->get('xref');
1493
-        $tag_types = (array)$request->get('tag_type');
1494
-        $resns     = (array)$request->get('resn');
1492
+        $xrefs     = (array) $request->get('xref');
1493
+        $tag_types = (array) $request->get('tag_type');
1494
+        $resns     = (array) $request->get('resn');
1495 1495
 
1496 1496
         foreach ($xrefs as $n => $xref) {
1497
-            $tag_type = (string)$tag_types[$n];
1498
-            $resn     = (string)$resns[$n];
1497
+            $tag_type = (string) $tag_types[$n];
1498
+            $resn     = (string) $resns[$n];
1499 1499
 
1500 1500
             if ($tag_type !== '' || $xref !== '') {
1501 1501
                 // Delete any existing data
@@ -1541,10 +1541,10 @@  discard block
 block discarded – undo
1541 1541
         FlashMessages::addMessage(I18N::translate('The preferences for the family tree “%s” have been updated.', e($tree->getTitle()), 'success'));
1542 1542
 
1543 1543
         // Coming soon...
1544
-        if ((bool)$request->get('all_trees')) {
1544
+        if ((bool) $request->get('all_trees')) {
1545 1545
             FlashMessages::addMessage(I18N::translate('The preferences for all family trees have been updated.', e($tree->getTitle())), 'success');
1546 1546
         }
1547
-        if ((bool)$request->get('new_trees')) {
1547
+        if ((bool) $request->get('new_trees')) {
1548 1548
             FlashMessages::addMessage(I18N::translate('The preferences for new family trees have been updated.', e($tree->getTitle())), 'success');
1549 1549
         }
1550 1550
 
@@ -1567,7 +1567,7 @@  discard block
 block discarded – undo
1567 1567
         foreach ($modules as $module) {
1568 1568
             foreach (Tree::getAll() as $tree) {
1569 1569
                 $key          = 'access-' . $module->getName() . '-' . $tree->getTreeId();
1570
-                $access_level = (int)$request->get($key, $module->defaultAccessLevel());
1570
+                $access_level = (int) $request->get($key, $module->defaultAccessLevel());
1571 1571
 
1572 1572
                 Database::prepare("REPLACE INTO `##module_privacy` (module_name, gedcom_id, component, access_level)" . " VALUES (:module_name, :tree_id, :component, :access_level)")->execute([
1573 1573
                     'module_name'  => $module->getName(),
@@ -1594,7 +1594,7 @@  discard block
 block discarded – undo
1594 1594
         $module_status = Database::prepare("SELECT module_name, status FROM `##module`")->fetchAssoc();
1595 1595
 
1596 1596
         foreach ($modules as $module) {
1597
-            $new_status = (bool)$request->get('status-' . $module->getName()) ? 'enabled' : 'disabled';
1597
+            $new_status = (bool) $request->get('status-' . $module->getName()) ? 'enabled' : 'disabled';
1598 1598
             $old_status = $module_status[$module->getName()];
1599 1599
 
1600 1600
             if ($new_status !== $old_status) {
@@ -1657,36 +1657,36 @@  discard block
 block discarded – undo
1657 1657
         $where = ' WHERE 1';
1658 1658
         $args  = [];
1659 1659
         if ($search !== '') {
1660
-            $where            .= " AND (old_gedcom LIKE CONCAT('%', :search_1, '%') OR new_gedcom LIKE CONCAT('%', :search_2, '%'))";
1660
+            $where .= " AND (old_gedcom LIKE CONCAT('%', :search_1, '%') OR new_gedcom LIKE CONCAT('%', :search_2, '%'))";
1661 1661
             $args['search_1'] = $search;
1662 1662
             $args['search_2'] = $search;
1663 1663
         }
1664 1664
         if ($from !== '') {
1665
-            $where        .= " AND change_time >= :from";
1665
+            $where .= " AND change_time >= :from";
1666 1666
             $args['from'] = $from;
1667 1667
         }
1668 1668
         if ($to !== '') {
1669
-            $where      .= ' AND change_time < TIMESTAMPADD(DAY, 1 , :to)'; // before end of the day
1669
+            $where .= ' AND change_time < TIMESTAMPADD(DAY, 1 , :to)'; // before end of the day
1670 1670
             $args['to'] = $to;
1671 1671
         }
1672 1672
         if ($type !== '') {
1673
-            $where          .= ' AND status = :status';
1673
+            $where .= ' AND status = :status';
1674 1674
             $args['status'] = $type;
1675 1675
         }
1676 1676
         if ($oldged !== '') {
1677
-            $where           .= " AND old_gedcom LIKE CONCAT('%', :old_ged, '%')";
1677
+            $where .= " AND old_gedcom LIKE CONCAT('%', :old_ged, '%')";
1678 1678
             $args['old_ged'] = $oldged;
1679 1679
         }
1680 1680
         if ($newged !== '') {
1681
-            $where           .= " AND new_gedcom LIKE CONCAT('%', :new_ged, '%')";
1681
+            $where .= " AND new_gedcom LIKE CONCAT('%', :new_ged, '%')";
1682 1682
             $args['new_ged'] = $newged;
1683 1683
         }
1684 1684
         if ($xref !== '') {
1685
-            $where        .= " AND xref = :xref";
1685
+            $where .= " AND xref = :xref";
1686 1686
             $args['xref'] = $xref;
1687 1687
         }
1688 1688
         if ($username !== '') {
1689
-            $where        .= " AND user_name LIKE CONCAT('%', :user, '%')";
1689
+            $where .= " AND user_name LIKE CONCAT('%', :user, '%')";
1690 1690
             $args['user'] = $username;
1691 1691
         }
1692 1692
         if ($ged !== '') {
@@ -1737,8 +1737,8 @@  discard block
 block discarded – undo
1737 1737
      */
1738 1738
     private function dataTablesPagination(Request $request): array
1739 1739
     {
1740
-        $start  = (int)$request->get('start', '0');
1741
-        $length = (int)$request->get('length', '0');
1740
+        $start  = (int) $request->get('start', '0');
1741
+        $length = (int) $request->get('length', '0');
1742 1742
         $order  = $request->get('order', []);
1743 1743
         $args   = [];
1744 1744
 
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
         }
1908 1908
 
1909 1909
         // The maximum difference is 255 (black versus white).
1910
-        return 100 - (int)($max_difference * 100 / 255);
1910
+        return 100 - (int) ($max_difference * 100 / 255);
1911 1911
     }
1912 1912
 
1913 1913
     /**
@@ -1938,7 +1938,7 @@  discard block
 block discarded – undo
1938 1938
             $pixels[$x] = [];
1939 1939
             for ($y = 0; $y < $size; ++$y) {
1940 1940
                 $pixel          = $image->pickColor($x, $y);
1941
-                $pixels[$x][$y] = (int)(($pixel[0] + $pixel[1] + $pixel[2]) / 3);
1941
+                $pixels[$x][$y] = (int) (($pixel[0] + $pixel[1] + $pixel[2]) / 3);
1942 1942
             }
1943 1943
         }
1944 1944
 
Please login to merge, or discard this patch.
app/Http/Controllers/LifespansChartController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $this->checkModuleIsActive($tree, 'lifespans_chart');
54 54
 
55
-        $xrefs     = (array)$request->get('xrefs', []);
55
+        $xrefs     = (array) $request->get('xrefs', []);
56 56
         $addxref   = $request->get('addxref', '');
57
-        $addfam    = (bool)$request->get('addfam', false);
57
+        $addfam    = (bool) $request->get('addfam', false);
58 58
         $placename = $request->get('placename', '');
59 59
         $start     = $request->get('start', '');
60 60
         $end       = $request->get('end', '');
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $this->checkModuleIsActive($tree, 'lifespans_chart');
113 113
 
114
-        $xrefs = (array)$request->get('xrefs', []);
114
+        $xrefs = (array) $request->get('xrefs', []);
115 115
         $xrefs = array_unique($xrefs);
116 116
 
117 117
         /** @var Individual[] $individuals */
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $subtitle = $request->get('subtitle');
132 132
 
133 133
         // Round to whole decades
134
-        $start_year = (int)floor($this->minYear($individuals) / 10) * 10;
135
-        $end_year   = (int)ceil($this->maxYear($individuals) / 10) * 10;
134
+        $start_year = (int) floor($this->minYear($individuals) / 10) * 10;
135
+        $end_year   = (int) ceil($this->maxYear($individuals) / 10) * 10;
136 136
 
137 137
         $lifespans = $this->layoutIndividuals($individuals);
138 138
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             'U' => new ColorGenerator(120, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE),
168 168
         ];
169 169
 
170
-        $current_year = (int)date('Y');
170
+        $current_year = (int) date('Y');
171 171
 
172 172
         // Latest year used in each row
173 173
         $rows = [];
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             // Fill the row up to the year (leaving a small gap)
197 197
             $rows[$next_row] = $death_year;
198 198
 
199
-            $lifespans[] = (object)[
199
+            $lifespans[] = (object) [
200 200
                 'background' => $colors[$individual->getSex()]->getNextColor(),
201 201
                 'birth_year' => $birth_year,
202 202
                 'death_year' => $death_year,
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         $year = $this->jdToYear($jd);
226 226
 
227 227
         // Don't show future dates
228
-        return min($year, (int)date('Y'));
228
+        return min($year, (int) date('Y'));
229 229
 
230 230
     }
231 231
 
Please login to merge, or discard this patch.
app/Module/PedigreeMapModule.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
  */
36 36
 class PedigreeMapModule extends AbstractModule implements ModuleChartInterface
37 37
 {
38
-    const LINE_COLORS  = [
38
+    const LINE_COLORS = [
39 39
         '#FF0000',
40 40
         // Red
41 41
         '#00FF00',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     $color            = self::LINE_COLORS[log($id, 2) % $color_count];
141 141
                     $icon['color']    = $color; //make icon color the same as the line
142 142
                     $sosa_points[$id] = $event->getLatLonJSArray();
143
-                    $sosa_parent      = (int)floor($id / 2);
143
+                    $sosa_parent      = (int) floor($id / 2);
144 144
                     if (array_key_exists($sosa_parent, $sosa_points)) {
145 145
                         // Would like to use a GeometryCollection to hold LineStrings
146 146
                         // rather than generate polylines but the MarkerCluster library
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                             'icon'     => $icon,
169 169
                             'tooltip'  => $event->toolTip(),
170 170
                             'summary'  => view('modules/pedigree-map/event-sidebar', $event->shortSummary('pedigree', $id)),
171
-                            'zoom'     => (int)$event->getZoom(),
171
+                            'zoom'     => (int) $event->getZoom(),
172 172
                         ],
173 173
                     ];
174 174
                 }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         $xref        = $request->get('reference');
190 190
         $individual  = Individual::getInstance($xref, $tree);
191
-        $generations = (int)$request->get(
191
+        $generations = (int) $request->get(
192 192
             'generations',
193 193
             $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS')
194 194
         );
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
                         function ($item) {
242 242
                             return preg_replace('/[^a-z\d]/i', '', strtolower($item));
243 243
                         },
244
-                        (array)$provider->styles
244
+                        (array) $provider->styles
245 245
                     );
246 246
 
247
-                    $key = preg_replace('/[^a-z\d]/i', '', strtolower((string)$provider->name));
247
+                    $key = preg_replace('/[^a-z\d]/i', '', strtolower((string) $provider->name));
248 248
 
249 249
                     self::$map_providers[$key] = [
250
-                        'name'   => (string)$provider->name,
251
-                        'styles' => array_combine($style_keys, (array)$provider->styles),
250
+                        'name'   => (string) $provider->name,
251
+                        'styles' => array_combine($style_keys, (array) $provider->styles),
252 252
                     ];
253 253
                 }
254 254
             } catch (Exception $ex) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
                     'provider' => 'openstreetmap',
258 258
                     'style'    => 'mapnik',
259 259
                 ];
260
-                self::$map_providers  = [
260
+                self::$map_providers = [
261 261
                     'openstreetmap' => [
262 262
                         'name'   => 'OpenStreetMap',
263 263
                         'styles' => ['mapnik' => 'Mapnik'],
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
             throw new IndividualAccessDeniedException;
319 319
         }
320 320
         
321
-        return (object)[
321
+        return (object) [
322 322
             'name' => 'modules/pedigree-map/pedigree-map-page',
323 323
             'data' => [
324 324
                 'module'         => $this->getName(),
Please login to merge, or discard this patch.
app/Module/UserMessagesModule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function postDeleteMessageAction(Request $request, Tree $tree): Response
57 57
     {
58
-        $message_ids = (array)$request->get('message_id', []);
58
+        $message_ids = (array) $request->get('message_id', []);
59 59
 
60 60
         $stmt = Database::prepare("DELETE FROM `##message` WHERE user_id = :user_id AND message_id = :message_id");
61 61
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         $content = '';
102 102
         if (!empty($users)) {
103
-            $url     = route('user-page', ['ged' => $tree->getName()]);
103
+            $url = route('user-page', ['ged' => $tree->getName()]);
104 104
             $content .= '<form onsubmit="return $(&quot;#to&quot;).val() !== &quot;&quot;">';
105 105
             $content .= '<input type="hidden" name="route" value="message">';
106 106
             $content .= '<input type="hidden" name="ged" value="' . e($tree->getName()) . '">';
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 $content .= '<td class="list_value_wrap"><a href="#" onclick="return expand_layer(\'message' . $message->message_id . '\');"><i id="message' . $message->message_id . '_img" class="icon-plus"></i> <b dir="auto">' . e($message->subject) . '</b></a></td>';
137 137
                 $content .= '<td class="list_value_wrap">' . FunctionsDate::formatTimestamp($message->created + WT_TIMESTAMP_OFFSET) . '</td>';
138 138
                 $content .= '<td class="list_value_wrap">';
139
-                $user    = User::findByIdentifier($message->sender);
139
+                $user = User::findByIdentifier($message->sender);
140 140
                 if ($user) {
141 141
                     $content .= '<span dir="auto">' . e($user->getRealName()) . '</span> - <span dir="auto">' . $user->getEmail() . '</span>';
142 142
                 } else {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                         'subject' => $message->subject,
159 159
                         'ged'     => $tree->getName(),
160 160
                     ]);
161
-                    $content   .= '<a class="btn btn-primary" href="' . e($reply_url) . '" title="' . I18N::translate('Reply') . '">' . I18N::translate('Reply') . '</a> ';
161
+                    $content .= '<a class="btn btn-primary" href="' . e($reply_url) . '" title="' . I18N::translate('Reply') . '">' . I18N::translate('Reply') . '</a> ';
162 162
                 }
163 163
                 $content .= '<button type="button" class="btn btn-danger" data-confirm="' . I18N::translate('Are you sure you want to delete this message? It cannot be retrieved later.') . '" onclick="if (confirm(this.dataset.confirm)) {$(\'#messageform :checkbox\').prop(\'checked\', false); $(\'#cb_message' . $message->message_id . '\').prop(\'checked\', true); document.messageform.submit();}">' . I18N::translate('Delete') . '</button></div></td></tr>';
164 164
             }
Please login to merge, or discard this patch.
app/Module/UserFavoritesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
      */
192 192
     public function postDeleteFavoriteAction(Request $request, Tree $tree, User $user): RedirectResponse
193 193
     {
194
-        $favorite_id = (int)$request->get('favorite_id');
194
+        $favorite_id = (int) $request->get('favorite_id');
195 195
 
196 196
         if (Auth::check()) {
197 197
             Database::prepare(
Please login to merge, or discard this patch.
app/Module/FrequentlyAskedQuestionsModule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function postAdminDeleteAction(Request $request, Tree $tree): RedirectResponse
158 158
     {
159
-        $block_id = (int)$request->get('block_id');
159
+        $block_id = (int) $request->get('block_id');
160 160
 
161 161
         Database::prepare(
162 162
             "DELETE FROM `##block_setting` WHERE block_id = :block_id"
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      */
185 185
     public function postAdminMoveDownAction(Request $request, Tree $tree): RedirectResponse
186 186
     {
187
-        $block_id = (int)$request->get('block_id');
187
+        $block_id = (int) $request->get('block_id');
188 188
 
189 189
         $block_order = Database::prepare(
190 190
             "SELECT block_order FROM `##block` WHERE block_id = :block_id"
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function postAdminMoveUpAction(Request $request, Tree $tree): RedirectResponse
239 239
     {
240
-        $block_id = (int)$request->get('block_id');
240
+        $block_id = (int) $request->get('block_id');
241 241
 
242 242
         $block_order = Database::prepare(
243 243
             "SELECT block_order FROM `##block` WHERE block_id = :block_id"
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     {
293 293
         $this->layout = 'layouts/administration';
294 294
 
295
-        $block_id = (int)$request->get('block_id');
295
+        $block_id = (int) $request->get('block_id');
296 296
 
297 297
         if ($block_id === 0) {
298 298
             // Creating a new faq
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             )->execute([
304 304
                 'module_name' => $this->getName(),
305 305
             ])->fetchOne();
306
-            $languages   = [];
306
+            $languages = [];
307 307
 
308 308
             $title = I18N::translate('Add an FAQ');
309 309
         } else {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     public function postAdminEditAction(Request $request, Tree $tree): RedirectResponse
342 342
     {
343
-        $block_id  = (int)$request->get('block_id');
343
+        $block_id  = (int) $request->get('block_id');
344 344
         $faqbody   = $request->get('faqbody', '');
345 345
         $header    = $request->get('header', '');
346 346
         $languages = $request->get('languages', []);
Please login to merge, or discard this patch.
app/Module/FamilyTreeFavoritesModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
      */
191 191
     public function postDeleteFavoriteAction(Request $request, Tree $tree, User $user): RedirectResponse
192 192
     {
193
-        $favorite_id = (int)$request->get('favorite_id');
193
+        $favorite_id = (int) $request->get('favorite_id');
194 194
 
195 195
         if (Auth::isManager($tree, $user)) {
196 196
             Database::prepare(
Please login to merge, or discard this patch.
app/Module/StoriesModule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             // Only show this block for certain languages
118 118
             $languages = $this->getBlockSetting($block_id, 'languages', '');
119 119
             if ($languages === '' || in_array(WT_LOCALE, explode(',', $languages))) {
120
-                $stories[] = (object)[
120
+                $stories[] = (object) [
121 121
                     'block_id'   => $block_id,
122 122
                     'title'      => $this->getBlockSetting($block_id, 'title'),
123 123
                     'story_body' => $this->getBlockSetting($block_id, 'story_body'),
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $this->layout = 'layouts/administration';
213 213
 
214
-        $block_id = (int)$request->get('block_id');
214
+        $block_id = (int) $request->get('block_id');
215 215
 
216 216
         if ($block_id === 0) {
217 217
             // Creating a new story
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function postAdminEditAction(Request $request, Tree $tree): RedirectResponse
258 258
     {
259
-        $block_id    = (int)$request->get('block_id');
259
+        $block_id    = (int) $request->get('block_id');
260 260
         $xref        = $request->get('xref', '');
261 261
         $story_body  = $request->get('story_body', '');
262 262
         $story_title = $request->get('story_title', '');
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     public function postAdminDeleteAction(Request $request, Tree $tree): Response
304 304
     {
305
-        $block_id = (int)$request->get('block_id');
305
+        $block_id = (int) $request->get('block_id');
306 306
 
307 307
         Database::prepare(
308 308
             "DELETE FROM `##block_setting` WHERE block_id = :block_id"
Please login to merge, or discard this patch.