summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Elements/AgeAtEvent.php8
-rw-r--r--app/Functions/FunctionsRtl.php4
-rw-r--r--app/GedcomRecord.php2
-rw-r--r--app/Http/RequestHandlers/CalendarEvents.php4
-rw-r--r--app/Services/CalendarService.php2
-rw-r--r--app/Soundex.php2
-rw-r--r--app/Statistics/Repository/FamilyRepository.php2
7 files changed, 12 insertions, 12 deletions
diff --git a/app/Elements/AgeAtEvent.php b/app/Elements/AgeAtEvent.php
index 697c383636..e1b21681e1 100644
--- a/app/Elements/AgeAtEvent.php
+++ b/app/Elements/AgeAtEvent.php
@@ -78,10 +78,10 @@ class AgeAtEvent extends AbstractElement
'/CHILD/' => fn () => I18N::translate('Child'),
'/INFANT/' => fn () => I18N::translate('Infant'),
'/STILLBORN/' => fn () => I18N::translate('Stillborn'),
- '/\b(\d+)y\b/' => fn (array $match) => I18N::plural('%s year', '%s years', (int) ($match[1]), I18N::number((float) $match[1])),
- '/\b(\d+)m\b/' => fn (array $match) => I18N::plural('%s month', '%s months', (int) ($match[1]), I18N::number((float) $match[1])),
- '/\b(\d+)w\b/' => fn (array $match) => I18N::plural('%s week', '%s weeks', (int) ($match[1]), I18N::number((float) $match[1])),
- '/\b(\d+)d\b/' => fn (array $match) => I18N::plural('%s day', '%s days', (int) ($match[1]), I18N::number((float) $match[1])),
+ '/\b(\d+)y\b/' => fn (array $match) => I18N::plural('%s year', '%s years', (int) $match[1], I18N::number((float) $match[1])),
+ '/\b(\d+)m\b/' => fn (array $match) => I18N::plural('%s month', '%s months', (int) $match[1], I18N::number((float) $match[1])),
+ '/\b(\d+)w\b/' => fn (array $match) => I18N::plural('%s week', '%s weeks', (int) $match[1], I18N::number((float) $match[1])),
+ '/\b(\d+)d\b/' => fn (array $match) => I18N::plural('%s day', '%s days', (int) $match[1], I18N::number((float) $match[1])),
], e($canonical));
}
}
diff --git a/app/Functions/FunctionsRtl.php b/app/Functions/FunctionsRtl.php
index 43b906947e..a98846b8f8 100644
--- a/app/Functions/FunctionsRtl.php
+++ b/app/Functions/FunctionsRtl.php
@@ -283,7 +283,7 @@ class FunctionsRtl
$newState = 'LTR';
break;
}
- if (($currentLen !== 1) || ($currentLetter >= 'A' && $currentLetter <= 'Z') || ($currentLetter >= 'a' && $currentLetter <= 'z')) {
+ if ($currentLen !== 1 || $currentLetter >= 'A' && $currentLetter <= 'Z' || $currentLetter >= 'a' && $currentLetter <= 'z') {
// Since it’s neither Hebrew nor Arabic, this UTF-8 character or ASCII letter must be LTR
$newState = 'LTR';
break;
@@ -1111,7 +1111,7 @@ class FunctionsRtl
if ($countLeadingSpaces !== 0) {
$newLength = strlen($textSpan) + $countLeadingSpaces;
- $textSpan = str_pad($textSpan, $newLength, ' ', (I18N::direction() === 'rtl' ? STR_PAD_LEFT : STR_PAD_RIGHT));
+ $textSpan = str_pad($textSpan, $newLength, ' ', I18N::direction() === 'rtl' ? STR_PAD_LEFT : STR_PAD_RIGHT);
}
if ($countTrailingSpaces !== 0) {
if (I18N::direction() === 'ltr') {
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php
index c0bfb942c4..e79c638dec 100644
--- a/app/GedcomRecord.php
+++ b/app/GedcomRecord.php
@@ -1224,7 +1224,7 @@ class GedcomRecord
$sublevel = $level + 1;
$subsublevel = $sublevel + 1;
foreach ($facts as $fact) {
- if (preg_match_all('/^' . $level . ' (' .$fact_type . ') (.+)((\n[' . $sublevel . '-9].+)*)/m', $fact->gedcom(), $matches, PREG_SET_ORDER)) {
+ if (preg_match_all('/^' . $level . ' (' . $fact_type . ') (.+)((\n[' . $sublevel . '-9].+)*)/m', $fact->gedcom(), $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
// Treat 1 NAME / 2 TYPE married the same as _MARNM
if ($match[1] === 'NAME' && str_contains($match[3], "\n2 TYPE married")) {
diff --git a/app/Http/RequestHandlers/CalendarEvents.php b/app/Http/RequestHandlers/CalendarEvents.php
index 20a81df93a..550635d49d 100644
--- a/app/Http/RequestHandlers/CalendarEvents.php
+++ b/app/Http/RequestHandlers/CalendarEvents.php
@@ -184,9 +184,9 @@ class CalendarEvents implements RequestHandlerInterface
for ($week_day = 0; $week_day < $days_in_week; ++$week_day) {
$day_name = $cal_date->dayNames(($week_day + $week_start) % $days_in_week);
if ($week_day === $weekend_start || $week_day === $weekend_end) {
- echo '<th class="wt-page-options-label weekend" width="' . (100 / $days_in_week) . '%">', $day_name, '</th>';
+ echo '<th class="wt-page-options-label weekend" width="', 100 / $days_in_week, '%">', $day_name, '</th>';
} else {
- echo '<th class="wt-page-options-label" width="' . (100 / $days_in_week) . '%">', $day_name, '</th>';
+ echo '<th class="wt-page-options-label" width="', 100 / $days_in_week, '%">', $day_name, '</th>';
}
}
echo '</tr>';
diff --git a/app/Services/CalendarService.php b/app/Services/CalendarService.php
index 7dc5ed63df..36df192483 100644
--- a/app/Services/CalendarService.php
+++ b/app/Services/CalendarService.php
@@ -180,7 +180,7 @@ class CalendarService
foreach ($record->facts([$row->d_fact]) as $fact) {
// For date ranges, we need a match on either the start/end.
- if (($fact->date()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->date()->maximumJulianDay() === $anniv_date->maximumJulianDay())) {
+ if ($fact->date()->minimumJulianDay() === $anniv_date->minimumJulianDay() || $fact->date()->maximumJulianDay() === $anniv_date->maximumJulianDay()) {
$fact->anniv = 0;
$found_facts[] = $fact;
}
diff --git a/app/Soundex.php b/app/Soundex.php
index 4a7f5b3d15..9bdd7d0841 100644
--- a/app/Soundex.php
+++ b/app/Soundex.php
@@ -3586,7 +3586,7 @@ class Soundex
// Initialize
$name_script = I18N::textScript($name);
- $noVowels = ($name_script === 'Hebr' || $name_script === 'Arab');
+ $noVowels = $name_script === 'Hebr' || $name_script === 'Arab';
$lastPos = strlen($name) - 1;
$currPos = 0;
diff --git a/app/Statistics/Repository/FamilyRepository.php b/app/Statistics/Repository/FamilyRepository.php
index cfdbf72e14..c8ab93f933 100644
--- a/app/Statistics/Repository/FamilyRepository.php
+++ b/app/Statistics/Repository/FamilyRepository.php
@@ -1127,7 +1127,7 @@ class FamilyRepository
$husb = $family->husband();
$wife = $family->wife();
- if (($husb && ($husb->getAllDeathDates() || !$husb->isDead())) && ($wife && ($wife->getAllDeathDates() || !$wife->isDead()))) {
+ if ($husb && ($husb->getAllDeathDates() || !$husb->isDead()) && $wife && ($wife->getAllDeathDates() || !$wife->isDead())) {
if ($family !== null && $family->canShow()) {
if ($type === 'list') {
$top10[] = '<li><a href="' . e($family->url()) . '">' . $family->fullName() . '</a> (' . $age . ')' . '</li>';