@@ -32,11 +32,11 @@ |
||
| 32 | 32 | $record = $parser->getCurrentLineRecord(); |
| 33 | 33 | $depth = (int)$record[0]; |
| 34 | 34 | if(isset($record[1])){ |
| 35 | - $identifier = $parser->normalizeIdentifier($record[1]); |
|
| 35 | + $identifier = $parser->normalizeIdentifier($record[1]); |
|
| 36 | 36 | } |
| 37 | 37 | else{ |
| 38 | - $parser->skipToNextLevel($depth); |
|
| 39 | - return null; |
|
| 38 | + $parser->skipToNextLevel($depth); |
|
| 39 | + return null; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $head = new \PhpGedcom\Record\Head(); |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | public static function parse(\PhpGedcom\Parser $parser) |
| 31 | 31 | { |
| 32 | 32 | $record = $parser->getCurrentLineRecord(); |
| 33 | - $depth = (int)$record[0]; |
|
| 34 | - if(isset($record[1])){ |
|
| 33 | + $depth = (int) $record[0]; |
|
| 34 | + if (isset($record[1])) { |
|
| 35 | 35 | $identifier = $parser->normalizeIdentifier($record[1]); |
| 36 | 36 | } |
| 37 | - else{ |
|
| 37 | + else { |
|
| 38 | 38 | $parser->skipToNextLevel($depth); |
| 39 | 39 | return null; |
| 40 | 40 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | while (!$parser->eof()) { |
| 49 | 49 | $record = $parser->getCurrentLineRecord(); |
| 50 | - $currentDepth = (int)$record[0]; |
|
| 50 | + $currentDepth = (int) $record[0]; |
|
| 51 | 51 | $recordType = strtoupper(trim($record[1])); |
| 52 | 52 | |
| 53 | 53 | if ($currentDepth <= $depth) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $head->setNote($parser->parseMultiLineRecord()); |
| 102 | 102 | break; |
| 103 | 103 | default: |
| 104 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 104 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $parser->forward(); |
@@ -33,8 +33,7 @@ |
||
| 33 | 33 | $depth = (int)$record[0]; |
| 34 | 34 | if(isset($record[1])){ |
| 35 | 35 | $identifier = $parser->normalizeIdentifier($record[1]); |
| 36 | - } |
|
| 37 | - else{ |
|
| 36 | + } else{ |
|
| 38 | 37 | $parser->skipToNextLevel($depth); |
| 39 | 38 | return null; |
| 40 | 39 | } |
@@ -30,11 +30,11 @@ |
||
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | 31 | $depth = (int)$record[0]; |
| 32 | 32 | if(isset($record[1])){ |
| 33 | - $identifier = $parser->normalizeIdentifier($record[1]); |
|
| 33 | + $identifier = $parser->normalizeIdentifier($record[1]); |
|
| 34 | 34 | } |
| 35 | 35 | else{ |
| 36 | - $parser->skipToNextLevel($depth); |
|
| 37 | - return null; |
|
| 36 | + $parser->skipToNextLevel($depth); |
|
| 37 | + return null; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $subn = new \PhpGedcom\Record\Subn(); |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | public static function parse(\PhpGedcom\Parser $parser) |
| 29 | 29 | { |
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | - $depth = (int)$record[0]; |
|
| 32 | - if(isset($record[1])){ |
|
| 31 | + $depth = (int) $record[0]; |
|
| 32 | + if (isset($record[1])) { |
|
| 33 | 33 | $identifier = $parser->normalizeIdentifier($record[1]); |
| 34 | 34 | } |
| 35 | - else{ |
|
| 35 | + else { |
|
| 36 | 36 | $parser->skipToNextLevel($depth); |
| 37 | 37 | return null; |
| 38 | 38 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | while (!$parser->eof()) { |
| 48 | 48 | $record = $parser->getCurrentLineRecord(); |
| 49 | - $currentDepth = (int)$record[0]; |
|
| 49 | + $currentDepth = (int) $record[0]; |
|
| 50 | 50 | $recordType = strtoupper(trim($record[1])); |
| 51 | 51 | |
| 52 | 52 | if ($currentDepth <= $depth) { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $subn->setChan($chan); |
| 88 | 88 | break; |
| 89 | 89 | default: |
| 90 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 90 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $parser->forward(); |
@@ -31,8 +31,7 @@ |
||
| 31 | 31 | $depth = (int)$record[0]; |
| 32 | 32 | if(isset($record[1])){ |
| 33 | 33 | $identifier = $parser->normalizeIdentifier($record[1]); |
| 34 | - } |
|
| 35 | - else{ |
|
| 34 | + } else{ |
|
| 36 | 35 | $parser->skipToNextLevel($depth); |
| 37 | 36 | return null; |
| 38 | 37 | } |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | 31 | $depth = (int)$record[0]; |
| 32 | 32 | if(isset($record[2])){ |
| 33 | - $phone = new \PhpGedcom\Record\Phon(); |
|
| 34 | - $phone->setPhon(trim($record[2])); |
|
| 33 | + $phone = new \PhpGedcom\Record\Phon(); |
|
| 34 | + $phone->setPhon(trim($record[2])); |
|
| 35 | 35 | } |
| 36 | 36 | else{ |
| 37 | - $parser->skipToNextLevel($depth); |
|
| 38 | - return null; |
|
| 37 | + $parser->skipToNextLevel($depth); |
|
| 38 | + return null; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | public static function parse(\PhpGedcom\Parser $parser) |
| 29 | 29 | { |
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | - $depth = (int)$record[0]; |
|
| 32 | - if(isset($record[2])){ |
|
| 31 | + $depth = (int) $record[0]; |
|
| 32 | + if (isset($record[2])) { |
|
| 33 | 33 | $phone = new \PhpGedcom\Record\Phon(); |
| 34 | 34 | $phone->setPhon(trim($record[2])); |
| 35 | 35 | } |
| 36 | - else{ |
|
| 36 | + else { |
|
| 37 | 37 | $parser->skipToNextLevel($depth); |
| 38 | 38 | return null; |
| 39 | 39 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | while (!$parser->eof()) { |
| 45 | 45 | $record = $parser->getCurrentLineRecord(); |
| 46 | 46 | $recordType = strtoupper(trim($record[1])); |
| 47 | - $currentDepth = (int)$record[0]; |
|
| 47 | + $currentDepth = (int) $record[0]; |
|
| 48 | 48 | |
| 49 | 49 | if ($currentDepth <= $depth) { |
| 50 | 50 | $parser->back(); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | switch ($recordType) { |
| 55 | 55 | default: |
| 56 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 56 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | $parser->forward(); |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | if(isset($record[2])){ |
| 33 | 33 | $phone = new \PhpGedcom\Record\Phon(); |
| 34 | 34 | $phone->setPhon(trim($record[2])); |
| 35 | - } |
|
| 36 | - else{ |
|
| 35 | + } else{ |
|
| 37 | 36 | $parser->skipToNextLevel($depth); |
| 38 | 37 | return null; |
| 39 | 38 | } |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | 31 | $depth = (int)$record[0]; |
| 32 | 32 | if(isset($record[2])){ |
| 33 | - $even = new \PhpGedcom\Record\SourRef\Even(); |
|
| 34 | - $even->setEven(trim($record[2])); |
|
| 33 | + $even = new \PhpGedcom\Record\SourRef\Even(); |
|
| 34 | + $even->setEven(trim($record[2])); |
|
| 35 | 35 | } |
| 36 | 36 | else{ |
| 37 | - $parser->skipToNextLevel($depth); |
|
| 38 | - return null; |
|
| 37 | + $parser->skipToNextLevel($depth); |
|
| 38 | + return null; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $parser->forward(); |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | public static function parse(\PhpGedcom\Parser $parser) |
| 29 | 29 | { |
| 30 | 30 | $record = $parser->getCurrentLineRecord(); |
| 31 | - $depth = (int)$record[0]; |
|
| 32 | - if(isset($record[2])){ |
|
| 31 | + $depth = (int) $record[0]; |
|
| 32 | + if (isset($record[2])) { |
|
| 33 | 33 | $even = new \PhpGedcom\Record\SourRef\Even(); |
| 34 | 34 | $even->setEven(trim($record[2])); |
| 35 | 35 | } |
| 36 | - else{ |
|
| 36 | + else { |
|
| 37 | 37 | $parser->skipToNextLevel($depth); |
| 38 | 38 | return null; |
| 39 | 39 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | while (!$parser->eof()) { |
| 44 | 44 | $record = $parser->getCurrentLineRecord(); |
| 45 | 45 | $recordType = strtoupper(trim($record[1])); |
| 46 | - $currentDepth = (int)$record[0]; |
|
| 46 | + $currentDepth = (int) $record[0]; |
|
| 47 | 47 | |
| 48 | 48 | if ($currentDepth <= $depth) { |
| 49 | 49 | $parser->back(); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $even->setRole(trim($record[2])); |
| 56 | 56 | break; |
| 57 | 57 | default: |
| 58 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 58 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $parser->forward(); |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | if(isset($record[2])){ |
| 33 | 33 | $even = new \PhpGedcom\Record\SourRef\Even(); |
| 34 | 34 | $even->setEven(trim($record[2])); |
| 35 | - } |
|
| 36 | - else{ |
|
| 35 | + } else{ |
|
| 37 | 36 | $parser->skipToNextLevel($depth); |
| 38 | 37 | return null; |
| 39 | 38 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $data = new \PhpGedcom\Record\SourRef\Data(); |
| 31 | 31 | $record = $parser->getCurrentLineRecord(); |
| 32 | - $depth = (int) $record[0]; |
|
| 32 | + $depth = (int) $record[0]; |
|
| 33 | 33 | |
| 34 | 34 | $parser->forward(); |
| 35 | 35 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | while (!$parser->eof()) { |
| 37 | 37 | $record = $parser->getCurrentLineRecord(); |
| 38 | 38 | $recordType = strtoupper(trim($record[1])); |
| 39 | - $currentDepth = (int)$record[0]; |
|
| 39 | + $currentDepth = (int) $record[0]; |
|
| 40 | 40 | |
| 41 | 41 | if ($currentDepth <= $depth) { |
| 42 | 42 | $parser->back(); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $data->setText($parser->parseMultiLineRecord()); |
| 52 | 52 | break; |
| 53 | 53 | default: |
| 54 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 54 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $parser->forward(); |
@@ -30,37 +30,37 @@ |
||
| 30 | 30 | |
| 31 | 31 | // $_note |
| 32 | 32 | $_obje = $obje->getObje(); |
| 33 | - if(!empty($_note)){ |
|
| 34 | - $output.=$level." OBJE ".$_obje."\n"; |
|
| 35 | - }else{ |
|
| 36 | - $output.=$level." OBJE \n"; |
|
| 33 | + if (!empty($_note)) { |
|
| 34 | + $output .= $level." OBJE ".$_obje."\n"; |
|
| 35 | + } else { |
|
| 36 | + $output .= $level." OBJE \n"; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | $level++; |
| 40 | 40 | // _form |
| 41 | 41 | $_form = $obje->getForm(); |
| 42 | - if(!empty($_form)){ |
|
| 43 | - $output.=$level." FORM ".$_form."\n"; |
|
| 42 | + if (!empty($_form)) { |
|
| 43 | + $output .= $level." FORM ".$_form."\n"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // _titl |
| 47 | 47 | $_titl = $obje->getTitl(); |
| 48 | - if(!empty($_titl)){ |
|
| 49 | - $output.=$level." TITL ".$_titl."\n"; |
|
| 48 | + if (!empty($_titl)) { |
|
| 49 | + $output .= $level." TITL ".$_titl."\n"; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // _file |
| 53 | 53 | $_file = $obje->getFile(); |
| 54 | - if(!empty($_file)){ |
|
| 55 | - $output.=$level." FILE ".$_file."\n"; |
|
| 54 | + if (!empty($_file)) { |
|
| 55 | + $output .= $level." FILE ".$_file."\n"; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // $_note = array() |
| 59 | 59 | $_note = $obje->getNote(); |
| 60 | - if(!empty($_note) && count($_note) > 0){ |
|
| 61 | - foreach($_note as $item){ |
|
| 60 | + if (!empty($_note) && count($_note) > 0) { |
|
| 61 | + foreach ($_note as $item) { |
|
| 62 | 62 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 63 | - $output.=$_convert; |
|
| 63 | + $output .= $_convert; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | return $output; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $_obje = $obje->getObje(); |
| 33 | 33 | if(!empty($_note)){ |
| 34 | 34 | $output.=$level." OBJE ".$_obje."\n"; |
| 35 | - }else{ |
|
| 35 | + } else{ |
|
| 36 | 36 | $output.=$level." OBJE \n"; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -31,20 +31,20 @@ |
||
| 31 | 31 | $level++; |
| 32 | 32 | // DATE |
| 33 | 33 | $_date = $chan->getDate(); |
| 34 | - if(!empty($_date)){ |
|
| 35 | - $output.=$level." DATE ".$_date."\n"; |
|
| 34 | + if (!empty($_date)) { |
|
| 35 | + $output .= $level." DATE ".$_date."\n"; |
|
| 36 | 36 | } |
| 37 | 37 | // TIME |
| 38 | 38 | $_time = $chan->getDate(); |
| 39 | - if(!empty($_time)){ |
|
| 40 | - $output.=$level." DATE ".$_time."\n"; |
|
| 39 | + if (!empty($_time)) { |
|
| 40 | + $output .= $level." DATE ".$_time."\n"; |
|
| 41 | 41 | } |
| 42 | 42 | // $_note = array() |
| 43 | 43 | $_note = $chan->getNote(); |
| 44 | - if(!empty($_note) && count($_note) > 0){ |
|
| 45 | - foreach($_note as $item){ |
|
| 44 | + if (!empty($_note) && count($_note) > 0) { |
|
| 45 | + foreach ($_note as $item) { |
|
| 46 | 46 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 47 | - $output.=$_convert; |
|
| 47 | + $output .= $_convert; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | return $output; |
@@ -29,29 +29,29 @@ |
||
| 29 | 29 | |
| 30 | 30 | $output = ""; |
| 31 | 31 | $_repo = $reporef->getRepo(); |
| 32 | - if(empty($_sour)){ |
|
| 32 | + if (empty($_sour)) { |
|
| 33 | 33 | return $output; |
| 34 | - }else{ |
|
| 35 | - $output.=$level." REPO ".$_repo."\n"; |
|
| 34 | + } else { |
|
| 35 | + $output .= $level." REPO ".$_repo."\n"; |
|
| 36 | 36 | } |
| 37 | 37 | // level up |
| 38 | 38 | $level++; |
| 39 | 39 | |
| 40 | 40 | // Note array |
| 41 | 41 | $note = $reporef->getNote(); |
| 42 | - if(!empty($note) && count($note) > 0){ |
|
| 43 | - foreach($note as $item){ |
|
| 42 | + if (!empty($note) && count($note) > 0) { |
|
| 43 | + foreach ($note as $item) { |
|
| 44 | 44 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 45 | - $output.=$_convert; |
|
| 45 | + $output .= $_convert; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | // _caln array |
| 50 | 50 | $_caln = $reporef->getCaln(); |
| 51 | - if(!empty($_caln) && count($_caln) > 0){ |
|
| 52 | - foreach($_caln as $item){ |
|
| 51 | + if (!empty($_caln) && count($_caln) > 0) { |
|
| 52 | + foreach ($_caln as $item) { |
|
| 53 | 53 | $_convert = \PhpGedcom\Writer\Caln::convert($item, $level); |
| 54 | - $output.=$_convert; |
|
| 54 | + $output .= $_convert; |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $_repo = $reporef->getRepo(); |
| 32 | 32 | if(empty($_sour)){ |
| 33 | 33 | return $output; |
| 34 | - }else{ |
|
| 34 | + } else{ |
|
| 35 | 35 | $output.=$level." REPO ".$_repo."\n"; |
| 36 | 36 | } |
| 37 | 37 | // level up |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | // chan |
| 45 | 45 | $chan = $indi->getChan(); |
| 46 | - if(!empty($chan)){ |
|
| 46 | + if (!empty($chan)) { |
|
| 47 | 47 | $output .= $level." CHAN ".$chan."\n"; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -51,162 +51,162 @@ discard block |
||
| 51 | 51 | // PhpGedcom/Record/Attr extend PhpGedcom/Record/Even and there is no change. |
| 52 | 52 | // So used convert Even |
| 53 | 53 | $attr = $indi->getAllAttr(); |
| 54 | - if(!empty($attr) && count($attr) > 0){ |
|
| 55 | - foreach($attr as $item){ |
|
| 54 | + if (!empty($attr) && count($attr) > 0) { |
|
| 55 | + foreach ($attr as $item) { |
|
| 56 | 56 | $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); |
| 57 | - $output.=$_convert; |
|
| 57 | + $output .= $_convert; |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // $even |
| 62 | 62 | $even = $indi->getAllEven(); |
| 63 | - if(!empty($even) && count($even) > 0){ |
|
| 64 | - foreach($even as $item){ |
|
| 63 | + if (!empty($even) && count($even) > 0) { |
|
| 64 | + foreach ($even as $item) { |
|
| 65 | 65 | $_convert = \PhpGedcom\Writer\Indi\Even::convert($item, $level); |
| 66 | - $output.=$_convert; |
|
| 66 | + $output .= $_convert; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // $note |
| 71 | 71 | |
| 72 | 72 | $note = $indi->getNote(); |
| 73 | - if(!empty($note) && count($note) > 0){ |
|
| 74 | - foreach($note as $item){ |
|
| 73 | + if (!empty($note) && count($note) > 0) { |
|
| 74 | + foreach ($note as $item) { |
|
| 75 | 75 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 76 | - $output.=$_convert; |
|
| 76 | + $output .= $_convert; |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | // $obje |
| 81 | 81 | $obje = $indi->getObje(); |
| 82 | - if(!empty($obje) && count($obje) > 0){ |
|
| 83 | - foreach($obje as $item){ |
|
| 82 | + if (!empty($obje) && count($obje) > 0) { |
|
| 83 | + foreach ($obje as $item) { |
|
| 84 | 84 | $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); |
| 85 | - $output.=$_convert; |
|
| 85 | + $output .= $_convert; |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | // $sour |
| 90 | 90 | $sour = $indi->getSour(); |
| 91 | - if(!empty($sour) && count($sour) > 0){ |
|
| 92 | - foreach($sour as $item){ |
|
| 91 | + if (!empty($sour) && count($sour) > 0) { |
|
| 92 | + foreach ($sour as $item) { |
|
| 93 | 93 | $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); |
| 94 | - $output.=$_convert; |
|
| 94 | + $output .= $_convert; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // $name |
| 99 | 99 | $name = $indi->getName(); |
| 100 | - if(!empty($name) && count($name) > 0){ |
|
| 101 | - foreach($name as $item){ |
|
| 100 | + if (!empty($name) && count($name) > 0) { |
|
| 101 | + foreach ($name as $item) { |
|
| 102 | 102 | $_convert = \PhpGedcom\Writer\Indi\Name::convert($item, $level); |
| 103 | - $output.=$_convert; |
|
| 103 | + $output .= $_convert; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | // $alia |
| 108 | 108 | $alia = $indi->getAlia(); |
| 109 | - if(!empty($alia) && count($alia) > 0){ |
|
| 110 | - foreach($alia as $item){ |
|
| 111 | - if(!empty($item)){ |
|
| 109 | + if (!empty($alia) && count($alia) > 0) { |
|
| 110 | + foreach ($alia as $item) { |
|
| 111 | + if (!empty($item)) { |
|
| 112 | 112 | $_convert = $level." ALIA ".$item."\n"; |
| 113 | - $output.=$_convert; |
|
| 113 | + $output .= $_convert; |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | // $sex |
| 119 | 119 | $sex = $indi->getSex(); |
| 120 | - if(!empty($sex)){ |
|
| 120 | + if (!empty($sex)) { |
|
| 121 | 121 | $output .= $level." SEX ".$sex."\n"; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | // $rin |
| 125 | 125 | $rin = $indi->getRin(); |
| 126 | - if(!empty($rin)){ |
|
| 126 | + if (!empty($rin)) { |
|
| 127 | 127 | $output .= $level." RIN ".$rin."\n"; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | // $resn |
| 131 | 131 | $resn = $indi->getResn(); |
| 132 | - if(!empty($resn)){ |
|
| 132 | + if (!empty($resn)) { |
|
| 133 | 133 | $output .= $level." RESN ".$resn."\n"; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | // $rfn |
| 137 | 137 | $rfn = $indi->getRfn(); |
| 138 | - if(!empty($rfn)){ |
|
| 138 | + if (!empty($rfn)) { |
|
| 139 | 139 | $output .= $level." RFN ".$rfn."\n"; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | // $afn |
| 143 | 143 | $afn = $indi->getAfn(); |
| 144 | - if(!empty($afn)){ |
|
| 144 | + if (!empty($afn)) { |
|
| 145 | 145 | $output .= $level." AFN ".$afn."\n"; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | // Fams[] |
| 149 | 149 | $fams = $indi->getFams(); |
| 150 | - if(!empty($fams) && count($fams) > 0){ |
|
| 151 | - foreach($fams as $item){ |
|
| 150 | + if (!empty($fams) && count($fams) > 0) { |
|
| 151 | + foreach ($fams as $item) { |
|
| 152 | 152 | $_convert = \PhpGedcom\Writer\Indi\Fams::convert($item, $level); |
| 153 | - $output.=$_convert; |
|
| 153 | + $output .= $_convert; |
|
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | // Famc[] |
| 158 | 158 | $famc = $indi->getFamc(); |
| 159 | - if(!empty($famc) && count($famc) > 0){ |
|
| 160 | - foreach($famc as $item){ |
|
| 159 | + if (!empty($famc) && count($famc) > 0) { |
|
| 160 | + foreach ($famc as $item) { |
|
| 161 | 161 | $_convert = \PhpGedcom\Writer\Indi\Famc::convert($item, $level); |
| 162 | - $output.=$_convert; |
|
| 162 | + $output .= $_convert; |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // Asso[] |
| 167 | 167 | $asso = $indi->getAsso(); |
| 168 | - if(!empty($asso) && count($asso) > 0){ |
|
| 169 | - foreach($asso as $item){ |
|
| 168 | + if (!empty($asso) && count($asso) > 0) { |
|
| 169 | + foreach ($asso as $item) { |
|
| 170 | 170 | $_convert = \PhpGedcom\Writer\Indi\Asso::convert($item, $level); |
| 171 | - $output.=$_convert; |
|
| 171 | + $output .= $_convert; |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | // $subm |
| 176 | 176 | $subm = $indi->getSubm(); |
| 177 | - if(!empty($subm) && count($subm) > 0){ |
|
| 178 | - foreach($subm as $item){ |
|
| 179 | - if(!empty($item)){ |
|
| 177 | + if (!empty($subm) && count($subm) > 0) { |
|
| 178 | + foreach ($subm as $item) { |
|
| 179 | + if (!empty($item)) { |
|
| 180 | 180 | $_convert = $level." SUBM ".$item."\n"; |
| 181 | - $output.=$_convert; |
|
| 181 | + $output .= $_convert; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | // $anci |
| 187 | 187 | $anci = $indi->getAnci(); |
| 188 | - if(!empty($anci) && count($anci) > 0){ |
|
| 189 | - foreach($anci as $item){ |
|
| 188 | + if (!empty($anci) && count($anci) > 0) { |
|
| 189 | + foreach ($anci as $item) { |
|
| 190 | 190 | $_convert = $level." ANCI ".$item."\n"; |
| 191 | - $output.=$_convert; |
|
| 191 | + $output .= $_convert; |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | // $desi |
| 196 | 196 | $desi = $indi->getDesi(); |
| 197 | - if(!empty($desi) && count($desi) > 0){ |
|
| 198 | - foreach($desi as $item){ |
|
| 197 | + if (!empty($desi) && count($desi) > 0) { |
|
| 198 | + foreach ($desi as $item) { |
|
| 199 | 199 | $_convert = $level." DESI ".$item."\n"; |
| 200 | - $output.=$_convert; |
|
| 200 | + $output .= $_convert; |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | // Refn[] |
| 205 | 205 | $refn = $indi->getRefn(); |
| 206 | - if(!empty($refn) && count($refn) > 0){ |
|
| 207 | - foreach($refn as $item){ |
|
| 206 | + if (!empty($refn) && count($refn) > 0) { |
|
| 207 | + foreach ($refn as $item) { |
|
| 208 | 208 | $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); |
| 209 | - $output.=$_convert; |
|
| 209 | + $output .= $_convert; |
|
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |