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