| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function parse(\PhpGedcom\Parser $parser) |
||
| 20 | { |
||
| 21 | $record = $parser->getCurrentLineRecord(); |
||
| 22 | $depth = (int) $record[0]; |
||
| 23 | if (isset($record[1])) { |
||
| 24 | $dat = new \PhpGedcom\Record\Date(); |
||
| 25 | if (!empty($record[2])) { |
||
| 26 | $dat->setDate($record[2]); |
||
| 27 | } |
||
| 28 | } else { |
||
| 29 | $parser->skipToNextLevel($depth); |
||
| 30 | |||
| 31 | return null; |
||
| 32 | } |
||
| 33 | |||
| 34 | return $dat; |
||
| 35 | } |
||
| 37 |