| Conditions | 6 |
| Paths | 8 |
| Total Lines | 25 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public static function convert(\PhpGedcom\Record\Chan &$chan, $level) |
||
| 26 | { |
||
| 27 | $output = $level." CHAN \n"; |
||
| 28 | // level up |
||
| 29 | $level++; |
||
| 30 | // DATE |
||
| 31 | $_date = $chan->getDate(); |
||
| 32 | if (!empty($_date)) { |
||
| 33 | $output .= $level.' DATE '.$_date."\n"; |
||
| 34 | } |
||
| 35 | // TIME |
||
| 36 | $_time = $chan->getDate(); |
||
| 37 | if (!empty($_time)) { |
||
| 38 | $output .= $level.' DATE '.$_time."\n"; |
||
| 39 | } |
||
| 40 | // $_note = array() |
||
| 41 | $_note = $chan->getNote(); |
||
| 42 | if (!empty($_note) && count($_note) > 0) { |
||
| 43 | foreach ($_note as $item) { |
||
| 44 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
||
| 45 | $output .= $_convert; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | return $output; |
||
| 50 | } |
||
| 52 |