@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | ]; |
847 | 847 | |
848 | 848 | foreach (self::getAlphabetForLocale(WT_LOCALE) as $n => $letter) { |
849 | - $sql .= " AND n_surn COLLATE :collate_" . $n . " NOT LIKE :letter_" . $n; |
|
849 | + $sql .= " AND n_surn COLLATE :collate_" . $n . " NOT LIKE :letter_" . $n; |
|
850 | 850 | $args['collate_' . $n] = I18N::collation(); |
851 | 851 | $args['letter_' . $n] = $letter . '%'; |
852 | 852 | } |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | 'tree_id' => $tree->getTreeId(), |
868 | 868 | ]; |
869 | 869 | |
870 | - $count_no_surname = (int)Database::prepare($sql)->execute($args)->fetchOne(); |
|
870 | + $count_no_surname = (int) Database::prepare($sql)->execute($args)->fetchOne(); |
|
871 | 871 | if ($count_no_surname !== 0) { |
872 | 872 | // Special code to indicate "no surname" |
873 | 873 | $alphas[','] = $count_no_surname; |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | ]; |
934 | 934 | |
935 | 935 | if ($surn) { |
936 | - $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
936 | + $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
937 | 937 | $args['collate_1'] = I18N::collation(); |
938 | 938 | $args['surn'] = $surn; |
939 | 939 | } elseif ($salpha === ',') { |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | ]; |
987 | 987 | |
988 | 988 | if ($surn) { |
989 | - $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
989 | + $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
990 | 990 | $args['collate_1'] = I18N::collation(); |
991 | 991 | $args['surn'] = $surn; |
992 | 992 | } elseif ($salpha === ',') { |
@@ -999,7 +999,7 @@ discard block |
||
999 | 999 | // All surnames |
1000 | 1000 | $sql .= " AND n_surn NOT IN ('', '@N.N.')"; |
1001 | 1001 | } |
1002 | - $sql .= " GROUP BY n_surn COLLATE :collate_2, n_file) AS n2 ON (n1.n_surn = n2.n_surn COLLATE :collate_3 AND n1.n_file = n2.n_file)"; |
|
1002 | + $sql .= " GROUP BY n_surn COLLATE :collate_2, n_file) AS n2 ON (n1.n_surn = n2.n_surn COLLATE :collate_3 AND n1.n_file = n2.n_file)"; |
|
1003 | 1003 | $args['collate_2'] = I18N::collation(); |
1004 | 1004 | $args['collate_3'] = I18N::collation(); |
1005 | 1005 | |
@@ -1041,7 +1041,7 @@ discard block |
||
1041 | 1041 | ]; |
1042 | 1042 | |
1043 | 1043 | if ($surn) { |
1044 | - $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
1044 | + $sql .= " AND n_surn COLLATE :collate_1 = :surn"; |
|
1045 | 1045 | $args['collate_1'] = I18N::collation(); |
1046 | 1046 | $args['surn'] = $surn; |
1047 | 1047 | } elseif ($salpha === ',') { |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | $sql .= " AND " . self::getInitialSql('n_givn', $galpha); |
1059 | 1059 | } |
1060 | 1060 | |
1061 | - $sql .= " ORDER BY CASE n_surn WHEN '@N.N.' THEN 1 ELSE 0 END, n_surn COLLATE :collate_2, CASE n_givn WHEN '@P.N.' THEN 1 ELSE 0 END, n_givn COLLATE :collate_3"; |
|
1061 | + $sql .= " ORDER BY CASE n_surn WHEN '@N.N.' THEN 1 ELSE 0 END, n_surn COLLATE :collate_2, CASE n_givn WHEN '@P.N.' THEN 1 ELSE 0 END, n_givn COLLATE :collate_3"; |
|
1062 | 1062 | $args['collate_2'] = I18N::collation(); |
1063 | 1063 | $args['collate_3'] = I18N::collation(); |
1064 | 1064 |
@@ -1153,11 +1153,11 @@ |
||
1153 | 1153 | // The record does have a CHAN event |
1154 | 1154 | $d = $chan->getDate()->minimumDate(); |
1155 | 1155 | if (preg_match('/\n3 TIME (\d\d):(\d\d):(\d\d)/', $chan->getGedcom(), $match)) { |
1156 | - $t = mktime((int)$match[1], (int)$match[2], (int)$match[3], (int)$d->format('%n'), (int)$d->format('%j'), (int)$d->format('%Y')); |
|
1156 | + $t = mktime((int) $match[1], (int) $match[2], (int) $match[3], (int) $d->format('%n'), (int) $d->format('%j'), (int) $d->format('%Y')); |
|
1157 | 1157 | } elseif (preg_match('/\n3 TIME (\d\d):(\d\d)/', $chan->getGedcom(), $match)) { |
1158 | - $t = mktime((int)$match[1], (int)$match[2], 0, (int)$d->format('%n'), (int)$d->format('%j'), (int)$d->format('%Y')); |
|
1158 | + $t = mktime((int) $match[1], (int) $match[2], 0, (int) $d->format('%n'), (int) $d->format('%j'), (int) $d->format('%Y')); |
|
1159 | 1159 | } else { |
1160 | - $t = mktime(0, 0, 0, (int)$d->format('%n'), (int)$d->format('%j'), (int)$d->format('%Y')); |
|
1160 | + $t = mktime(0, 0, 0, (int) $d->format('%n'), (int) $d->format('%j'), (int) $d->format('%Y')); |
|
1161 | 1161 | } |
1162 | 1162 | if ($sorting) { |
1163 | 1163 | return $t; |
@@ -243,7 +243,7 @@ |
||
243 | 243 | DebugBar::addThrowable($ex); |
244 | 244 | |
245 | 245 | // The module has been deleted or is broken? Disable it. |
246 | - Log::addConfigurationLog("Module {$module_name} is missing or broken - disabling it. " . $ex->getMessage(), null); |
|
246 | + Log::addConfigurationLog("module {$module_name} is missing or broken - disabling it. " . $ex->getMessage(), null); |
|
247 | 247 | Database::prepare( |
248 | 248 | "UPDATE `##module` SET status = 'disabled' WHERE module_name = :module_name" |
249 | 249 | )->execute([ |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL); |
72 | 72 | break; |
73 | 73 | case 'boolean': |
74 | - $this->pdo_statement->bindValue($key, (int)$bind_variable, PDO::PARAM_INT); |
|
74 | + $this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT); |
|
75 | 75 | break; |
76 | 76 | case 'integer': |
77 | 77 | $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | if ($individual->getSex() === 'M') { |
38 | 38 | return ''; |
39 | 39 | } else { |
40 | - return (string)Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
40 | + return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
@@ -97,7 +97,7 @@ |
||
97 | 97 | */ |
98 | 98 | private function isChild(Individual $individual) |
99 | 99 | { |
100 | - $age = (int)Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
100 | + $age = (int) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
101 | 101 | |
102 | 102 | return $age < $this->age_adult; |
103 | 103 | } |
@@ -53,6 +53,6 @@ |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
56 | - return (string)$count; |
|
56 | + return (string) $count; |
|
57 | 57 | } |
58 | 58 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if ($marriage_date === null) { |
48 | 48 | return ''; |
49 | 49 | } else { |
50 | - return (string)Date::getAge($marriage_date, $this->date(), 0); |
|
50 | + return (string) Date::getAge($marriage_date, $this->date(), 0); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $years -= $years % 5; |
43 | 43 | } |
44 | 44 | |
45 | - return (string)$years; |
|
45 | + return (string) $years; |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | } |