@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $z_axis = $this->axisAll(); |
577 | 577 | // The stats query doesn't have an "all" function, so query M/F/U separately |
578 | 578 | foreach (['M', 'F', 'U'] as $sex) { |
579 | - $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
579 | + $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
580 | 580 | $indi = []; |
581 | 581 | foreach ($rows as $row) { |
582 | 582 | if (!in_array($row->d_gid, $indi)) { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | case self::Z_AXIS_SEX: |
590 | 590 | $z_axis = $this->axisSexes(); |
591 | 591 | foreach (array_keys($z_axis) as $sex) { |
592 | - $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
592 | + $rows = $stats->statsMarrAgeQuery(false, $sex); |
|
593 | 593 | $indi = []; |
594 | 594 | foreach ($rows as $row) { |
595 | 595 | if (!in_array($row->d_gid, $indi)) { |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | // The stats query doesn't have an "all" function, so query M/F/U separately |
606 | 606 | foreach (['M', 'F', 'U'] as $sex) { |
607 | 607 | $prev_boundary = 0; |
608 | - $indi = []; |
|
608 | + $indi = []; |
|
609 | 609 | foreach (array_keys($z_axis) as $boundary) { |
610 | 610 | $rows = $stats->statsMarrAgeQuery(false, $sex, $prev_boundary, $boundary); |
611 | 611 | foreach ($rows as $row) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $user_list[$tmp_user->getUserName()] = $tmp_user->getUserName(); |
166 | 166 | } |
167 | 167 | |
168 | - $action = $request->get('action'); |
|
168 | + $action = $request->get('action'); |
|
169 | 169 | |
170 | 170 | // @TODO This ought to be a POST action |
171 | 171 | if ($action === 'delete') { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function changesLogData(Request $request): Response |
233 | 233 | { |
234 | - list($select, , $where, $args1) = $this->changesQuery($request); |
|
234 | + list($select,, $where, $args1) = $this->changesQuery($request); |
|
235 | 235 | list($order_by, $limit, $args2) = $this->dataTablesPagination($request); |
236 | 236 | |
237 | 237 | $rows = Database::prepare( |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | )->execute(array_merge($args1, $args2))->fetchAll(); |
240 | 240 | |
241 | 241 | // Total filtered/unfiltered rows |
242 | - $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne(); |
|
243 | - $recordsTotal = (int)Database::prepare("SELECT COUNT(*) FROM `##change`")->fetchOne(); |
|
242 | + $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne(); |
|
243 | + $recordsTotal = (int) Database::prepare("SELECT COUNT(*) FROM `##change`")->fetchOne(); |
|
244 | 244 | |
245 | 245 | $data = []; |
246 | 246 | $algorithm = new MyersDiff(); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | |
292 | 292 | // See http://www.datatables.net/usage/server-side |
293 | 293 | return new JsonResponse([ |
294 | - 'draw' => (int)$request->get('draw'), |
|
294 | + 'draw' => (int) $request->get('draw'), |
|
295 | 295 | 'recordsTotal' => $recordsTotal, |
296 | 296 | 'recordsFiltered' => $recordsFiltered, |
297 | 297 | 'data' => $data, |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function changesLogDownload(Request $request): Response |
309 | 309 | { |
310 | - list($select, , $where, $args) = $this->changesQuery($request); |
|
310 | + list($select,, $where, $args) = $this->changesQuery($request); |
|
311 | 311 | |
312 | 312 | $rows = Database::prepare($select . $where)->execute($args)->fetchAll(); |
313 | 313 | |
@@ -449,8 +449,8 @@ discard block |
||
449 | 449 | 'RESN', |
450 | 450 | ]; |
451 | 451 | |
452 | - $start = (int)$request->get('start', 0); |
|
453 | - $length = (int)$request->get('length', 20); |
|
452 | + $start = (int) $request->get('start', 0); |
|
453 | + $length = (int) $request->get('length', 20); |
|
454 | 454 | $search = $request->get('search', []); |
455 | 455 | $search = $search['value'] ?? ''; |
456 | 456 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | $args = []; |
471 | 471 | |
472 | 472 | if ($search !== '') { |
473 | - $where .= " AND (multimedia_file_refn LIKE CONCAT('%', :search1, '%') OR multimedia_file_refn LIKE CONCAT('%', :search2, '%'))"; |
|
473 | + $where .= " AND (multimedia_file_refn LIKE CONCAT('%', :search1, '%') OR multimedia_file_refn LIKE CONCAT('%', :search2, '%'))"; |
|
474 | 474 | $args['search1'] = $search; |
475 | 475 | $args['search2'] = $search; |
476 | 476 | } |
@@ -489,8 +489,8 @@ discard block |
||
489 | 489 | )->fetchAll(); |
490 | 490 | |
491 | 491 | // Total filtered/unfiltered rows |
492 | - $recordsFiltered = (int)Database::prepare("SELECT FOUND_ROWS()")->fetchOne(); |
|
493 | - $recordsTotal = (int)Database::prepare($select2)->fetchOne(); |
|
492 | + $recordsFiltered = (int) Database::prepare("SELECT FOUND_ROWS()")->fetchOne(); |
|
493 | + $recordsTotal = (int) Database::prepare($select2)->fetchOne(); |
|
494 | 494 | |
495 | 495 | // Turn each row from the query into a row for the table |
496 | 496 | $data = array_map(function (stdClass $datum) use ($ignore_facts) { |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | }, $data); |
533 | 533 | |
534 | 534 | return new JsonResponse([ |
535 | - 'draw' => (int)$request->get('draw'), |
|
535 | + 'draw' => (int) $request->get('draw'), |
|
536 | 536 | 'recordsTotal' => $recordsTotal, |
537 | 537 | 'recordsFiltered' => $recordsFiltered, |
538 | 538 | 'data' => $data, |
@@ -621,8 +621,8 @@ discard block |
||
621 | 621 | */ |
622 | 622 | public function webtrees1ThumbnailsData(Request $request): JsonResponse |
623 | 623 | { |
624 | - $start = (int)$request->get('start', 0); |
|
625 | - $length = (int)$request->get('length', 20); |
|
624 | + $start = (int) $request->get('start', 0); |
|
625 | + $length = (int) $request->get('length', 20); |
|
626 | 626 | $search = $request->get('search', []); |
627 | 627 | $search = $search['value'] ?? ''; |
628 | 628 | |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | $data = array_map(function (string $thumbnail) { |
654 | 654 | $original = $this->findOriginalFileFromThumbnail($thumbnail); |
655 | 655 | |
656 | - $original_url = route('unused-media-thumbnail', [ |
|
656 | + $original_url = route('unused-media-thumbnail', [ |
|
657 | 657 | 'folder' => dirname($original), |
658 | 658 | 'file' => basename($original), |
659 | 659 | 'w' => 100, |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | }, $thumbnails); |
696 | 696 | |
697 | 697 | return new JsonResponse([ |
698 | - 'draw' => (int)$request->get('draw'), |
|
698 | + 'draw' => (int) $request->get('draw'), |
|
699 | 699 | 'recordsTotal' => $recordsTotal, |
700 | 700 | 'recordsFiltered' => $recordsFiltered, |
701 | 701 | 'data' => $data, |
@@ -1021,7 +1021,7 @@ discard block |
||
1021 | 1021 | */ |
1022 | 1022 | public function treePrivacyUpdate(Request $request, Tree $tree): RedirectResponse |
1023 | 1023 | { |
1024 | - foreach ((array)$request->get('delete') as $default_resn_id) { |
|
1024 | + foreach ((array) $request->get('delete') as $default_resn_id) { |
|
1025 | 1025 | Database::prepare( |
1026 | 1026 | "DELETE FROM `##default_resn` WHERE default_resn_id = :default_resn_id" |
1027 | 1027 | )->execute([ |
@@ -1029,13 +1029,13 @@ discard block |
||
1029 | 1029 | ]); |
1030 | 1030 | } |
1031 | 1031 | |
1032 | - $xrefs = (array)$request->get('xref'); |
|
1033 | - $tag_types = (array)$request->get('tag_type'); |
|
1034 | - $resns = (array)$request->get('resn'); |
|
1032 | + $xrefs = (array) $request->get('xref'); |
|
1033 | + $tag_types = (array) $request->get('tag_type'); |
|
1034 | + $resns = (array) $request->get('resn'); |
|
1035 | 1035 | |
1036 | 1036 | foreach ($xrefs as $n => $xref) { |
1037 | - $tag_type = (string)$tag_types[$n]; |
|
1038 | - $resn = (string)$resns[$n]; |
|
1037 | + $tag_type = (string) $tag_types[$n]; |
|
1038 | + $resn = (string) $resns[$n]; |
|
1039 | 1039 | |
1040 | 1040 | if ($tag_type !== '' || $xref !== '') { |
1041 | 1041 | // Delete any existing data |
@@ -1081,10 +1081,10 @@ discard block |
||
1081 | 1081 | FlashMessages::addMessage(I18N::translate('The preferences for the family tree “%s” have been updated.', e($tree->getTitle()), 'success')); |
1082 | 1082 | |
1083 | 1083 | // Coming soon... |
1084 | - if ((bool)$request->get('all_trees')) { |
|
1084 | + if ((bool) $request->get('all_trees')) { |
|
1085 | 1085 | FlashMessages::addMessage(I18N::translate('The preferences for all family trees have been updated.', e($tree->getTitle())), 'success'); |
1086 | 1086 | } |
1087 | - if ((bool)$request->get('new_trees')) { |
|
1087 | + if ((bool) $request->get('new_trees')) { |
|
1088 | 1088 | FlashMessages::addMessage(I18N::translate('The preferences for new family trees have been updated.', e($tree->getTitle())), 'success'); |
1089 | 1089 | } |
1090 | 1090 | |
@@ -1107,7 +1107,7 @@ discard block |
||
1107 | 1107 | foreach ($modules as $module) { |
1108 | 1108 | foreach (Tree::getAll() as $tree) { |
1109 | 1109 | $key = 'access-' . $module->getName() . '-' . $tree->getTreeId(); |
1110 | - $access_level = (int)$request->get($key, $module->defaultAccessLevel()); |
|
1110 | + $access_level = (int) $request->get($key, $module->defaultAccessLevel()); |
|
1111 | 1111 | |
1112 | 1112 | Database::prepare("REPLACE INTO `##module_privacy` (module_name, gedcom_id, component, access_level) VALUES (:module_name, :tree_id, :component, :access_level)")->execute([ |
1113 | 1113 | 'module_name' => $module->getName(), |
@@ -1134,7 +1134,7 @@ discard block |
||
1134 | 1134 | $module_status = Database::prepare("SELECT module_name, status FROM `##module`")->fetchAssoc(); |
1135 | 1135 | |
1136 | 1136 | foreach ($modules as $module) { |
1137 | - $new_status = (bool)$request->get('status-' . $module->getName()) ? 'enabled' : 'disabled'; |
|
1137 | + $new_status = (bool) $request->get('status-' . $module->getName()) ? 'enabled' : 'disabled'; |
|
1138 | 1138 | $old_status = $module_status[$module->getName()]; |
1139 | 1139 | |
1140 | 1140 | if ($new_status !== $old_status) { |
@@ -1197,36 +1197,36 @@ discard block |
||
1197 | 1197 | $where = ' WHERE 1'; |
1198 | 1198 | $args = []; |
1199 | 1199 | if ($search !== '') { |
1200 | - $where .= " AND (old_gedcom LIKE CONCAT('%', :search_1, '%') OR new_gedcom LIKE CONCAT('%', :search_2, '%'))"; |
|
1200 | + $where .= " AND (old_gedcom LIKE CONCAT('%', :search_1, '%') OR new_gedcom LIKE CONCAT('%', :search_2, '%'))"; |
|
1201 | 1201 | $args['search_1'] = $search; |
1202 | 1202 | $args['search_2'] = $search; |
1203 | 1203 | } |
1204 | 1204 | if ($from !== '') { |
1205 | - $where .= " AND change_time >= :from"; |
|
1205 | + $where .= " AND change_time >= :from"; |
|
1206 | 1206 | $args['from'] = $from; |
1207 | 1207 | } |
1208 | 1208 | if ($to !== '') { |
1209 | - $where .= ' AND change_time < TIMESTAMPADD(DAY, 1 , :to)'; // before end of the day |
|
1209 | + $where .= ' AND change_time < TIMESTAMPADD(DAY, 1 , :to)'; // before end of the day |
|
1210 | 1210 | $args['to'] = $to; |
1211 | 1211 | } |
1212 | 1212 | if ($type !== '') { |
1213 | - $where .= ' AND status = :status'; |
|
1213 | + $where .= ' AND status = :status'; |
|
1214 | 1214 | $args['status'] = $type; |
1215 | 1215 | } |
1216 | 1216 | if ($oldged !== '') { |
1217 | - $where .= " AND old_gedcom LIKE CONCAT('%', :old_ged, '%')"; |
|
1217 | + $where .= " AND old_gedcom LIKE CONCAT('%', :old_ged, '%')"; |
|
1218 | 1218 | $args['old_ged'] = $oldged; |
1219 | 1219 | } |
1220 | 1220 | if ($newged !== '') { |
1221 | - $where .= " AND new_gedcom LIKE CONCAT('%', :new_ged, '%')"; |
|
1221 | + $where .= " AND new_gedcom LIKE CONCAT('%', :new_ged, '%')"; |
|
1222 | 1222 | $args['new_ged'] = $newged; |
1223 | 1223 | } |
1224 | 1224 | if ($xref !== '') { |
1225 | - $where .= " AND xref = :xref"; |
|
1225 | + $where .= " AND xref = :xref"; |
|
1226 | 1226 | $args['xref'] = $xref; |
1227 | 1227 | } |
1228 | 1228 | if ($username !== '') { |
1229 | - $where .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
1229 | + $where .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
1230 | 1230 | $args['user'] = $username; |
1231 | 1231 | } |
1232 | 1232 | if ($ged !== '') { |
@@ -1277,8 +1277,8 @@ discard block |
||
1277 | 1277 | */ |
1278 | 1278 | private function dataTablesPagination(Request $request): array |
1279 | 1279 | { |
1280 | - $start = (int)$request->get('start', '0'); |
|
1281 | - $length = (int)$request->get('length', '0'); |
|
1280 | + $start = (int) $request->get('start', '0'); |
|
1281 | + $length = (int) $request->get('length', '0'); |
|
1282 | 1282 | $order = $request->get('order', []); |
1283 | 1283 | $args = []; |
1284 | 1284 | |
@@ -1429,7 +1429,7 @@ discard block |
||
1429 | 1429 | } |
1430 | 1430 | |
1431 | 1431 | // The maximum difference is 255 (black versus white). |
1432 | - return 100 - (int)($max_difference * 100 / 255); |
|
1432 | + return 100 - (int) ($max_difference * 100 / 255); |
|
1433 | 1433 | } |
1434 | 1434 | |
1435 | 1435 | /** |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | $pixels[$x] = []; |
1461 | 1461 | for ($y = 0; $y < $size; ++$y) { |
1462 | 1462 | $pixel = $image->pickColor($x, $y); |
1463 | - $pixels[$x][$y] = (int)(($pixel[0] + $pixel[1] + $pixel[2]) / 3); |
|
1463 | + $pixels[$x][$y] = (int) (($pixel[0] + $pixel[1] + $pixel[2]) / 3); |
|
1464 | 1464 | } |
1465 | 1465 | } |
1466 | 1466 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | class PedigreeMapModule extends AbstractModule implements ModuleChartInterface |
37 | 37 | { |
38 | - const LINE_COLORS = [ |
|
38 | + const LINE_COLORS = [ |
|
39 | 39 | '#FF0000', |
40 | 40 | // Red |
41 | 41 | '#00FF00', |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $color = self::LINE_COLORS[log($id, 2) % $color_count]; |
141 | 141 | $icon['color'] = $color; //make icon color the same as the line |
142 | 142 | $sosa_points[$id] = $event->getLatLonJSArray(); |
143 | - $sosa_parent = (int)floor($id / 2); |
|
143 | + $sosa_parent = (int) floor($id / 2); |
|
144 | 144 | if (array_key_exists($sosa_parent, $sosa_points)) { |
145 | 145 | // Would like to use a GeometryCollection to hold LineStrings |
146 | 146 | // rather than generate polylines but the MarkerCluster library |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'icon' => $icon, |
169 | 169 | 'tooltip' => $event->toolTip(), |
170 | 170 | 'summary' => view('modules/pedigree-map/event-sidebar', $event->shortSummary('pedigree', $id)), |
171 | - 'zoom' => (int)$event->getZoom(), |
|
171 | + 'zoom' => (int) $event->getZoom(), |
|
172 | 172 | ], |
173 | 173 | ]; |
174 | 174 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | { |
189 | 189 | $xref = $request->get('reference'); |
190 | 190 | $individual = Individual::getInstance($xref, $tree); |
191 | - $generations = (int)$request->get( |
|
191 | + $generations = (int) $request->get( |
|
192 | 192 | 'generations', |
193 | 193 | $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS') |
194 | 194 | ); |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | function ($item) { |
242 | 242 | return preg_replace('/[^a-z\d]/i', '', strtolower($item)); |
243 | 243 | }, |
244 | - (array)$provider->styles |
|
244 | + (array) $provider->styles |
|
245 | 245 | ); |
246 | 246 | |
247 | - $key = preg_replace('/[^a-z\d]/i', '', strtolower((string)$provider->name)); |
|
247 | + $key = preg_replace('/[^a-z\d]/i', '', strtolower((string) $provider->name)); |
|
248 | 248 | |
249 | 249 | self::$map_providers[$key] = [ |
250 | - 'name' => (string)$provider->name, |
|
251 | - 'styles' => array_combine($style_keys, (array)$provider->styles), |
|
250 | + 'name' => (string) $provider->name, |
|
251 | + 'styles' => array_combine($style_keys, (array) $provider->styles), |
|
252 | 252 | ]; |
253 | 253 | } |
254 | 254 | } catch (Exception $ex) { |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | 'provider' => 'openstreetmap', |
258 | 258 | 'style' => 'mapnik', |
259 | 259 | ]; |
260 | - self::$map_providers = [ |
|
260 | + self::$map_providers = [ |
|
261 | 261 | 'openstreetmap' => [ |
262 | 262 | 'name' => 'OpenStreetMap', |
263 | 263 | 'styles' => ['mapnik' => 'Mapnik'], |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | throw new IndividualAccessDeniedException(); |
319 | 319 | } |
320 | 320 | |
321 | - return (object)[ |
|
321 | + return (object) [ |
|
322 | 322 | 'name' => 'modules/pedigree-map/pedigree-map-page', |
323 | 323 | 'data' => [ |
324 | 324 | 'module' => $this->getName(), |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $input['control'] = FunctionsEdit::formControlSource($tree, $source, $attributes + ['required' => 'true']); |
116 | 116 | break; |
117 | 117 | case 'DATE': |
118 | - $attributes += [ |
|
118 | + $attributes += [ |
|
119 | 119 | 'type' => 'text', |
120 | 120 | 'value' => $input['default'], |
121 | 121 | ]; |
@@ -129,16 +129,16 @@ discard block |
||
129 | 129 | default: |
130 | 130 | switch ($input['type']) { |
131 | 131 | case 'text': |
132 | - $attributes += [ |
|
132 | + $attributes += [ |
|
133 | 133 | 'type' => 'text', |
134 | 134 | 'value' => $input['default'], |
135 | 135 | ]; |
136 | 136 | $input['control'] = '<input ' . Html::attributes($attributes) . '>'; |
137 | 137 | break; |
138 | 138 | case 'checkbox': |
139 | - $attributes += [ |
|
139 | + $attributes += [ |
|
140 | 140 | 'type' => 'checkbox', |
141 | - 'checked' => (bool)$input['default'], |
|
141 | + 'checked' => (bool) $input['default'], |
|
142 | 142 | ]; |
143 | 143 | $input['control'] = '<input ' . Html::attributes($attributes) . '>'; |
144 | 144 | break; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function reorderChildrenAction(Request $request, Tree $tree): Response |
63 | 63 | { |
64 | 64 | $xref = $request->get('xref'); |
65 | - $order = (array)$request->get('order', []); |
|
65 | + $order = (array) $request->get('order', []); |
|
66 | 66 | $family = Family::getInstance($xref, $tree); |
67 | 67 | |
68 | 68 | $this->checkFamilyAccess($family, true); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->checkFamilyAccess($family, true); |
139 | 139 | |
140 | 140 | $PEDI = $request->get('PEDI', ''); |
141 | - $keep_chan = (bool)$request->get('keep_chan'); |
|
141 | + $keep_chan = (bool) $request->get('keep_chan'); |
|
142 | 142 | |
143 | 143 | $this->glevels = $request->get('glevels', []); |
144 | 144 | $this->tag = $request->get('tag', []); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | } |
157 | 157 | $gedrec .= "\n" . GedcomCodePedi::createNewFamcPedi($PEDI, $xref); |
158 | - if ((bool)$request->get('SOUR_INDI')) { |
|
158 | + if ((bool) $request->get('SOUR_INDI')) { |
|
159 | 159 | $gedrec = $this->handleUpdates($gedrec); |
160 | 160 | } else { |
161 | 161 | $gedrec = $this->updateRest($gedrec); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | - if ((bool)$request->get('SOUR_INDI')) { |
|
256 | + if ((bool) $request->get('SOUR_INDI')) { |
|
257 | 257 | $gedrec = $this->handleUpdates($gedrec); |
258 | 258 | } else { |
259 | 259 | $gedrec = $this->updateRest($gedrec); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $famrec .= $this->addNewFact($request, $tree, $match); |
274 | 274 | } |
275 | 275 | } |
276 | - if ((bool)$request->get('SOUR_FAM')) { |
|
276 | + if ((bool) $request->get('SOUR_FAM')) { |
|
277 | 277 | $famrec = $this->handleUpdates($famrec); |
278 | 278 | } else { |
279 | 279 | $famrec = $this->updateRest($famrec); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function reorderMediaAction(Request $request, Tree $tree): Response |
63 | 63 | { |
64 | 64 | $xref = $request->get('xref'); |
65 | - $order = (array)$request->get('order', []); |
|
65 | + $order = (array) $request->get('order', []); |
|
66 | 66 | $individual = Individual::getInstance($xref, $tree); |
67 | 67 | |
68 | 68 | $this->checkIndividualAccess($individual, true); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | public function reorderNamesAction(Request $request, Tree $tree): Response |
124 | 124 | { |
125 | 125 | $xref = $request->get('xref'); |
126 | - $order = (array)$request->get('order', []); |
|
126 | + $order = (array) $request->get('order', []); |
|
127 | 127 | $individual = Individual::getInstance($xref, $tree); |
128 | 128 | |
129 | 129 | $this->checkIndividualAccess($individual, true); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | public function reorderSpousesAction(Request $request, Tree $tree): Response |
185 | 185 | { |
186 | 186 | $xref = $request->get('xref'); |
187 | - $order = (array)$request->get('order', []); |
|
187 | + $order = (array) $request->get('order', []); |
|
188 | 188 | $individual = Individual::getInstance($xref, $tree); |
189 | 189 | |
190 | 190 | $this->checkIndividualAccess($individual, true); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $gedcom .= $this->addNewFact($request, $tree, $match); |
292 | 292 | } |
293 | 293 | } |
294 | - if ((bool)$request->get('SOUR_INDI')) { |
|
294 | + if ((bool) $request->get('SOUR_INDI')) { |
|
295 | 295 | $gedcom = $this->handleUpdates($gedcom); |
296 | 296 | } else { |
297 | 297 | $gedcom = $this->updateRest($gedcom); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | $gedcom .= $this->addNewFact($request, $tree, $match); |
384 | 384 | } |
385 | 385 | } |
386 | - if ((bool)$request->get('SOUR_INDI')) { |
|
386 | + if ((bool) $request->get('SOUR_INDI')) { |
|
387 | 387 | $gedcom = $this->handleUpdates($gedcom); |
388 | 388 | } else { |
389 | 389 | $gedcom = $this->updateRest($gedcom); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | */ |
417 | 417 | public function addSpouse(Request $request, Tree $tree): Response |
418 | 418 | { |
419 | - $xref = $request->get('xref', ''); |
|
419 | + $xref = $request->get('xref', ''); |
|
420 | 420 | |
421 | 421 | $individual = Individual::getInstance($xref, $tree); |
422 | 422 | |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | $indi_gedcom .= $this->addNewFact($request, $tree, $match); |
475 | 475 | } |
476 | 476 | } |
477 | - if ((bool)$request->get('SOUR_INDI')) { |
|
477 | + if ((bool) $request->get('SOUR_INDI')) { |
|
478 | 478 | $indi_gedcom = $this->handleUpdates($indi_gedcom); |
479 | 479 | } else { |
480 | 480 | $indi_gedcom = $this->updateRest($indi_gedcom); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $fam_gedcom .= $this->addNewFact($request, $tree, $match); |
487 | 487 | } |
488 | 488 | } |
489 | - if ((bool)$request->get('SOUR_FAM')) { |
|
489 | + if ((bool) $request->get('SOUR_FAM')) { |
|
490 | 490 | $fam_gedcom = $this->handleUpdates($fam_gedcom); |
491 | 491 | } else { |
492 | 492 | $fam_gedcom = $this->updateRest($fam_gedcom); |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | $gedrec .= $this->addNewFact($request, $tree, $match); |
561 | 561 | } |
562 | 562 | } |
563 | - if ((bool)$request->get('SOUR_INDI')) { |
|
563 | + if ((bool) $request->get('SOUR_INDI')) { |
|
564 | 564 | $gedrec = $this->handleUpdates($gedrec); |
565 | 565 | } else { |
566 | 566 | $gedrec = $this->updateRest($gedrec); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | // Construct from an array (of three gedcom-style strings: "1900", "FEB", "4") |
109 | 109 | if (is_array($date)) { |
110 | - $this->d = (int)$date[2]; |
|
110 | + $this->d = (int) $date[2]; |
|
111 | 111 | if (array_key_exists($date[1], static::$MONTH_ABBREV)) { |
112 | 112 | $this->m = static::$MONTH_ABBREV[$date[1]]; |
113 | 113 | } else { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $jd = $date->calendar->ymdToJd($today[0], $date->m, $date->d == 0 ? $today[2] : $date->d); |
155 | 155 | } else { |
156 | 156 | // Complete date |
157 | - $jd = (int)(($date->maxJD + $date->minJD) / 2); |
|
157 | + $jd = (int) (($date->maxJD + $date->minJD) / 2); |
|
158 | 158 | } |
159 | 159 | list($this->y, $this->m, $this->d) = $this->calendar->jdToYmd($jd); |
160 | 160 | // New date has same precision as original date |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | { |
962 | 962 | if ($number < 1) { |
963 | 963 | // Cannot convert zero/negative numbers |
964 | - return (string)$number; |
|
964 | + return (string) $number; |
|
965 | 965 | } |
966 | 966 | $roman = ''; |
967 | 967 | foreach (self::$roman_numerals as $key => $value) { |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | $num = 0; |
987 | 987 | foreach (self::$roman_numerals as $key => $value) { |
988 | 988 | if (strpos($roman, $value) === 0) { |
989 | - $num += $key; |
|
989 | + $num += $key; |
|
990 | 990 | $roman = substr($roman, strlen($value)); |
991 | 991 | } |
992 | 992 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $calendar_service = new CalendarService(); |
70 | 70 | |
71 | - $days = (int)$this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
|
71 | + $days = (int) $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
|
72 | 72 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_STYLE); |
73 | 73 | $calendar = $this->getBlockSetting($block_id, 'calendar', self::DEFAULT_CALENDAR); |
74 | 74 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | $yahrzeit_date = new Date($yahrzeit_date->format('%@ %A %O %E')); |
124 | 124 | |
125 | - $yahrzeits[] = (object)[ |
|
125 | + $yahrzeits[] = (object) [ |
|
126 | 126 | 'individual' => $fact->getParent(), |
127 | 127 | 'fact_date' => $fact->getDate(), |
128 | 128 | 'fact' => $fact, |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $default_events = implode(',', self::DEFAULT_EVENTS); |
119 | 119 | |
120 | 120 | $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
121 | - $filter = (bool)$this->getBlockSetting($block_id, 'filter', self::DEFAULT_FILTER); |
|
121 | + $filter = (bool) $this->getBlockSetting($block_id, 'filter', self::DEFAULT_FILTER); |
|
122 | 122 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_STYLE); |
123 | 123 | $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT); |
124 | 124 | $events = $this->getBlockSetting($block_id, 'events', $default_events); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $events_filter = implode('|', $event_array); |
137 | 137 | |
138 | 138 | $startjd = WT_CLIENT_JD + 1; |
139 | - $endjd = WT_CLIENT_JD + (int)$days; |
|
139 | + $endjd = WT_CLIENT_JD + (int) $days; |
|
140 | 140 | |
141 | 141 | $facts = $calendar_service->getEventsList($startjd, $endjd, $events_filter, $filter, $sortStyle, $tree); |
142 | 142 |