@@ -21,6 +21,7 @@ |
||
21 | 21 | interface MigrationInterface { |
22 | 22 | /** |
23 | 23 | * Upgrade to to the next version |
24 | + * @return void |
|
24 | 25 | */ |
25 | 26 | public function upgrade(); |
26 | 27 | } |
@@ -5362,7 +5362,7 @@ |
||
5362 | 5362 | /** |
5363 | 5363 | * Find common surnames. |
5364 | 5364 | * |
5365 | - * @return string |
|
5365 | + * @return integer|null |
|
5366 | 5366 | */ |
5367 | 5367 | public function getCommonSurname() { |
5368 | 5368 | $surnames = array_keys(FunctionsDb::getTopSurnames($this->tree->getTreeId(), 1, 1)); |
@@ -102,6 +102,7 @@ discard block |
||
102 | 102 | /** |
103 | 103 | * Allow themes to do things after initialization (since they cannot use |
104 | 104 | * the constructor). |
105 | + * @return void |
|
105 | 106 | */ |
106 | 107 | public function hookAfterInit(); |
107 | 108 | |
@@ -193,6 +194,7 @@ discard block |
||
193 | 194 | * happens in a theme file, and we need to be able to change it. |
194 | 195 | * |
195 | 196 | * @param Tree|null $tree The current tree (if there is one). |
197 | + * @return void |
|
196 | 198 | */ |
197 | 199 | public function init(Tree $tree = null); |
198 | 200 | |
@@ -214,6 +216,7 @@ discard block |
||
214 | 216 | |
215 | 217 | /** |
216 | 218 | * Send any HTTP headers. |
219 | + * @return void |
|
217 | 220 | */ |
218 | 221 | public function sendHeaders(); |
219 | 222 |
@@ -67,14 +67,14 @@ |
||
67 | 67 | if (strlen($match[1]) > strlen($match[2])) { |
68 | 68 | $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2]; |
69 | 69 | } |
70 | - $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}"); |
|
70 | + $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}"); |
|
71 | 71 | $view = 'year'; |
72 | 72 | } else { |
73 | 73 | // advanced-year "decade/century wildcard" |
74 | 74 | if (preg_match('/^(\d+)(\?+)$/', $year, $match)) { |
75 | 75 | $y1 = $match[1] . str_replace('?', '0', $match[2]); |
76 | 76 | $y2 = $match[1] . str_replace('?', '9', $match[2]); |
77 | - $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}"); |
|
77 | + $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}"); |
|
78 | 78 | $view = 'year'; |
79 | 79 | } else { |
80 | 80 | if ($year < 0) { |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | * @param int $min The number of times a surname must occur before it is added to the array |
648 | 648 | * @param Tree $tree |
649 | 649 | * |
650 | - * @return int[] |
|
650 | + * @return string[] |
|
651 | 651 | */ |
652 | 652 | public static function getCommonSurnames($min, Tree $tree) { |
653 | 653 | return self::getTopSurnames($tree->getTreeId(), $min, 0); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | * @param int $min only fetch surnames occuring this many times |
661 | 661 | * @param int $max only fetch this number of surnames (0=all) |
662 | 662 | * |
663 | - * @return int[] |
|
663 | + * @return string[] |
|
664 | 664 | */ |
665 | 665 | public static function getTopSurnames($ged_id, $min, $max) { |
666 | 666 | // Use n_surn, rather than n_surname, as it is used to generate URLs for |
@@ -26,7 +26,6 @@ |
||
26 | 26 | use Fisharebest\Webtrees\Date\JulianDate; |
27 | 27 | use Fisharebest\Webtrees\Fact; |
28 | 28 | use Fisharebest\Webtrees\Family; |
29 | -use Fisharebest\Webtrees\Filter; |
|
30 | 29 | use Fisharebest\Webtrees\I18N; |
31 | 30 | use Fisharebest\Webtrees\Individual; |
32 | 31 | use Fisharebest\Webtrees\Note; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** |
102 | 102 | * Get the male (or first female) partner of the family |
103 | 103 | * |
104 | - * @param $access_level int|null |
|
104 | + * @param integer $access_level int|null |
|
105 | 105 | * |
106 | 106 | * @return Individual|null |
107 | 107 | */ |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Get the female (or second male) partner of the family |
120 | 120 | * |
121 | - * @param $access_level int|null |
|
121 | + * @param integer $access_level int|null |
|
122 | 122 | * |
123 | 123 | * @return Individual|null |
124 | 124 | */ |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | // Check the script used by each name, so we can match cyrillic with cyrillic, greek with greek, etc. |
331 | 331 | $husb_names = []; |
332 | 332 | if ($this->husb) { |
333 | - $husb_names = array_filter($this->husb->getAllNames(), function(array $x) { |
|
333 | + $husb_names = array_filter($this->husb->getAllNames(), function (array $x) { |
|
334 | 334 | return $x['type'] !== '_MARNM'; |
335 | 335 | } ); |
336 | 336 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | |
349 | 349 | $wife_names = []; |
350 | 350 | if ($this->wife) { |
351 | - $wife_names = array_filter($this->wife->getAllNames(), function(array $x) { |
|
351 | + $wife_names = array_filter($this->wife->getAllNames(), function (array $x) { |
|
352 | 352 | return $x['type'] !== '_MARNM'; |
353 | 353 | } ); |
354 | 354 | } |
@@ -1717,7 +1717,7 @@ |
||
1717 | 1717 | if ($endjd === $startjd) { |
1718 | 1718 | $html .= I18N::translate('No events exist for tomorrow.'); |
1719 | 1719 | } else { |
1720 | - $html .= /* I18N: translation for %s==1 is unused; it is translated separately as “tomorrow” */ I18N::plural('No events exist for the next %s day.', 'No events exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
1720 | + $html .= /* I18N: translation for %s==1 is unused; it is translated separately as “tomorrow” */ I18N::plural('No events exist for the next %s day.', 'No events exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
1721 | 1721 | } |
1722 | 1722 | } else { |
1723 | 1723 | if ($endjd === $startjd) { |
@@ -22,7 +22,6 @@ |
||
22 | 22 | use Fisharebest\Webtrees\Fact; |
23 | 23 | use Fisharebest\Webtrees\Family; |
24 | 24 | use Fisharebest\Webtrees\Filter; |
25 | -use Fisharebest\Webtrees\FontAwesome; |
|
26 | 25 | use Fisharebest\Webtrees\GedcomRecord; |
27 | 26 | use Fisharebest\Webtrees\GedcomTag; |
28 | 27 | use Fisharebest\Webtrees\Html; |
@@ -770,13 +770,15 @@ |
||
770 | 770 | <p> |
771 | 771 | <?php if ($ucnt): ?> |
772 | 772 | <input type="submit" value="<?= I18N::translate('delete') ?>"> |
773 | - <?php else: ?> |
|
773 | + <?php else { |
|
774 | + : ?> |
|
774 | 775 | <?= I18N::translate('Nothing found to cleanup') ?> |
775 | 776 | <?php endif ?> |
776 | 777 | </p> |
777 | 778 | </form> |
778 | 779 | <?php |
779 | 780 | break; |
781 | +} |
|
780 | 782 | |
781 | 783 | case 'cleanup2': |
782 | 784 | foreach (User::all() as $user) { |
@@ -176,7 +176,7 @@ |
||
176 | 176 | /** |
177 | 177 | * Format an individual. |
178 | 178 | * |
179 | - * @param $person |
|
179 | + * @param Individual|null $person |
|
180 | 180 | * @param bool $showUnknown |
181 | 181 | * |
182 | 182 | * @return string |
@@ -150,8 +150,8 @@ |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | foreach ($family->getChildren() as $child) { |
153 | - $icon = $controller->record === $child ? '<i class="icon-selected"></i>' : ''; |
|
154 | - $menu = new Menu($icon . Functions::getCloseRelationshipName($controller->record, $child)); |
|
153 | + $icon = $controller->record === $child ? '<i class="icon-selected"></i>' : ''; |
|
154 | + $menu = new Menu($icon . Functions::getCloseRelationshipName($controller->record, $child)); |
|
155 | 155 | $menu->addSubmenu(new Menu($this->getFamily($child))); |
156 | 156 | ?> |
157 | 157 | <tr class="text-center wt-child wt-gender-<?= $child->getSex() ?>"> |
@@ -141,7 +141,8 @@ discard block |
||
141 | 141 | <div class="small"> |
142 | 142 | <?= $spouse->getLifeSpan() ?> |
143 | 143 | </div> |
144 | - <?php else: ?> |
|
144 | + <?php else { |
|
145 | + : ?> |
|
145 | 146 | <?= $spouse->getFullName() ?> |
146 | 147 | <?php endif ?> |
147 | 148 | </td> |
@@ -151,6 +152,7 @@ discard block |
||
151 | 152 | |
152 | 153 | foreach ($family->getChildren() as $child) { |
153 | 154 | $icon = $controller->record === $child ? '<i class="icon-selected"></i>' : ''; |
155 | +} |
|
154 | 156 | $menu = new Menu($icon . Functions::getCloseRelationshipName($controller->record, $child)); |
155 | 157 | $menu->addSubmenu(new Menu($this->getFamily($child))); |
156 | 158 | ?> |
@@ -168,7 +170,8 @@ discard block |
||
168 | 170 | <div class="small"> |
169 | 171 | <?= $child->getLifeSpan() ?> |
170 | 172 | </div> |
171 | - <?php else: ?> |
|
173 | + <?php else { |
|
174 | + : ?> |
|
172 | 175 | <?= $child->getFullName() ?> |
173 | 176 | <?php endif ?> |
174 | 177 | </td> |
@@ -192,6 +195,7 @@ discard block |
||
192 | 195 | private function getHTML($person, $showUnknown = false) { |
193 | 196 | if ($person instanceof Individual) { |
194 | 197 | return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName()); |
198 | +} |
|
195 | 199 | } elseif ($showUnknown) { |
196 | 200 | return sprintf(self::MSG, I18N::translate('unknown')); |
197 | 201 | } else { |