Passed
Pull Request — main (#5163)
by
unknown
24:58 queued 16:56
created
app/Census/AbstractCensusColumn.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * Find the father of an individual
67 67
      */
68
-    public function father(Individual $individual): Individual|null
68
+    public function father(Individual $individual): Individual | null
69 69
     {
70 70
         $family = $individual->childFamilies()->first();
71 71
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     /**
80 80
      * Find the mother of an individual
81 81
      */
82
-    public function mother(Individual $individual): Individual|null
82
+    public function mother(Individual $individual): Individual | null
83 83
     {
84 84
         $family = $individual->childFamilies()->first();
85 85
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     /**
94 94
      * Find the current spouse family of an individual
95 95
      */
96
-    public function spouseFamily(Individual $individual): Family|null
96
+    public function spouseFamily(Individual $individual): Family | null
97 97
     {
98 98
         return $individual->spouseFamilies()
99 99
                 // Exclude families that were created after this census date
Please login to merge, or discard this patch.
app/Module/AbstractIndividualListModule.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -304,7 +304,8 @@  discard block
 block discarded – undo
304 304
                     <li class="wt-initials-list-item d-flex">
305 305
                         <?php if ($count > 0) : ?>
306 306
                             <a href="<?= e($this->listUrl($tree, ['alpha' => $letter, 'show_marnm' => $show_marnm, 'tree' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->displaySurnameInitial((string) $letter) ?></a>
307
-                        <?php else : ?>
307
+                        <?php else {
308
+    : ?>
308 309
                             <span class="wt-initial px-1 text-muted"><?= $this->displaySurnameInitial((string) $letter) ?></span>
309 310
 
310 311
                         <?php endif ?>
@@ -359,6 +360,7 @@  discard block
 block discarded – undo
359 360
                 switch ($alpha) {
360 361
                     case '@':
361 362
                         $filter = static fn (string $x): bool => $x === Individual::NOMEN_NESCIO;
363
+}
362 364
                         break;
363 365
                     case ',':
364 366
                         $filter = static fn (string $x): bool => $x === '';
Please login to merge, or discard this patch.
app/Module/ClippingsCartModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         return 6;
131 131
     }
132 132
 
133
-    public function getMenu(Tree $tree): Menu|null
133
+    public function getMenu(Tree $tree): Menu | null
134 134
     {
135 135
         $request = Registry::container()->get(ServerRequestInterface::class);
136 136
         $route   = Validator::attributes($request)->route();
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         $xrefs = array_map('strval', $xrefs); // PHP converts numeric keys to integers.
354 354
 
355 355
         // Fetch all the records in the cart.
356
-        $records = array_map(static fn (string $xref): GedcomRecord|null => Registry::gedcomRecordFactory()->make($xref, $tree), $xrefs);
356
+        $records = array_map(static fn (string $xref): GedcomRecord | null => Registry::gedcomRecordFactory()->make($xref, $tree), $xrefs);
357 357
 
358 358
         // Some records may have been deleted after they were added to the cart.
359 359
         $records = array_filter($records);
Please login to merge, or discard this patch.
app/Elements/AbstractElement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 abstract class AbstractElement implements ElementInterface
43 43
 {
44 44
     // HTML attributes for an <input>
45
-    protected const int|false    MAXIMUM_LENGTH = false;
46
-    protected const string|false PATTERN        = false;
45
+    protected const int | false    MAXIMUM_LENGTH = false;
46
+    protected const string | false PATTERN        = false;
47 47
 
48 48
     private const array WHITESPACE_LINE = [
49 49
         "\t"       => ' ',
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param string             $label
79 79
      * @param array<string>|null $subtags
80 80
      */
81
-    public function __construct(string $label, array|null $subtags = null)
81
+    public function __construct(string $label, array | null $subtags = null)
82 82
     {
83 83
         $this->label   = $label;
84 84
         $this->subtags = $subtags ?? static::SUBTAGS;
Please login to merge, or discard this patch.
app/Elements/RestrictionNotice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
  */
49 49
 class RestrictionNotice extends AbstractElement
50 50
 {
51
-    public const string VALUE_NONE    = 'NONE';
51
+    public const string VALUE_NONE = 'NONE';
52 52
     public const string VALUE_PRIVACY      = 'PRIVACY';
53 53
     public const string VALUE_CONFIDENTIAL = 'CONFIDENTIAL';
54 54
     public const string VALUE_LOCKED       = 'LOCKED';
Please login to merge, or discard this patch.
app/Http/Middleware/DoHousekeeping.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
 {
36 36
     // Delete old thumbnails after 90 days.
37 37
     private const string THUMBNAIL_DIR = 'thumbnail-cache';
38
-    private const int MAX_THUMBNAIL_AGE    = 60 * 60 * 24 * 90;
38
+    private const int MAX_THUMBNAIL_AGE = 60 * 60 * 24 * 90;
39 39
 
40 40
     // Delete files in /data/tmp after 1 hour.
41
-    private const string TMP_DIR   = 'data/tmp';
41
+    private const string TMP_DIR = 'data/tmp';
42 42
     private const int    MAX_TMP_FILE_AGE = 60 * 60;
43 43
 
44 44
     // Delete error logs after 90 days.
Please login to merge, or discard this patch.
app/Family.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
     protected const string ROUTE_NAME = FamilyPage::class;
34 34
 
35 35
     // The husband (or first spouse for same-sex couples)
36
-    private Individual|null $husb = null;
36
+    private Individual | null $husb = null;
37 37
 
38 38
     // The wife (or second spouse for same-sex couples)
39
-    private Individual|null $wife = null;
39
+    private Individual | null $wife = null;
40 40
 
41 41
     /**
42 42
      * Create a GedcomRecord object from raw GEDCOM data.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *                             empty string for records with pending deletions
48 48
      * @param Tree        $tree
49 49
      */
50
-    public function __construct(string $xref, string $gedcom, string|null $pending, Tree $tree)
50
+    public function __construct(string $xref, string $gedcom, string | null $pending, Tree $tree)
51 51
     {
52 52
         parent::__construct($xref, $gedcom, $pending, $tree);
53 53
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      *
80 80
      * @return Individual|null
81 81
      */
82
-    public function husband(int|null $access_level = null): Individual|null
82
+    public function husband(int | null $access_level = null): Individual | null
83 83
     {
84 84
         if ($this->tree->getPreference('SHOW_PRIVATE_RELATIONSHIPS') === '1') {
85 85
             $access_level = Auth::PRIV_HIDE;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @return Individual|null
101 101
      */
102
-    public function wife(int|null $access_level = null): Individual|null
102
+    public function wife(int | null $access_level = null): Individual | null
103 103
     {
104 104
         if ($this->tree->getPreference('SHOW_PRIVATE_RELATIONSHIPS') === '1') {
105 105
             $access_level = Auth::PRIV_HIDE;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      *
141 141
      * @return bool
142 142
      */
143
-    public function canShowName(int|null $access_level = null): bool
143
+    public function canShowName(int | null $access_level = null): bool
144 144
     {
145 145
         // We can always see the name (Husband-name + Wife-name), however,
146 146
         // the name will often be "private + private"
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      *
156 156
      * @return Individual|null
157 157
      */
158
-    public function spouse(Individual $person, int|null $access_level = null): Individual|null
158
+    public function spouse(Individual $person, int | null $access_level = null): Individual | null
159 159
     {
160 160
         if ($person === $this->wife) {
161 161
             return $this->husband($access_level);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      *
172 172
      * @return Collection<int,Individual>
173 173
      */
174
-    public function spouses(int|null $access_level = null): Collection
174
+    public function spouses(int | null $access_level = null): Collection
175 175
     {
176 176
         $spouses = new Collection([
177 177
             $this->husband($access_level),
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      *
189 189
      * @return Collection<int,Individual>
190 190
      */
191
-    public function children(int|null $access_level = null): Collection
191
+    public function children(int | null $access_level = null): Collection
192 192
     {
193 193
         $access_level ??= Auth::accessLevel($this->tree);
194 194
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     /**
229 229
      * get the marriage event
230 230
      */
231
-    public function getMarriage(): Fact|null
231
+    public function getMarriage(): Fact | null
232 232
     {
233 233
         return $this->facts(['MARR'])->first();
234 234
     }
Please login to merge, or discard this patch.
app/Contracts/SurnameTraditionFactoryInterface.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public const string POLISH      = 'polish';
35 35
     public const string LITHUANIAN  = 'lithuanian';
36 36
     public const string ICELANDIC   = 'icelandic';
37
-    public const string DEFAULT     = '';
37
+    public const string default     = '';
38 38
 
39 39
     /**
40 40
      * A list of supported surname traditions and their names.
Please login to merge, or discard this patch.
app/Module/AncestorsChartModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     // Defaults
51 51
     public const string DEFAULT_GENERATIONS = '4';
52 52
     public const string DEFAULT_STYLE       = self::CHART_STYLE_TREE;
53
-    protected const array DEFAULT_PARAMETERS  = [
53
+    protected const array DEFAULT_PARAMETERS = [
54 54
         'generations' => self::DEFAULT_GENERATIONS,
55 55
         'style'       => self::DEFAULT_STYLE,
56 56
     ];
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     /**
116 116
      * Return a menu item for this chart - for use in individual boxes.
117 117
      */
118
-    public function chartBoxMenu(Individual $individual): Menu|null
118
+    public function chartBoxMenu(Individual $individual): Menu | null
119 119
     {
120 120
         return $this->chartMenu($individual);
121 121
     }
Please login to merge, or discard this patch.