@@ -175,7 +175,7 @@ |
||
| 175 | 175 | 'words' => I18N::translate('Match the exact text, unless it occurs in the middle of a word.'), |
| 176 | 176 | 'wildcards' => I18N::translate('Use a “?” to match a single character, use “*” to match zero or more characters.'), |
| 177 | 177 | /* I18N: http://en.wikipedia.org/wiki/Regular_expression */ |
| 178 | - 'regex' => I18N::translate('Regular expressions are an advanced pattern matching technique.') . '<br>' . I18N::translate('See %s for more information.', '<a href="http://php.net/manual/regexp.reference.php">php.net/manual/regexp.reference.php</a>'), |
|
| 178 | + 'regex' => I18N::translate('Regular expressions are an advanced pattern matching technique.') . '<br>' . I18N::translate('See %s for more information.', '<a href="http://php.net/manual/regexp.reference.php">php.net/manual/regexp.reference.php</a>'), |
|
| 179 | 179 | ]; |
| 180 | 180 | |
| 181 | 181 | return |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $this->checkModuleIsActive($tree, 'lifespans_chart'); |
| 54 | 54 | |
| 55 | - $xrefs = (array)$request->get('xrefs', []); |
|
| 55 | + $xrefs = (array) $request->get('xrefs', []); |
|
| 56 | 56 | $addxref = $request->get('addxref', ''); |
| 57 | - $addfam = (bool)$request->get('addfam', false); |
|
| 57 | + $addfam = (bool) $request->get('addfam', false); |
|
| 58 | 58 | $placename = $request->get('placename', ''); |
| 59 | 59 | $start = $request->get('start', ''); |
| 60 | 60 | $end = $request->get('end', ''); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $this->checkModuleIsActive($tree, 'lifespans_chart'); |
| 113 | 113 | |
| 114 | - $xrefs = (array)$request->get('xrefs', []); |
|
| 114 | + $xrefs = (array) $request->get('xrefs', []); |
|
| 115 | 115 | $xrefs = array_unique($xrefs); |
| 116 | 116 | |
| 117 | 117 | /** @var Individual[] $individuals */ |
@@ -131,8 +131,8 @@ discard block |
||
| 131 | 131 | $subtitle = $request->get('subtitle'); |
| 132 | 132 | |
| 133 | 133 | // Round to whole decades |
| 134 | - $start_year = (int)floor($this->minYear($individuals) / 10) * 10; |
|
| 135 | - $end_year = (int)ceil($this->maxYear($individuals) / 10) * 10; |
|
| 134 | + $start_year = (int) floor($this->minYear($individuals) / 10) * 10; |
|
| 135 | + $end_year = (int) ceil($this->maxYear($individuals) / 10) * 10; |
|
| 136 | 136 | |
| 137 | 137 | $lifespans = $this->layoutIndividuals($individuals); |
| 138 | 138 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | 'U' => new ColorGenerator(120, self::SATURATION, self::LIGHTNESS, self::ALPHA, self::RANGE), |
| 168 | 168 | ]; |
| 169 | 169 | |
| 170 | - $current_year = (int)date('Y'); |
|
| 170 | + $current_year = (int) date('Y'); |
|
| 171 | 171 | |
| 172 | 172 | // Latest year used in each row |
| 173 | 173 | $rows = []; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | // Fill the row up to the year (leaving a small gap) |
| 197 | 197 | $rows[$next_row] = $death_year; |
| 198 | 198 | |
| 199 | - $lifespans[] = (object)[ |
|
| 199 | + $lifespans[] = (object) [ |
|
| 200 | 200 | 'background' => $colors[$individual->getSex()]->getNextColor(), |
| 201 | 201 | 'birth_year' => $birth_year, |
| 202 | 202 | 'death_year' => $death_year, |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $year = $this->jdToYear($jd); |
| 226 | 226 | |
| 227 | 227 | // Don't show future dates |
| 228 | - return min($year, (int)date('Y')); |
|
| 228 | + return min($year, (int) date('Y')); |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /** |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | ->setPreference('sessiontime', '0'); |
| 119 | 119 | |
| 120 | 120 | // Create a dummy user, so we can send messages from the tree. |
| 121 | - $sender = new User((object)[ |
|
| 121 | + $sender = new User((object) [ |
|
| 122 | 122 | 'user_id' => null, |
| 123 | 123 | 'user_name' => '', |
| 124 | 124 | 'real_name' => $tree->getTitle(), |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ); |
| 138 | 138 | |
| 139 | 139 | // Tell the genealogy contact about the registration. |
| 140 | - $webmaster = User::find((int)$tree->getPreference('WEBMASTER_USER_ID')); |
|
| 140 | + $webmaster = User::find((int) $tree->getPreference('WEBMASTER_USER_ID')); |
|
| 141 | 141 | |
| 142 | 142 | if ($webmaster !== null) { |
| 143 | 143 | I18N::init($webmaster->getPreference('language')); |
@@ -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); |
@@ -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 | |