| Conditions | 43 |
| Paths | 100 |
| Total Lines | 420 |
| Code Lines | 302 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 187 | private function childFacts(Individual $person, Family $family, string $option, string $relation, Date $min_date, Date $max_date): Collection |
||
| 188 | { |
||
| 189 | $SHOW_RELATIVES_EVENTS = $person->tree()->getPreference('SHOW_RELATIVES_EVENTS'); |
||
| 190 | |||
| 191 | $birth_of_a_child = [ |
||
| 192 | 'INDI:BIRT' => [ |
||
| 193 | 'M' => I18N::translate('Birth of a son'), |
||
| 194 | 'F' => I18N::translate('Birth of a daughter'), |
||
| 195 | 'U' => I18N::translate('Birth of a child'), |
||
| 196 | ], |
||
| 197 | 'INDI:CHR' => [ |
||
| 198 | 'M' => I18N::translate('Christening of a son'), |
||
| 199 | 'F' => I18N::translate('Christening of a daughter'), |
||
| 200 | 'U' => I18N::translate('Christening of a child'), |
||
| 201 | ], |
||
| 202 | 'INDI:BAPM' => [ |
||
| 203 | 'M' => I18N::translate('Baptism of a son'), |
||
| 204 | 'F' => I18N::translate('Baptism of a daughter'), |
||
| 205 | 'U' => I18N::translate('Baptism of a child'), |
||
| 206 | ], |
||
| 207 | 'INDI:ADOP' => [ |
||
| 208 | 'M' => I18N::translate('Adoption of a son'), |
||
| 209 | 'F' => I18N::translate('Adoption of a daughter'), |
||
| 210 | 'U' => I18N::translate('Adoption of a child'), |
||
| 211 | ], |
||
| 212 | ]; |
||
| 213 | |||
| 214 | $birth_of_a_sibling = [ |
||
| 215 | 'INDI:BIRT' => [ |
||
| 216 | 'M' => I18N::translate('Birth of a brother'), |
||
| 217 | 'F' => I18N::translate('Birth of a sister'), |
||
| 218 | 'U' => I18N::translate('Birth of a sibling'), |
||
| 219 | ], |
||
| 220 | 'INDI:CHR' => [ |
||
| 221 | 'M' => I18N::translate('Christening of a brother'), |
||
| 222 | 'F' => I18N::translate('Christening of a sister'), |
||
| 223 | 'U' => I18N::translate('Christening of a sibling'), |
||
| 224 | ], |
||
| 225 | 'INDI:BAPM' => [ |
||
| 226 | 'M' => I18N::translate('Baptism of a brother'), |
||
| 227 | 'F' => I18N::translate('Baptism of a sister'), |
||
| 228 | 'U' => I18N::translate('Baptism of a sibling'), |
||
| 229 | ], |
||
| 230 | 'INDI:ADOP' => [ |
||
| 231 | 'M' => I18N::translate('Adoption of a brother'), |
||
| 232 | 'F' => I18N::translate('Adoption of a sister'), |
||
| 233 | 'U' => I18N::translate('Adoption of a sibling'), |
||
| 234 | ], |
||
| 235 | ]; |
||
| 236 | |||
| 237 | $birth_of_a_half_sibling = [ |
||
| 238 | 'INDI:BIRT' => [ |
||
| 239 | 'M' => I18N::translate('Birth of a half-brother'), |
||
| 240 | 'F' => I18N::translate('Birth of a half-sister'), |
||
| 241 | 'U' => I18N::translate('Birth of a half-sibling'), |
||
| 242 | ], |
||
| 243 | 'INDI:CHR' => [ |
||
| 244 | 'M' => I18N::translate('Christening of a half-brother'), |
||
| 245 | 'F' => I18N::translate('Christening of a half-sister'), |
||
| 246 | 'U' => I18N::translate('Christening of a half-sibling'), |
||
| 247 | ], |
||
| 248 | 'INDI:BAPM' => [ |
||
| 249 | 'M' => I18N::translate('Baptism of a half-brother'), |
||
| 250 | 'F' => I18N::translate('Baptism of a half-sister'), |
||
| 251 | 'U' => I18N::translate('Baptism of a half-sibling'), |
||
| 252 | ], |
||
| 253 | 'INDI:ADOP' => [ |
||
| 254 | 'M' => I18N::translate('Adoption of a half-brother'), |
||
| 255 | 'F' => I18N::translate('Adoption of a half-sister'), |
||
| 256 | 'U' => I18N::translate('Adoption of a half-sibling'), |
||
| 257 | ], |
||
| 258 | ]; |
||
| 259 | |||
| 260 | $birth_of_a_grandchild = [ |
||
| 261 | 'INDI:BIRT' => [ |
||
| 262 | 'M' => I18N::translate('Birth of a grandson'), |
||
| 263 | 'F' => I18N::translate('Birth of a granddaughter'), |
||
| 264 | 'U' => I18N::translate('Birth of a grandchild'), |
||
| 265 | ], |
||
| 266 | 'INDI:CHR' => [ |
||
| 267 | 'M' => I18N::translate('Christening of a grandson'), |
||
| 268 | 'F' => I18N::translate('Christening of a granddaughter'), |
||
| 269 | 'U' => I18N::translate('Christening of a grandchild'), |
||
| 270 | ], |
||
| 271 | 'INDI:BAPM' => [ |
||
| 272 | 'M' => I18N::translate('Baptism of a grandson'), |
||
| 273 | 'F' => I18N::translate('Baptism of a granddaughter'), |
||
| 274 | 'U' => I18N::translate('Baptism of a grandchild'), |
||
| 275 | ], |
||
| 276 | 'INDI:ADOP' => [ |
||
| 277 | 'M' => I18N::translate('Adoption of a grandson'), |
||
| 278 | 'F' => I18N::translate('Adoption of a granddaughter'), |
||
| 279 | 'U' => I18N::translate('Adoption of a grandchild'), |
||
| 280 | ], |
||
| 281 | ]; |
||
| 282 | |||
| 283 | $birth_of_a_grandchild1 = [ |
||
| 284 | 'INDI:BIRT' => [ |
||
| 285 | 'M' => I18N::translateContext('daughter’s son', 'Birth of a grandson'), |
||
| 286 | 'F' => I18N::translateContext('daughter’s daughter', 'Birth of a granddaughter'), |
||
| 287 | 'U' => I18N::translate('Birth of a grandchild'), |
||
| 288 | ], |
||
| 289 | 'INDI:CHR' => [ |
||
| 290 | 'M' => I18N::translateContext('daughter’s son', 'Christening of a grandson'), |
||
| 291 | 'F' => I18N::translateContext('daughter’s daughter', 'Christening of a granddaughter'), |
||
| 292 | 'U' => I18N::translate('Christening of a grandchild'), |
||
| 293 | ], |
||
| 294 | 'INDI:BAPM' => [ |
||
| 295 | 'M' => I18N::translateContext('daughter’s son', 'Baptism of a grandson'), |
||
| 296 | 'F' => I18N::translateContext('daughter’s daughter', 'Baptism of a granddaughter'), |
||
| 297 | 'U' => I18N::translate('Baptism of a grandchild'), |
||
| 298 | ], |
||
| 299 | 'INDI:ADOP' => [ |
||
| 300 | 'M' => I18N::translateContext('daughter’s son', 'Adoption of a grandson'), |
||
| 301 | 'F' => I18N::translateContext('daughter’s daughter', 'Adoption of a granddaughter'), |
||
| 302 | 'U' => I18N::translate('Adoption of a grandchild'), |
||
| 303 | ], |
||
| 304 | ]; |
||
| 305 | |||
| 306 | $birth_of_a_grandchild2 = [ |
||
| 307 | 'INDI:BIRT' => [ |
||
| 308 | 'M' => I18N::translateContext('son’s son', 'Birth of a grandson'), |
||
| 309 | 'F' => I18N::translateContext('son’s daughter', 'Birth of a granddaughter'), |
||
| 310 | 'U' => I18N::translate('Birth of a grandchild'), |
||
| 311 | ], |
||
| 312 | 'INDI:CHR' => [ |
||
| 313 | 'M' => I18N::translateContext('son’s son', 'Christening of a grandson'), |
||
| 314 | 'F' => I18N::translateContext('son’s daughter', 'Christening of a granddaughter'), |
||
| 315 | 'U' => I18N::translate('Christening of a grandchild'), |
||
| 316 | ], |
||
| 317 | 'INDI:BAPM' => [ |
||
| 318 | 'M' => I18N::translateContext('son’s son', 'Baptism of a grandson'), |
||
| 319 | 'F' => I18N::translateContext('son’s daughter', 'Baptism of a granddaughter'), |
||
| 320 | 'U' => I18N::translate('Baptism of a grandchild'), |
||
| 321 | ], |
||
| 322 | 'INDI:ADOP' => [ |
||
| 323 | 'M' => I18N::translateContext('son’s son', 'Adoption of a grandson'), |
||
| 324 | 'F' => I18N::translateContext('son’s daughter', 'Adoption of a granddaughter'), |
||
| 325 | 'U' => I18N::translate('Adoption of a grandchild'), |
||
| 326 | ], |
||
| 327 | ]; |
||
| 328 | |||
| 329 | $death_of_a_child = [ |
||
| 330 | 'INDI:DEAT' => [ |
||
| 331 | 'M' => I18N::translate('Death of a son'), |
||
| 332 | 'F' => I18N::translate('Death of a daughter'), |
||
| 333 | 'U' => I18N::translate('Death of a child'), |
||
| 334 | ], |
||
| 335 | 'INDI:BURI' => [ |
||
| 336 | 'M' => I18N::translate('Burial of a son'), |
||
| 337 | 'F' => I18N::translate('Burial of a daughter'), |
||
| 338 | 'U' => I18N::translate('Burial of a child'), |
||
| 339 | ], |
||
| 340 | 'INDI:CREM' => [ |
||
| 341 | 'M' => I18N::translate('Cremation of a son'), |
||
| 342 | 'F' => I18N::translate('Cremation of a daughter'), |
||
| 343 | 'U' => I18N::translate('Cremation of a child'), |
||
| 344 | ], |
||
| 345 | ]; |
||
| 346 | |||
| 347 | $death_of_a_sibling = [ |
||
| 348 | 'INDI:DEAT' => [ |
||
| 349 | 'M' => I18N::translate('Death of a brother'), |
||
| 350 | 'F' => I18N::translate('Death of a sister'), |
||
| 351 | 'U' => I18N::translate('Death of a sibling'), |
||
| 352 | ], |
||
| 353 | 'INDI:BURI' => [ |
||
| 354 | 'M' => I18N::translate('Burial of a brother'), |
||
| 355 | 'F' => I18N::translate('Burial of a sister'), |
||
| 356 | 'U' => I18N::translate('Burial of a sibling'), |
||
| 357 | ], |
||
| 358 | 'INDI:CREM' => [ |
||
| 359 | 'M' => I18N::translate('Cremation of a brother'), |
||
| 360 | 'F' => I18N::translate('Cremation of a sister'), |
||
| 361 | 'U' => I18N::translate('Cremation of a sibling'), |
||
| 362 | ], |
||
| 363 | ]; |
||
| 364 | |||
| 365 | $death_of_a_half_sibling = [ |
||
| 366 | 'INDI:DEAT' => [ |
||
| 367 | 'M' => I18N::translate('Death of a half-brother'), |
||
| 368 | 'F' => I18N::translate('Death of a half-sister'), |
||
| 369 | 'U' => I18N::translate('Death of a half-sibling'), |
||
| 370 | ], |
||
| 371 | 'INDI:BURI' => [ |
||
| 372 | 'M' => I18N::translate('Burial of a half-brother'), |
||
| 373 | 'F' => I18N::translate('Burial of a half-sister'), |
||
| 374 | 'U' => I18N::translate('Burial of a half-sibling'), |
||
| 375 | ], |
||
| 376 | 'INDI:CREM' => [ |
||
| 377 | 'M' => I18N::translate('Cremation of a half-brother'), |
||
| 378 | 'F' => I18N::translate('Cremation of a half-sister'), |
||
| 379 | 'U' => I18N::translate('Cremation of a half-sibling'), |
||
| 380 | ], |
||
| 381 | ]; |
||
| 382 | |||
| 383 | $death_of_a_grandchild = [ |
||
| 384 | 'INDI:DEAT' => [ |
||
| 385 | 'M' => I18N::translate('Death of a grandson'), |
||
| 386 | 'F' => I18N::translate('Death of a granddaughter'), |
||
| 387 | 'U' => I18N::translate('Death of a grandchild'), |
||
| 388 | ], |
||
| 389 | 'INDI:BURI' => [ |
||
| 390 | 'M' => I18N::translate('Burial of a grandson'), |
||
| 391 | 'F' => I18N::translate('Burial of a granddaughter'), |
||
| 392 | 'U' => I18N::translate('Burial of a grandchild'), |
||
| 393 | ], |
||
| 394 | 'INDI:CREM' => [ |
||
| 395 | 'M' => I18N::translate('Cremation of a grandson'), |
||
| 396 | 'F' => I18N::translate('Cremation of a granddaughter'), |
||
| 397 | 'U' => I18N::translate('Baptism of a grandchild'), |
||
| 398 | ], |
||
| 399 | ]; |
||
| 400 | |||
| 401 | $death_of_a_grandchild1 = [ |
||
| 402 | 'INDI:DEAT' => [ |
||
| 403 | 'M' => I18N::translateContext('daughter’s son', 'Death of a grandson'), |
||
| 404 | 'F' => I18N::translateContext('daughter’s daughter', 'Death of a granddaughter'), |
||
| 405 | 'U' => I18N::translate('Death of a grandchild'), |
||
| 406 | ], |
||
| 407 | 'INDI:BURI' => [ |
||
| 408 | 'M' => I18N::translateContext('daughter’s son', 'Burial of a grandson'), |
||
| 409 | 'F' => I18N::translateContext('daughter’s daughter', 'Burial of a granddaughter'), |
||
| 410 | 'U' => I18N::translate('Burial of a grandchild'), |
||
| 411 | ], |
||
| 412 | 'INDI:CREM' => [ |
||
| 413 | 'M' => I18N::translateContext('daughter’s son', 'Cremation of a grandson'), |
||
| 414 | 'F' => I18N::translateContext('daughter’s daughter', 'Cremation of a granddaughter'), |
||
| 415 | 'U' => I18N::translate('Baptism of a grandchild'), |
||
| 416 | ], |
||
| 417 | ]; |
||
| 418 | |||
| 419 | $death_of_a_grandchild2 = [ |
||
| 420 | 'INDI:DEAT' => [ |
||
| 421 | 'M' => I18N::translateContext('son’s son', 'Death of a grandson'), |
||
| 422 | 'F' => I18N::translateContext('son’s daughter', 'Death of a granddaughter'), |
||
| 423 | 'U' => I18N::translate('Death of a grandchild'), |
||
| 424 | ], |
||
| 425 | 'INDI:BURI' => [ |
||
| 426 | 'M' => I18N::translateContext('son’s son', 'Burial of a grandson'), |
||
| 427 | 'F' => I18N::translateContext('son’s daughter', 'Burial of a granddaughter'), |
||
| 428 | 'U' => I18N::translate('Burial of a grandchild'), |
||
| 429 | ], |
||
| 430 | 'INDI:CREM' => [ |
||
| 431 | 'M' => I18N::translateContext('son’s son', 'Cremation of a grandson'), |
||
| 432 | 'F' => I18N::translateContext('son’s daughter', 'Cremation of a granddaughter'), |
||
| 433 | 'U' => I18N::translate('Cremation of a grandchild'), |
||
| 434 | ], |
||
| 435 | ]; |
||
| 436 | |||
| 437 | $marriage_of_a_child = [ |
||
| 438 | 'M' => I18N::translate('Marriage of a son'), |
||
| 439 | 'F' => I18N::translate('Marriage of a daughter'), |
||
| 440 | 'U' => I18N::translate('Marriage of a child'), |
||
| 441 | ]; |
||
| 442 | |||
| 443 | $marriage_of_a_grandchild = [ |
||
| 444 | 'M' => I18N::translate('Marriage of a grandson'), |
||
| 445 | 'F' => I18N::translate('Marriage of a granddaughter'), |
||
| 446 | 'U' => I18N::translate('Marriage of a grandchild'), |
||
| 447 | ]; |
||
| 448 | |||
| 449 | $marriage_of_a_grandchild1 = [ |
||
| 450 | 'M' => I18N::translateContext('daughter’s son', 'Marriage of a grandson'), |
||
| 451 | 'F' => I18N::translateContext('daughter’s daughter', 'Marriage of a granddaughter'), |
||
| 452 | 'U' => I18N::translate('Marriage of a grandchild'), |
||
| 453 | ]; |
||
| 454 | |||
| 455 | $marriage_of_a_grandchild2 = [ |
||
| 456 | 'M' => I18N::translateContext('son’s son', 'Marriage of a grandson'), |
||
| 457 | 'F' => I18N::translateContext('son’s daughter', 'Marriage of a granddaughter'), |
||
| 458 | 'U' => I18N::translate('Marriage of a grandchild'), |
||
| 459 | ]; |
||
| 460 | |||
| 461 | $marriage_of_a_sibling = [ |
||
| 462 | 'M' => I18N::translate('Marriage of a brother'), |
||
| 463 | 'F' => I18N::translate('Marriage of a sister'), |
||
| 464 | 'U' => I18N::translate('Marriage of a sibling'), |
||
| 465 | ]; |
||
| 466 | |||
| 467 | $marriage_of_a_half_sibling = [ |
||
| 468 | 'M' => I18N::translate('Marriage of a half-brother'), |
||
| 469 | 'F' => I18N::translate('Marriage of a half-sister'), |
||
| 470 | 'U' => I18N::translate('Marriage of a half-sibling'), |
||
| 471 | ]; |
||
| 472 | |||
| 473 | $facts = new Collection(); |
||
| 474 | |||
| 475 | // Deal with recursion. |
||
| 476 | if ($option === '_CHIL') { |
||
| 477 | // Add grandchildren |
||
| 478 | foreach ($family->children() as $child) { |
||
| 479 | foreach ($child->spouseFamilies() as $cfamily) { |
||
| 480 | switch ($child->sex()) { |
||
| 481 | case 'M': |
||
| 482 | foreach ($this->childFacts($person, $cfamily, '_GCHI', 'son', $min_date, $max_date) as $fact) { |
||
| 483 | $facts[] = $fact; |
||
| 484 | } |
||
| 485 | break; |
||
| 486 | case 'F': |
||
| 487 | foreach ($this->childFacts($person, $cfamily, '_GCHI', 'dau', $min_date, $max_date) as $fact) { |
||
| 488 | $facts[] = $fact; |
||
| 489 | } |
||
| 490 | break; |
||
| 491 | default: |
||
| 492 | foreach ($this->childFacts($person, $cfamily, '_GCHI', 'chi', $min_date, $max_date) as $fact) { |
||
| 493 | $facts[] = $fact; |
||
| 494 | } |
||
| 495 | break; |
||
| 496 | } |
||
| 497 | } |
||
| 498 | } |
||
| 499 | } |
||
| 500 | |||
| 501 | // For each child in the family |
||
| 502 | foreach ($family->children() as $child) { |
||
| 503 | if ($child->xref() === $person->xref()) { |
||
| 504 | // We are not our own sibling! |
||
| 505 | continue; |
||
| 506 | } |
||
| 507 | // add child’s birth |
||
| 508 | if (str_contains($SHOW_RELATIVES_EVENTS, '_BIRT' . str_replace('_HSIB', '_SIBL', $option))) { |
||
| 509 | foreach ($child->facts(['BIRT', 'CHR', 'BAPM', 'ADOP']) as $fact) { |
||
| 510 | // Always show _BIRT_CHIL, even if the dates are not known |
||
| 511 | if ($option === '_CHIL' || $this->includeFact($fact, $min_date, $max_date)) { |
||
| 512 | switch ($option) { |
||
| 513 | case '_GCHI': |
||
| 514 | switch ($relation) { |
||
| 515 | case 'dau': |
||
| 516 | $facts[] = $this->convertEvent($fact, $birth_of_a_grandchild1[$fact->tag()], $fact->record()->sex()); |
||
| 517 | break; |
||
| 518 | case 'son': |
||
| 519 | $facts[] = $this->convertEvent($fact, $birth_of_a_grandchild2[$fact->tag()], $fact->record()->sex()); |
||
| 520 | break; |
||
| 521 | case 'chil': |
||
| 522 | $facts[] = $this->convertEvent($fact, $birth_of_a_grandchild[$fact->tag()], $fact->record()->sex()); |
||
| 523 | break; |
||
| 524 | } |
||
| 525 | break; |
||
| 526 | case '_SIBL': |
||
| 527 | $facts[] = $this->convertEvent($fact, $birth_of_a_sibling[$fact->tag()], $fact->record()->sex()); |
||
| 528 | break; |
||
| 529 | case '_HSIB': |
||
| 530 | $facts[] = $this->convertEvent($fact, $birth_of_a_half_sibling[$fact->tag()], $fact->record()->sex()); |
||
| 531 | break; |
||
| 532 | case '_CHIL': |
||
| 533 | $facts[] = $this->convertEvent($fact, $birth_of_a_child[$fact->tag()], $fact->record()->sex()); |
||
| 534 | break; |
||
| 535 | } |
||
| 536 | } |
||
| 537 | } |
||
| 538 | } |
||
| 539 | // add child’s death |
||
| 540 | if (str_contains($SHOW_RELATIVES_EVENTS, '_DEAT' . str_replace('_HSIB', '_SIBL', $option))) { |
||
| 541 | foreach ($child->facts(['DEAT', 'BURI', 'CREM']) as $fact) { |
||
| 542 | if ($this->includeFact($fact, $min_date, $max_date)) { |
||
| 543 | switch ($option) { |
||
| 544 | case '_GCHI': |
||
| 545 | switch ($relation) { |
||
| 546 | case 'dau': |
||
| 547 | $facts[] = $this->convertEvent($fact, $death_of_a_grandchild1[$fact->tag()], $fact->record()->sex()); |
||
| 548 | break; |
||
| 549 | case 'son': |
||
| 550 | $facts[] = $this->convertEvent($fact, $death_of_a_grandchild2[$fact->tag()], $fact->record()->sex()); |
||
| 551 | break; |
||
| 552 | case 'chi': |
||
| 553 | $facts[] = $this->convertEvent($fact, $death_of_a_grandchild[$fact->tag()], $fact->record()->sex()); |
||
| 554 | break; |
||
| 555 | } |
||
| 556 | break; |
||
| 557 | case '_SIBL': |
||
| 558 | $facts[] = $this->convertEvent($fact, $death_of_a_sibling[$fact->tag()], $fact->record()->sex()); |
||
| 559 | break; |
||
| 560 | case '_HSIB': |
||
| 561 | $facts[] = $this->convertEvent($fact, $death_of_a_half_sibling[$fact->tag()], $fact->record()->sex()); |
||
| 562 | break; |
||
| 563 | case '_CHIL': |
||
| 564 | $facts[] = $this->convertEvent($fact, $death_of_a_child[$fact->tag()], $fact->record()->sex()); |
||
| 565 | break; |
||
| 566 | } |
||
| 567 | } |
||
| 568 | } |
||
| 569 | } |
||
| 570 | |||
| 571 | // add child’s marriage |
||
| 572 | if (str_contains($SHOW_RELATIVES_EVENTS, '_MARR' . str_replace('_HSIB', '_SIBL', $option))) { |
||
| 573 | foreach ($child->spouseFamilies() as $sfamily) { |
||
| 574 | foreach ($sfamily->facts(['MARR']) as $fact) { |
||
| 575 | if ($this->includeFact($fact, $min_date, $max_date)) { |
||
| 576 | switch ($option) { |
||
| 577 | case '_GCHI': |
||
| 578 | switch ($relation) { |
||
| 579 | case 'dau': |
||
| 580 | $facts[] = $this->convertEvent($fact, $marriage_of_a_grandchild1, $child->sex()); |
||
| 581 | break; |
||
| 582 | case 'son': |
||
| 583 | $facts[] = $this->convertEvent($fact, $marriage_of_a_grandchild2, $child->sex()); |
||
| 584 | break; |
||
| 585 | case 'chi': |
||
| 586 | $facts[] = $this->convertEvent($fact, $marriage_of_a_grandchild, $child->sex()); |
||
| 587 | break; |
||
| 588 | } |
||
| 589 | break; |
||
| 590 | case '_SIBL': |
||
| 591 | $facts[] = $this->convertEvent($fact, $marriage_of_a_sibling, $child->sex()); |
||
| 592 | break; |
||
| 593 | case '_HSIB': |
||
| 594 | $facts[] = $this->convertEvent($fact, $marriage_of_a_half_sibling, $child->sex()); |
||
| 595 | break; |
||
| 596 | case '_CHIL': |
||
| 597 | $facts[] = $this->convertEvent($fact, $marriage_of_a_child, $child->sex()); |
||
| 598 | break; |
||
| 599 | } |
||
| 600 | } |
||
| 601 | } |
||
| 602 | } |
||
| 603 | } |
||
| 604 | } |
||
| 605 | |||
| 606 | return $facts; |
||
| 607 | } |
||
| 870 |