| Conditions | 6 |
| Paths | 5 |
| Total Lines | 28 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public static function convert(\PhpGedcom\Record\Indi\Famc &$famc, $level = 0) |
||
| 28 | { |
||
| 29 | $output = ''; |
||
| 30 | // NAME |
||
| 31 | $_famc = $famc->getFams(); |
||
|
|
|||
| 32 | if(empty($_fams)){ |
||
| 33 | return $output; |
||
| 34 | } |
||
| 35 | $output.= $level." FAMC @".$_famc."@\n"; |
||
| 36 | // level up |
||
| 37 | $level++; |
||
| 38 | |||
| 39 | // PEDI |
||
| 40 | $pedi = $famc->getPedi(); |
||
| 41 | if(!empty($pedi)){ |
||
| 42 | $output.=$level." PEDI ".$pedi."\n"; |
||
| 43 | } |
||
| 44 | |||
| 45 | // note |
||
| 46 | $note = $famc->getSour(); |
||
| 47 | if(!empty($note) && count($note) > 0){ |
||
| 48 | foreach($note as $item){ |
||
| 49 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
||
| 50 | $output.=$_convert; |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 54 | return $output; |
||
| 55 | } |
||
| 57 |