@@ -28,44 +28,44 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $output = ""; |
| 30 | 30 | $_sour = $sour->getSour(); |
| 31 | - if(!empty($_sour)){ |
|
| 32 | - $output.=$level." SOUR ".$_sour."\n"; |
|
| 31 | + if (!empty($_sour)) { |
|
| 32 | + $output .= $level." SOUR ".$_sour."\n"; |
|
| 33 | 33 | } |
| 34 | 34 | $level++; |
| 35 | 35 | // protected $_text = null; |
| 36 | 36 | $_text = $sour->getText(); |
| 37 | - if(!empty($_text)){ |
|
| 38 | - $output.=$level." TEXT ".$_text."\n"; |
|
| 37 | + if (!empty($_text)) { |
|
| 38 | + $output .= $level." TEXT ".$_text."\n"; |
|
| 39 | 39 | } |
| 40 | 40 | // protected $_note = array(); |
| 41 | 41 | $note = $sour->getNote(); |
| 42 | - if($note && count($note) > 0){ |
|
| 43 | - foreach($note as $item){ |
|
| 42 | + if ($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 | // protected $_data = null; |
| 49 | 49 | $_data = $sour->getData(); |
| 50 | - if($_data){ |
|
| 50 | + if ($_data) { |
|
| 51 | 51 | $_convert = \PhpGedcom\Writer\Sour\Data::convert($_data, $level); |
| 52 | - $output.= $_convert; |
|
| 52 | + $output .= $_convert; |
|
| 53 | 53 | } |
| 54 | 54 | // protected $_page setPage |
| 55 | 55 | $_page = $sour->getPage(); |
| 56 | - if(!empty($_page)){ |
|
| 57 | - $output.=$level." PAGE ".$_page."\n"; |
|
| 56 | + if (!empty($_page)) { |
|
| 57 | + $output .= $level." PAGE ".$_page."\n"; |
|
| 58 | 58 | } |
| 59 | 59 | // protected $_even = null; |
| 60 | 60 | $_even = $sour->getData(); |
| 61 | - if($_even){ |
|
| 61 | + if ($_even) { |
|
| 62 | 62 | $_convert = \PhpGedcom\Writer\SourRef\Even::convert($_even, $level); |
| 63 | - $output.= $_convert; |
|
| 63 | + $output .= $_convert; |
|
| 64 | 64 | } |
| 65 | 65 | // protected $_quay |
| 66 | 66 | $_quay = $sour->getQuay(); |
| 67 | - if(!empty($_quay)){ |
|
| 68 | - $output.=$level." QUAY ".$_quay."\n"; |
|
| 67 | + if (!empty($_quay)) { |
|
| 68 | + $output .= $level." QUAY ".$_quay."\n"; |
|
| 69 | 69 | } |
| 70 | 70 | // protected $_obje = array(); |
| 71 | 71 | // This is not defined in parser. |
@@ -28,14 +28,14 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $output = ''; |
| 30 | 30 | |
| 31 | - $output.= $level." HUSB \n"; |
|
| 31 | + $output .= $level." HUSB \n"; |
|
| 32 | 32 | // level up |
| 33 | 33 | $level++; |
| 34 | 34 | |
| 35 | 35 | // AGE |
| 36 | 36 | $age = $wife->getAge(); |
| 37 | - if(!empty($age)){ |
|
| 38 | - $output.=$level." AGE ".$age."\n"; |
|
| 37 | + if (!empty($age)) { |
|
| 38 | + $output .= $level." AGE ".$age."\n"; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return $output; |
@@ -28,14 +28,14 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $output = ''; |
| 30 | 30 | |
| 31 | - $output.= $level." WIFE \n"; |
|
| 31 | + $output .= $level." WIFE \n"; |
|
| 32 | 32 | // level up |
| 33 | 33 | $level++; |
| 34 | 34 | |
| 35 | 35 | // AGE |
| 36 | 36 | $age = $husb->getAge(); |
| 37 | - if(!empty($age)){ |
|
| 38 | - $output.=$level." AGE ".$age."\n"; |
|
| 37 | + if (!empty($age)) { |
|
| 38 | + $output .= $level." AGE ".$age."\n"; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return $output; |
@@ -30,77 +30,77 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // $type; |
| 32 | 32 | $type = $even->getType(); |
| 33 | - if(!empty($type)){ |
|
| 34 | - $output.=$level." ".$type."\n"; |
|
| 35 | - }else{ |
|
| 33 | + if (!empty($type)) { |
|
| 34 | + $output .= $level." ".$type."\n"; |
|
| 35 | + } else { |
|
| 36 | 36 | return $output; |
| 37 | 37 | } |
| 38 | 38 | $level++; |
| 39 | 39 | |
| 40 | 40 | // $type; |
| 41 | 41 | $type = $even->getType(); |
| 42 | - if(!empty($type)){ |
|
| 43 | - $output.=$level." TYPE ".$type."\n"; |
|
| 42 | + if (!empty($type)) { |
|
| 43 | + $output .= $level." TYPE ".$type."\n"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // $date; |
| 47 | 47 | $date = $even->getDate(); |
| 48 | - if(!empty($date)){ |
|
| 49 | - $output.=$level." DATE ".$date."\n"; |
|
| 48 | + if (!empty($date)) { |
|
| 49 | + $output .= $level." DATE ".$date."\n"; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // Plac |
| 53 | 53 | $plac = $even->getPlac(); |
| 54 | - if(!empty($plac)){ |
|
| 54 | + if (!empty($plac)) { |
|
| 55 | 55 | $_convert = \PhpGedcom\Writer\Indi\Even\Plac::convert($plac, $level); |
| 56 | - $output.=$_convert; |
|
| 56 | + $output .= $_convert; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // $caus; |
| 60 | 60 | $caus = $even->getCaus(); |
| 61 | - if(!empty($caus)){ |
|
| 62 | - $output.=$level." CAUS ".$caus."\n"; |
|
| 61 | + if (!empty($caus)) { |
|
| 62 | + $output .= $level." CAUS ".$caus."\n"; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // $age; |
| 66 | 66 | $age = $even->getAge(); |
| 67 | - if(!empty($age)){ |
|
| 68 | - $output.=$level." AGE ".$age."\n"; |
|
| 67 | + if (!empty($age)) { |
|
| 68 | + $output .= $level." AGE ".$age."\n"; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | // $addr |
| 72 | 72 | $addr = $even->getAddr(); |
| 73 | - if(!empty($addr)){ |
|
| 73 | + if (!empty($addr)) { |
|
| 74 | 74 | $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); |
| 75 | - $output.=$_convert; |
|
| 75 | + $output .= $_convert; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // $phon = array() |
| 79 | 79 | $phon = $even->getPhon(); |
| 80 | - if(!empty($phon) && count($phon) > 0){ |
|
| 81 | - foreach($phon as $item){ |
|
| 80 | + if (!empty($phon) && count($phon) > 0) { |
|
| 81 | + foreach ($phon as $item) { |
|
| 82 | 82 | $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); |
| 83 | - $output.=$_convert; |
|
| 83 | + $output .= $_convert; |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | // $agnc |
| 87 | 87 | $agnc = $even->getAgnc(); |
| 88 | - if(!empty($agnc)){ |
|
| 89 | - $output.=$level." AGNC ".$agnc."\n"; |
|
| 88 | + if (!empty($agnc)) { |
|
| 89 | + $output .= $level." AGNC ".$agnc."\n"; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | // HUSB |
| 93 | 93 | $husb = $even->getHusb(); |
| 94 | - if(!empty($husb)){ |
|
| 94 | + if (!empty($husb)) { |
|
| 95 | 95 | $_convert = \PhpGedcom\Writer\Fam\Even\Husb::convert($husb, $level); |
| 96 | - $output.=$_convert; |
|
| 96 | + $output .= $_convert; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | // WIFE |
| 100 | 100 | $wife = $even->getWife(); |
| 101 | - if(!empty($wife)){ |
|
| 101 | + if (!empty($wife)) { |
|
| 102 | 102 | $_convert = \PhpGedcom\Writer\Fam\Even\Wife::convert($wife, $level); |
| 103 | - $output.=$_convert; |
|
| 103 | + $output .= $_convert; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // $ref = array(); |
@@ -108,26 +108,26 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | // $obje = array(); |
| 110 | 110 | $obje = $even->getObje(); |
| 111 | - if(!empty($obje) && count($obje) > 0){ |
|
| 112 | - foreach($obje as $item){ |
|
| 111 | + if (!empty($obje) && count($obje) > 0) { |
|
| 112 | + foreach ($obje as $item) { |
|
| 113 | 113 | $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); |
| 114 | - $output.=$_convert; |
|
| 114 | + $output .= $_convert; |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | // $sour = array(); |
| 118 | 118 | $sour = $even->getSour(); |
| 119 | - if(!empty($sour) && count($sour) > 0){ |
|
| 120 | - foreach($sour as $item){ |
|
| 119 | + if (!empty($sour) && count($sour) > 0) { |
|
| 120 | + foreach ($sour as $item) { |
|
| 121 | 121 | $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); |
| 122 | - $output.=$_convert; |
|
| 122 | + $output .= $_convert; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | // $note = array(); |
| 126 | 126 | $note = $even->getNote(); |
| 127 | - if(!empty($note) && count($note) > 0){ |
|
| 128 | - foreach($note as $item){ |
|
| 127 | + if (!empty($note) && count($note) > 0) { |
|
| 128 | + foreach ($note as $item) { |
|
| 129 | 129 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 130 | - $output.=$_convert; |
|
| 130 | + $output .= $_convert; |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $type = $even->getType(); |
| 33 | 33 | if(!empty($type)){ |
| 34 | 34 | $output.=$level." ".$type."\n"; |
| 35 | - }else{ |
|
| 35 | + } else{ |
|
| 36 | 36 | return $output; |
| 37 | 37 | } |
| 38 | 38 | $level++; |
@@ -27,49 +27,49 @@ |
||
| 27 | 27 | public static function convert(\PhpGedcom\Record\Fam\Slgs &$slgs, $level) |
| 28 | 28 | { |
| 29 | 29 | $output = ""; |
| 30 | - $output.=$level." SLGS \n"; |
|
| 30 | + $output .= $level." SLGS \n"; |
|
| 31 | 31 | |
| 32 | 32 | // Level up |
| 33 | 33 | $level++; |
| 34 | 34 | |
| 35 | 35 | // $STAT; |
| 36 | 36 | $stat = $slgs->getStat(); |
| 37 | - if(!empty($stat)){ |
|
| 38 | - $output.=$level." STAT ".$stat."\n"; |
|
| 37 | + if (!empty($stat)) { |
|
| 38 | + $output .= $level." STAT ".$stat."\n"; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | // $date; |
| 42 | 42 | $date = $slgs->getDate(); |
| 43 | - if(!empty($date)){ |
|
| 44 | - $output.=$level." DATE ".$date."\n"; |
|
| 43 | + if (!empty($date)) { |
|
| 44 | + $output .= $level." DATE ".$date."\n"; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // PLAC |
| 48 | 48 | $plac = $slgs->getPlac(); |
| 49 | - if(!empty($plac)){ |
|
| 50 | - $output.=$level." PLAC ".$plac."\n"; |
|
| 49 | + if (!empty($plac)) { |
|
| 50 | + $output .= $level." PLAC ".$plac."\n"; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // $TEMP; |
| 54 | 54 | $temp = $slgs->getTemp(); |
| 55 | - if(!empty($temp)){ |
|
| 56 | - $output.=$level." TEMP ".$temp."\n"; |
|
| 55 | + if (!empty($temp)) { |
|
| 56 | + $output .= $level." TEMP ".$temp."\n"; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // $sour = array(); |
| 60 | 60 | $sour = $slgs->getSour(); |
| 61 | - if(!empty($sour) && count($sour) > 0){ |
|
| 62 | - foreach($sour as $item){ |
|
| 61 | + if (!empty($sour) && count($sour) > 0) { |
|
| 62 | + foreach ($sour as $item) { |
|
| 63 | 63 | $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level); |
| 64 | - $output.=$_convert; |
|
| 64 | + $output .= $_convert; |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | // $note = array(); |
| 68 | 68 | $note = $slgs->getNote(); |
| 69 | - if(!empty($note) && count($note) > 0){ |
|
| 70 | - foreach($note as $item){ |
|
| 69 | + if (!empty($note) && count($note) > 0) { |
|
| 70 | + foreach ($note as $item) { |
|
| 71 | 71 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 72 | - $output.=$_convert; |
|
| 72 | + $output .= $_convert; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
@@ -33,14 +33,14 @@ |
||
| 33 | 33 | |
| 34 | 34 | // $date; |
| 35 | 35 | $date = $even->getDate(); |
| 36 | - if(!empty($date)){ |
|
| 37 | - $output.=$level." DATE ".$date."\n"; |
|
| 36 | + if (!empty($date)) { |
|
| 37 | + $output .= $level." DATE ".$date."\n"; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // Plac |
| 41 | 41 | $plac = $even->getPlac(); |
| 42 | - if(!empty($plac)){ |
|
| 43 | - $output.=$level." PLAC ".$plac."\n"; |
|
| 42 | + if (!empty($plac)) { |
|
| 43 | + $output .= $level." PLAC ".$plac."\n"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | return $output; |
@@ -33,37 +33,37 @@ |
||
| 33 | 33 | |
| 34 | 34 | // $_date; |
| 35 | 35 | $date = $data->getDate(); |
| 36 | - if(!empty($date)){ |
|
| 37 | - $output.=$level." DATE ".$date."\n"; |
|
| 36 | + if (!empty($date)) { |
|
| 37 | + $output .= $level." DATE ".$date."\n"; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // $_agnc AGNC |
| 41 | 41 | $_agnc = $data->getAgnc(); |
| 42 | - if(!empty($_agnc)){ |
|
| 43 | - $output.=$level." AGNC ".$_agnc."\n"; |
|
| 42 | + if (!empty($_agnc)) { |
|
| 43 | + $output .= $level." AGNC ".$_agnc."\n"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // $_text |
| 47 | 47 | $_text = $data->getText(); |
| 48 | - if(!empty($_text)){ |
|
| 49 | - $output.=$level." TEXT ".$_text."\n"; |
|
| 48 | + if (!empty($_text)) { |
|
| 49 | + $output .= $level." TEXT ".$_text."\n"; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // $_note |
| 53 | 53 | $note = $data->getNote(); |
| 54 | - if($note && count($note) > 0){ |
|
| 55 | - foreach($note as $item){ |
|
| 54 | + if ($note && count($note) > 0) { |
|
| 55 | + foreach ($note as $item) { |
|
| 56 | 56 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 57 | - $output.= $_convert; |
|
| 57 | + $output .= $_convert; |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // $_even |
| 62 | 62 | $_even = $data->getEven(); |
| 63 | - if($_even && count($_even) > 0){ |
|
| 64 | - foreach($_even as $item){ |
|
| 63 | + if ($_even && count($_even) > 0) { |
|
| 64 | + foreach ($_even as $item) { |
|
| 65 | 65 | $_convert = \PhpGedcom\Writer\Sour\Data\Even::convert($item, $level); |
| 66 | - $output.= $_convert; |
|
| 66 | + $output .= $_convert; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | $level = 0; |
| 30 | 30 | $output = ""; |
| 31 | 31 | $_repo = $repo->getRepo(); |
| 32 | - if($_repo){ |
|
| 33 | - $output.=$level." ".$_repo." REPO\n"; |
|
| 34 | - }else{ |
|
| 32 | + if ($_repo) { |
|
| 33 | + $output .= $level." ".$_repo." REPO\n"; |
|
| 34 | + } else { |
|
| 35 | 35 | return $output; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -40,57 +40,57 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | //NAME |
| 42 | 42 | $name = $repo->getName(); |
| 43 | - if($name){ |
|
| 44 | - $output.=$level." NAME ".$name."\n"; |
|
| 43 | + if ($name) { |
|
| 44 | + $output .= $level." NAME ".$name."\n"; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // ADDR |
| 48 | 48 | $addr = $repo->getAddr(); |
| 49 | - if($addr){ |
|
| 49 | + if ($addr) { |
|
| 50 | 50 | $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); |
| 51 | - $output.=$_convert; |
|
| 51 | + $output .= $_convert; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // PHON |
| 55 | 55 | $phon = $repo->getPhon(); |
| 56 | - if($phon){ |
|
| 56 | + if ($phon) { |
|
| 57 | 57 | $_convert = \PhpGedcom\Writer\Phon::convert($phon, $level); |
| 58 | - $output.=$_convert; |
|
| 58 | + $output .= $_convert; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // NOTE array |
| 62 | 62 | $note = $repo->getNote(); |
| 63 | - if($note && count($note) > 0) { |
|
| 64 | - foreach($note as $item){ |
|
| 65 | - if($item){ |
|
| 63 | + if ($note && count($note) > 0) { |
|
| 64 | + foreach ($note as $item) { |
|
| 65 | + if ($item) { |
|
| 66 | 66 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 67 | - $output.=$_convert; |
|
| 67 | + $output .= $_convert; |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // REFN |
| 73 | 73 | $refn = $repo->getRefn(); |
| 74 | - if(!empty($refn) && count($refn) > 0) { |
|
| 75 | - foreach($refn as $item){ |
|
| 76 | - if($item){ |
|
| 74 | + if (!empty($refn) && count($refn) > 0) { |
|
| 75 | + foreach ($refn as $item) { |
|
| 76 | + if ($item) { |
|
| 77 | 77 | $_convert = \PhpGedcom\Writer\Refn::convert($item, $level); |
| 78 | - $output.=$_convert; |
|
| 78 | + $output .= $_convert; |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // CHAN |
| 84 | 84 | $chan = $repo->getChan(); |
| 85 | - if($chan){ |
|
| 85 | + if ($chan) { |
|
| 86 | 86 | $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); |
| 87 | - $output.=$_convert; |
|
| 87 | + $output .= $_convert; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | // RIN |
| 91 | 91 | $rin = $repo->getRin(); |
| 92 | - if($rin){ |
|
| 93 | - $output.=$level." RIN ".$rin."\n"; |
|
| 92 | + if ($rin) { |
|
| 93 | + $output .= $level." RIN ".$rin."\n"; |
|
| 94 | 94 | } |
| 95 | 95 | return $output; |
| 96 | 96 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $_repo = $repo->getRepo(); |
| 32 | 32 | if($_repo){ |
| 33 | 33 | $output.=$level." ".$_repo." REPO\n"; |
| 34 | - }else{ |
|
| 34 | + } else{ |
|
| 35 | 35 | return $output; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -29,82 +29,82 @@ |
||
| 29 | 29 | $level = 0; |
| 30 | 30 | $output = ""; |
| 31 | 31 | $_subm = $subm->getSubn(); |
| 32 | - if(empty($_subm)){ |
|
| 32 | + if (empty($_subm)) { |
|
| 33 | 33 | return $output; |
| 34 | - }else{ |
|
| 35 | - $output.=$level." ".$_subm." SUBM "."\n"; |
|
| 34 | + } else { |
|
| 35 | + $output .= $level." ".$_subm." SUBM "."\n"; |
|
| 36 | 36 | } |
| 37 | 37 | // level up |
| 38 | 38 | $level++; |
| 39 | 39 | |
| 40 | 40 | // NAME |
| 41 | 41 | $name = $subm->getName(); |
| 42 | - if(!empty($name)){ |
|
| 43 | - $output.=$level." NAME ".$name."\n"; |
|
| 42 | + if (!empty($name)) { |
|
| 43 | + $output .= $level." NAME ".$name."\n"; |
|
| 44 | 44 | } |
| 45 | 45 | // $chan |
| 46 | 46 | $chan = $subm->getChan(); |
| 47 | - if($chan){ |
|
| 47 | + if ($chan) { |
|
| 48 | 48 | $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level); |
| 49 | - $output.=$_convert; |
|
| 49 | + $output .= $_convert; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // $addr |
| 53 | 53 | $addr = $subm->getAddr(); |
| 54 | - if($addr){ |
|
| 54 | + if ($addr) { |
|
| 55 | 55 | $_convert = \PhpGedcom\Writer\Addr::convert($addr, $level); |
| 56 | - $output.=$_convert; |
|
| 56 | + $output .= $_convert; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // $rin |
| 60 | 60 | $rin = $subm->getRin(); |
| 61 | - if(!empty($rin)){ |
|
| 62 | - $output.=$level." RIN ".$rin."\n"; |
|
| 61 | + if (!empty($rin)) { |
|
| 62 | + $output .= $level." RIN ".$rin."\n"; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // $rfn |
| 66 | 66 | $rfn = $subm->getRfn(); |
| 67 | - if(!empty($rfn)){ |
|
| 68 | - $output.=$level." RFN ".$rfn."\n"; |
|
| 67 | + if (!empty($rfn)) { |
|
| 68 | + $output .= $level." RFN ".$rfn."\n"; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | // $lang = array() |
| 72 | 72 | $langs = $subm->getLang(); |
| 73 | - if(!empty($langs) && count($langs) > 0){ |
|
| 74 | - foreach($langs as $item){ |
|
| 75 | - if($item){ |
|
| 73 | + if (!empty($langs) && count($langs) > 0) { |
|
| 74 | + foreach ($langs as $item) { |
|
| 75 | + if ($item) { |
|
| 76 | 76 | $_convert = $level." LANG ".$item."\n"; |
| 77 | - $output.=$_convert; |
|
| 77 | + $output .= $_convert; |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // $phon = array() |
| 83 | 83 | $phon = $subm->getLang(); |
| 84 | - if(!empty($phon) && count($phon) > 0){ |
|
| 85 | - foreach($phon as $item){ |
|
| 86 | - if($item){ |
|
| 84 | + if (!empty($phon) && count($phon) > 0) { |
|
| 85 | + foreach ($phon as $item) { |
|
| 86 | + if ($item) { |
|
| 87 | 87 | $_convert = \PhpGedcom\Writer\Phon::convert($item, $level); |
| 88 | - $output.= $_convert; |
|
| 88 | + $output .= $_convert; |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // $obje = array() |
| 94 | 94 | $obje = $subm->getObje(); |
| 95 | - if(!empty($obje) && count($obje) > 0){ |
|
| 96 | - foreach($obje as $item){ |
|
| 95 | + if (!empty($obje) && count($obje) > 0) { |
|
| 96 | + foreach ($obje as $item) { |
|
| 97 | 97 | $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level); |
| 98 | - $output.=$_convert; |
|
| 98 | + $output .= $_convert; |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | // note |
| 103 | 103 | $note = $subm->getNote(); |
| 104 | - if(!empty($note) && count($note) > 0){ |
|
| 105 | - foreach($note as $item){ |
|
| 104 | + if (!empty($note) && count($note) > 0) { |
|
| 105 | + foreach ($note as $item) { |
|
| 106 | 106 | $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level); |
| 107 | - $output.=$_convert; |
|
| 107 | + $output .= $_convert; |
|
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $_subm = $subm->getSubn(); |
| 32 | 32 | if(empty($_subm)){ |
| 33 | 33 | return $output; |
| 34 | - }else{ |
|
| 34 | + } else{ |
|
| 35 | 35 | $output.=$level." ".$_subm." SUBM "."\n"; |
| 36 | 36 | } |
| 37 | 37 | // level up |