| Conditions | 4 |
| Paths | 5 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public static function convert(\PhpGedcom\Record\Head\Sour\Data &$data, $level) |
||
| 27 | { |
||
| 28 | $output = ''; |
||
| 29 | $_data = $data->getData(); |
||
|
|
|||
| 30 | if ($_data) { |
||
| 31 | $output .= $level.' DATA '.$_data."\n"; |
||
| 32 | } else { |
||
| 33 | return $output; |
||
| 34 | } |
||
| 35 | |||
| 36 | // level up |
||
| 37 | $level++; |
||
| 38 | |||
| 39 | // DATE |
||
| 40 | $date = $corp->getDate(); |
||
| 41 | if ($date) { |
||
| 42 | $output .= $level.' DATE '.$date."\n"; |
||
| 43 | } |
||
| 44 | |||
| 45 | // COPR |
||
| 46 | $corp = $corp->getCorp(); |
||
| 47 | if ($corp) { |
||
| 48 | $output .= $level.' COPR '.$corp."\n"; |
||
| 49 | } |
||
| 50 | |||
| 51 | return $output; |
||
| 52 | } |
||
| 54 |