familytree365 /
php-gedcom
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * php-gedcom. |
||||
| 4 | * |
||||
| 5 | * php-gedcom is a library for parsing, manipulating, importing and exporting |
||||
| 6 | * GEDCOM 5.5 files in PHP 5.3+. |
||||
| 7 | * |
||||
| 8 | * @author Xiang Ming <[email protected]> |
||||
| 9 | * @copyright Copyright (c) 2010-2013, Xiang Ming |
||||
| 10 | * @license MIT |
||||
| 11 | * |
||||
| 12 | * @link http://github.com/mrkrstphr/php-gedcom |
||||
| 13 | */ |
||||
| 14 | |||||
| 15 | namespace Gedcom\Writer\SourRef; |
||||
| 16 | |||||
| 17 | class Even |
||||
| 18 | { |
||||
| 19 | /** |
||||
| 20 | * @param int $level |
||||
| 21 | * |
||||
| 22 | * @return string |
||||
| 23 | */ |
||||
| 24 | public static function convert(\Gedcom\Record\SourRef\Even &$even, $level = 0) |
||||
| 25 | { |
||||
| 26 | $output = ''; |
||||
| 27 | |||||
| 28 | // $_date; |
||||
| 29 | $_even = $even->getEven(); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 30 | if (!empty($_even)) { |
||||
| 31 | $output .= $level.' EVEN '.$_even."\n"; |
||||
|
0 ignored issues
–
show
Are you sure
$_even of type Gedcom\Record\SourRef\Even|mixed can be used in concatenation?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 32 | } else { |
||||
| 33 | $output = $level." EVEN\n"; |
||||
| 34 | } |
||||
| 35 | // level up |
||||
| 36 | $level++; |
||||
| 37 | |||||
| 38 | // $_role ROLE |
||||
| 39 | $_role = $data->getRole(); |
||||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||||
| 40 | if (!empty($_role)) { |
||||
| 41 | $output .= $level.' ROLE '.$_role."\n"; |
||||
| 42 | } |
||||
| 43 | |||||
| 44 | return $output; |
||||
| 45 | } |
||||
| 46 | } |
||||
| 47 |