@@ -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 | */ |
@@ -388,7 +388,7 @@ |
||
| 388 | 388 | * (b) Level 1 object with the Highlight option missing or set to other than "Y" or "N" |
| 389 | 389 | * (c) Level 2 or higher object with the Highlight option set to "Y" |
| 390 | 390 | * |
| 391 | - * @return null|Media |
|
| 391 | + * @return GedcomRecord|null |
|
| 392 | 392 | */ |
| 393 | 393 | public function findHighlightedMedia() { |
| 394 | 394 | $objectA = null; |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * |
| 143 | 143 | * @param int $fetch_style |
| 144 | 144 | * |
| 145 | - * @return \stdClass|array|null |
|
| 145 | + * @return \stdClass |
|
| 146 | 146 | */ |
| 147 | 147 | public function fetchOneRow($fetch_style = PDO::FETCH_OBJ) { |
| 148 | 148 | if (!$this->executed) { |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Exception; |
| 19 | -use Swift_Mailer; |
|
| 20 | 19 | use Swift_MailTransport; |
| 20 | +use Swift_Mailer; |
|
| 21 | 21 | use Swift_Message; |
| 22 | 22 | use Swift_NullTransport; |
| 23 | 23 | use Swift_SmtpTransport; |
@@ -45,15 +45,15 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public static function send(Tree $tree, $to_email, $to_name, $replyto_email, $replyto_name, $subject, $message) { |
| 47 | 47 | try { |
| 48 | - $mail = Swift_Message::newInstance() |
|
| 49 | - ->setSubject($subject) |
|
| 50 | - ->setFrom(Site::getPreference('SMTP_FROM_NAME'), $tree->getPreference('title')) |
|
| 51 | - ->setTo($to_email, $to_name) |
|
| 52 | - ->setReplyTo($replyto_email, $replyto_name) |
|
| 53 | - ->setBody($message, 'text/html') |
|
| 54 | - ->addPart(Filter::unescapeHtml($message), 'text/plain'); |
|
| 48 | + $mail = Swift_Message::newInstance() |
|
| 49 | + ->setSubject($subject) |
|
| 50 | + ->setFrom(Site::getPreference('SMTP_FROM_NAME'), $tree->getPreference('title')) |
|
| 51 | + ->setTo($to_email, $to_name) |
|
| 52 | + ->setReplyTo($replyto_email, $replyto_name) |
|
| 53 | + ->setBody($message, 'text/html') |
|
| 54 | + ->addPart(Filter::unescapeHtml($message), 'text/plain'); |
|
| 55 | 55 | |
| 56 | - Swift_Mailer::newInstance(self::transport())->send($mail); |
|
| 56 | + Swift_Mailer::newInstance(self::transport())->send($mail); |
|
| 57 | 57 | } catch (Exception $ex) { |
| 58 | 58 | Log::addErrorLog('Mail: ' . $ex->getMessage()); |
| 59 | 59 | |
@@ -93,20 +93,20 @@ discard block |
||
| 93 | 93 | case 'internal': |
| 94 | 94 | return Swift_MailTransport::newInstance(); |
| 95 | 95 | case 'external': |
| 96 | - $transport = Swift_SmtpTransport::newInstance() |
|
| 97 | - ->setHost(Site::getPreference('SMTP_HOST')) |
|
| 98 | - ->setPort(Site::getPreference('SMTP_PORT')) |
|
| 99 | - ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
| 96 | + $transport = Swift_SmtpTransport::newInstance() |
|
| 97 | + ->setHost(Site::getPreference('SMTP_HOST')) |
|
| 98 | + ->setPort(Site::getPreference('SMTP_PORT')) |
|
| 99 | + ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
| 100 | 100 | |
| 101 | - if (Site::getPreference('SMTP_AUTH')) { |
|
| 102 | - $transport |
|
| 103 | - ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
| 104 | - ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
| 105 | - } |
|
| 101 | + if (Site::getPreference('SMTP_AUTH')) { |
|
| 102 | + $transport |
|
| 103 | + ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
| 104 | + ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
| 105 | + } |
|
| 106 | 106 | |
| 107 | - if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
| 108 | - $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
| 109 | - } |
|
| 107 | + if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
| 108 | + $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | 111 | return $transport; |
| 112 | 112 | default: |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @param string $xref2 |
| 160 | 160 | * @param int $tree_id |
| 161 | 161 | * |
| 162 | - * @return array |
|
| 162 | + * @return string[] |
|
| 163 | 163 | */ |
| 164 | 164 | private function allAncestors($xref1, $xref2, $tree_id) { |
| 165 | 165 | $ancestors = array($xref1, $xref2); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @param string $xref2 |
| 199 | 199 | * @param int $tree_id |
| 200 | 200 | * |
| 201 | - * @return array |
|
| 201 | + * @return string[] |
|
| 202 | 202 | */ |
| 203 | 203 | private function excludeFamilies($xref1, $xref2, $tree_id) { |
| 204 | 204 | return Database::prepare( |
@@ -181,6 +181,7 @@ |
||
| 181 | 181 | /** |
| 182 | 182 | * A list of GEDCOM relationships (e.g. for an edit control). |
| 183 | 183 | * |
| 184 | + * @param string $relationship |
|
| 184 | 185 | * @return string[] |
| 185 | 186 | */ |
| 186 | 187 | public static function optionsRelationships($relationship) { |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | use Fisharebest\Webtrees\Database; |
| 20 | 20 | use Fisharebest\Webtrees\Filter; |
| 21 | 21 | use Fisharebest\Webtrees\Functions\FunctionsDate; |
| 22 | -use Fisharebest\Webtrees\Functions\FunctionsPrint; |
|
| 23 | 22 | use Fisharebest\Webtrees\I18N; |
| 24 | 23 | use Fisharebest\Webtrees\Theme; |
| 25 | 24 | |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | </option> |
| 110 | 110 | </select> |
| 111 | 111 | </td> |
| 112 | - <?php else: ?> |
|
| 112 | + <?php else : ?> |
|
| 113 | 113 | <td class="descriptionbox wrap"></td> |
| 114 | 114 | <td class="optionbox wrap"></td> |
| 115 | 115 | <?php endif ?> |
@@ -109,7 +109,8 @@ discard block |
||
| 109 | 109 | </option> |
| 110 | 110 | </select> |
| 111 | 111 | </td> |
| 112 | - <?php else: ?> |
|
| 112 | + <?php else { |
|
| 113 | + : ?> |
|
| 113 | 114 | <td class="descriptionbox wrap"></td> |
| 114 | 115 | <td class="optionbox wrap"></td> |
| 115 | 116 | <?php endif ?> |
@@ -133,6 +134,7 @@ discard block |
||
| 133 | 134 | <?php |
| 134 | 135 | foreach (['10', '20', '30', '40', '50', '75', '100', '125', '150', '200'] as $selectEntry) { |
| 135 | 136 | echo '<option value="', $selectEntry, '" '; |
| 137 | +} |
|
| 136 | 138 | if ($selectEntry == $max) { |
| 137 | 139 | echo 'selected'; |
| 138 | 140 | } |
@@ -1486,7 +1486,7 @@ |
||
| 1486 | 1486 | '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last'), |
| 1487 | 1487 | ], $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX') |
| 1488 | 1488 | ), |
| 1489 | - Bootstrap4::select('SHOW_PEDIGREE_PLACES', FunctionsEdit::numericOptions(range(1,9)), $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES')) |
|
| 1489 | + Bootstrap4::select('SHOW_PEDIGREE_PLACES', FunctionsEdit::numericOptions(range(1, 9)), $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES')) |
|
| 1490 | 1490 | ) ?> |
| 1491 | 1491 | <p class="small text-muted"> |
| 1492 | 1492 | <?= /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.') ?> |
@@ -519,7 +519,8 @@ discard block |
||
| 519 | 519 | <div class="bg-danger text-danger"> |
| 520 | 520 | <?= $resn->xref ?> — <?= I18N::translate('this record does not exist') ?> |
| 521 | 521 | </div> |
| 522 | - <?php else: ?> |
|
| 522 | + <?php else { |
|
| 523 | + : ?> |
|
| 523 | 524 | <div class="text-muted"> |
| 524 | 525 | <?= I18N::translate('All records') ?> |
| 525 | 526 | </div> |
@@ -638,6 +639,7 @@ discard block |
||
| 638 | 639 | <span class="input-group-addon"> |
| 639 | 640 | <?php |
| 640 | 641 | $person = Individual::getInstance($WT_TREE->getPreference('PEDIGREE_ROOT_ID'), $WT_TREE); |
| 642 | +} |
|
| 641 | 643 | if ($person) { |
| 642 | 644 | echo $person->getFullName(), ' ', $person->getLifeSpan(); |
| 643 | 645 | } else { |