@@ -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 |
@@ -140,7 +140,8 @@ discard block |
||
| 140 | 140 | <div class="font9"> |
| 141 | 141 | <?= $spouse->getLifeSpan() ?> |
| 142 | 142 | </div> |
| 143 | - <?php else: ?> |
|
| 143 | + <?php else { |
|
| 144 | + : ?> |
|
| 144 | 145 | <?= $spouse->getFullName() ?> |
| 145 | 146 | <?php endif ?> |
| 146 | 147 | </td> |
@@ -150,6 +151,7 @@ discard block |
||
| 150 | 151 | |
| 151 | 152 | foreach ($family->getChildren() as $child) { |
| 152 | 153 | $menu = new Menu(Functions::getCloseRelationshipName($controller->record, $child)); |
| 154 | +} |
|
| 153 | 155 | $menu->addSubmenu(new Menu($this->getFamily($child))); |
| 154 | 156 | ?> |
| 155 | 157 | <tr> |
@@ -166,7 +168,8 @@ discard block |
||
| 166 | 168 | <div class="font9"> |
| 167 | 169 | <?= $child->getLifeSpan() ?> |
| 168 | 170 | </div> |
| 169 | - <?php else: ?> |
|
| 171 | + <?php else { |
|
| 172 | + : ?> |
|
| 170 | 173 | <?= $child->getFullName() ?> |
| 171 | 174 | <?php endif ?> |
| 172 | 175 | </td> |
@@ -186,6 +189,7 @@ discard block |
||
| 186 | 189 | private function getHTML($person, $showUnknown = false) { |
| 187 | 190 | if ($person instanceof Individual) { |
| 188 | 191 | return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName()); |
| 192 | +} |
|
| 189 | 193 | } elseif ($showUnknown) { |
| 190 | 194 | return sprintf(self::MSG, I18N::translate('unknown')); |
| 191 | 195 | } else { |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | <div class="modal-content"> |
| 190 | 190 | <div class="modal-header"> |
| 191 | 191 | <h3 class="modal-title" id="wt-modal-title">' . $title . '</h3> |
| 192 | - <button type="button" class="close" data-dismiss="modal" aria-label="'. I18N::translate('close') .'"> |
|
| 192 | + <button type="button" class="close" data-dismiss="modal" aria-label="'. I18N::translate('close') . '"> |
|
| 193 | 193 | <span aria-hidden="true">×</span> |
| 194 | 194 | </button> |
| 195 | 195 | </div> |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | namespace Fisharebest\Webtrees\Functions; |
| 17 | 17 | |
| 18 | -use Fisharebest\Webtrees\Bootstrap4; |
|
| 19 | 18 | use Fisharebest\Webtrees\Config; |
| 20 | 19 | use Fisharebest\Webtrees\Date; |
| 21 | 20 | use Fisharebest\Webtrees\Fact; |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | $message->subject = I18N::translate('RE: ') . $message->subject; |
| 128 | 128 | } |
| 129 | 129 | if ($user) { |
| 130 | - $content .= '<a class="btn btn-secondary" href="message.php?to=' . Filter::escapeUrl($message->sender) . '&subject=' . Filter::escapeUrl($message->subject) . '&ged=' . $WT_TREE->getNameUrl() .'" title="' . I18N::translate('Reply') .'">' . I18N::translate('Reply') . '</a> '; |
|
| 130 | + $content .= '<a class="btn btn-secondary" href="message.php?to=' . Filter::escapeUrl($message->sender) . '&subject=' . Filter::escapeUrl($message->subject) . '&ged=' . $WT_TREE->getNameUrl() . '" title="' . I18N::translate('Reply') . '">' . I18N::translate('Reply') . '</a> '; |
|
| 131 | 131 | } |
| 132 | 132 | $content .= '<button type="button" onclick="if (confirm(\'' . I18N::translate('Are you sure you want to delete this message? It cannot be retrieved later.') . '\')) {$(\'#messageform :checkbox\').prop(\'checked\', false); $(\'#cb_message' . $message->message_id . '\').prop(\'checked\', true); document.messageform.submit();}">' . I18N::translate('Delete') . '</button></div></td></tr>'; |
| 133 | 133 | } |
@@ -90,9 +90,9 @@ |
||
| 90 | 90 | 'info' => 'fa fa-info-circle', |
| 91 | 91 | 'warning' => 'fa fa-exclamation-circle', |
| 92 | 92 | |
| 93 | - // Icons for file types |
|
| 94 | - 'mime-application-pdf' => '', |
|
| 95 | - 'mime-text-html' => '', |
|
| 93 | + // Icons for file types |
|
| 94 | + 'mime-application-pdf' => '', |
|
| 95 | + 'mime-text-html' => '', |
|
| 96 | 96 | |
| 97 | 97 | // Other icons |
| 98 | 98 | 'mail' => 'fa fa-envelope-o', |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | '<div class="icons">' . |
| 820 | 820 | '<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' . |
| 821 | 821 | '<div class="itr"><i class="icon-pedigree"></i><div class="popup">' . |
| 822 | - '<ul class="' . $personBoxClass . '">' . implode('', array_map(function(Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . |
|
| 822 | + '<ul class="' . $personBoxClass . '">' . implode('', array_map(function (Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . |
|
| 823 | 823 | '</div>' . |
| 824 | 824 | '</div>' . |
| 825 | 825 | '</div>'; |
@@ -871,7 +871,7 @@ discard block |
||
| 871 | 871 | '<div class="icons">' . |
| 872 | 872 | '<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' . |
| 873 | 873 | '<div class="itr"><i class="icon-pedigree"></i><div class="popup">' . |
| 874 | - '<ul class="' . $personBoxClass . '">' . implode('', array_map(function(Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . |
|
| 874 | + '<ul class="' . $personBoxClass . '">' . implode('', array_map(function (Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . |
|
| 875 | 875 | '</div>' . |
| 876 | 876 | '</div>' . |
| 877 | 877 | '</div>'; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $controller->restrictAccess(!in_array($to, ['all', 'never_logged', 'last_6mo']) || Auth::isAdmin()); |
| 101 | 101 | $controller->pageHeader(); |
| 102 | 102 | |
| 103 | -$to_names = implode(I18N::$list_separator, array_map(function(User $user) { return $user->getRealName(); }, recipients($to))); |
|
| 103 | +$to_names = implode(I18N::$list_separator, array_map(function (User $user) { return $user->getRealName(); }, recipients($to))); |
|
| 104 | 104 | |
| 105 | 105 | ?> |
| 106 | 106 | <h2><?= I18N::translate('Send a message') ?></h2> |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | function recipients($to) { |
| 187 | 187 | if ($to === 'all') { |
| 188 | - $recipients = User::all(); |
|
| 188 | + $recipients = User::all(); |
|
| 189 | 189 | } elseif ($to === 'last_6mo') { |
| 190 | - $recipients = array_filter(User::all(), function(User $user) { |
|
| 190 | + $recipients = array_filter(User::all(), function (User $user) { |
|
| 191 | 191 | return $user->getPreference('sessiontime') > 0 && WT_TIMESTAMP - $user->getPreference('sessiontime') > 60 * 60 * 24 * 30 * 6; |
| 192 | 192 | }); |
| 193 | 193 | } elseif ($to === 'never_logged') { |
| 194 | - $recipients = array_filter(User::all(), function(User $user) { |
|
| 194 | + $recipients = array_filter(User::all(), function (User $user) { |
|
| 195 | 195 | return $user->getPreference('verified_by_admin') && $user->getPreference('reg_timestamp') > $user->getPreference('sessiontime'); |
| 196 | 196 | }); |
| 197 | 197 | } else { |
@@ -128,7 +128,8 @@ discard block |
||
| 128 | 128 | <div class="form-control"><?= Filter::escapeHtml(Auth::user()->getRealName()) ?></div> |
| 129 | 129 | </div> |
| 130 | 130 | </div> |
| 131 | - <?php else: ?> |
|
| 131 | + <?php else { |
|
| 132 | + : ?> |
|
| 132 | 133 | <div class="form-group row"> |
| 133 | 134 | <label class="col-sm-3 col-form-label" for="from-name"> |
| 134 | 135 | <?= I18N::translate('Your name') ?> |
@@ -186,6 +187,7 @@ discard block |
||
| 186 | 187 | function recipients($to) { |
| 187 | 188 | if ($to === 'all') { |
| 188 | 189 | $recipients = User::all(); |
| 190 | +} |
|
| 189 | 191 | } elseif ($to === 'last_6mo') { |
| 190 | 192 | $recipients = array_filter(User::all(), function(User $user) { |
| 191 | 193 | return $user->getPreference('sessiontime') > 0 && WT_TIMESTAMP - $user->getPreference('sessiontime') > 60 * 60 * 24 * 30 * 6; |
@@ -247,7 +247,7 @@ |
||
| 247 | 247 | /** |
| 248 | 248 | * Which months follows this one? Calendars with leap-months should provide their own implementation. |
| 249 | 249 | * |
| 250 | - * @return int[] |
|
| 250 | + * @return integer[] |
|
| 251 | 251 | */ |
| 252 | 252 | protected function nextMonth() { |
| 253 | 253 | if ($this->m == 6 && !$this->isLeapYear()) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * @param string $xref2 |
| 159 | 159 | * @param int $tree_id |
| 160 | 160 | * |
| 161 | - * @return array |
|
| 161 | + * @return string[] |
|
| 162 | 162 | */ |
| 163 | 163 | private function allAncestors($xref1, $xref2, $tree_id) { |
| 164 | 164 | $ancestors = [$xref1, $xref2]; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * @param string $xref2 |
| 198 | 198 | * @param int $tree_id |
| 199 | 199 | * |
| 200 | - * @return array |
|
| 200 | + * @return string[] |
|
| 201 | 201 | */ |
| 202 | 202 | private function excludeFamilies($xref1, $xref2, $tree_id) { |
| 203 | 203 | return Database::prepare( |
@@ -842,7 +842,7 @@ |
||
| 842 | 842 | /** |
| 843 | 843 | * Which months follows this one? Calendars with leap-months should provide their own implementation. |
| 844 | 844 | * |
| 845 | - * @return int[] |
|
| 845 | + * @return integer[] |
|
| 846 | 846 | */ |
| 847 | 847 | protected function nextMonth() { |
| 848 | 848 | return [$this->m === $this->calendar->monthsInYear() ? $this->nextYear($this->y) : $this->y, ($this->m % $this->calendar->monthsInYear()) + 1]; |
@@ -381,7 +381,8 @@ discard block |
||
| 381 | 381 | <a href="<?= $individual->getHtmlUrl() ?>#tab-stories"> |
| 382 | 382 | <?= $individual->getFullName() ?> |
| 383 | 383 | </a> |
| 384 | - <?php else: ?> |
|
| 384 | + <?php else { |
|
| 385 | + : ?> |
|
| 385 | 386 | <?= $story->xref ?> |
| 386 | 387 | <?php endif ?> |
| 387 | 388 | </td> |
@@ -410,6 +411,7 @@ discard block |
||
| 410 | 411 | */ |
| 411 | 412 | private function showList() { |
| 412 | 413 | global $controller, $WT_TREE; |
| 414 | +} |
|
| 413 | 415 | |
| 414 | 416 | $controller = new PageController; |
| 415 | 417 | $controller |