Passed
Branch master (6a7148)
by Curtis
01:48
created
library/PhpGedcom/Writer/Indi/Even.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -30,63 +30,63 @@  discard block
 block discarded – undo
30 30
 
31 31
         // $_attr;
32 32
         $attr = $even->getAttr();
33
-        if(!empty($attr)){
34
-            $output.=$level." EVEN ".$attr."\n";
35
-        }else{
33
+        if (!empty($attr)) {
34
+            $output .= $level." EVEN ".$attr."\n";
35
+        } else {
36 36
             $output = $level." EVEN\n";
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
         // $ref = array();
@@ -94,33 +94,33 @@  discard block
 block discarded – undo
94 94
 
95 95
         // $obje = array();
96 96
         $obje = $even->getObje();
97
-        if(!empty($obje) && count($obje) > 0){
98
-            foreach($obje as $item){
97
+        if (!empty($obje) && count($obje) > 0) {
98
+            foreach ($obje as $item) {
99 99
                 $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level);
100
-                $output.=$_convert;
100
+                $output .= $_convert;
101 101
             }
102 102
         }
103 103
         // $sour = array();
104 104
         $sour = $even->getSour();
105
-        if(!empty($sour) && count($sour) > 0){
106
-            foreach($sour as $item){
105
+        if (!empty($sour) && count($sour) > 0) {
106
+            foreach ($sour as $item) {
107 107
                 $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level);
108
-                $output.=$_convert;
108
+                $output .= $_convert;
109 109
             }
110 110
         }
111 111
         // $note = array();
112 112
         $note = $even->getSour();
113
-        if(!empty($note) && count($note) > 0){
114
-            foreach($note as $item){
113
+        if (!empty($note) && count($note) > 0) {
114
+            foreach ($note as $item) {
115 115
                 $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
116
-                $output.=$_convert;
116
+                $output .= $_convert;
117 117
             }
118 118
         }
119 119
         // Record\Chan
120 120
         $chan = $even->getChan();
121
-        if(!empty($chan) ){
121
+        if (!empty($chan)) {
122 122
             $_convert = \PhpGedcom\Writer\Chan::convert($item, $level);
123
-            $output.=$_convert;
123
+            $output .= $_convert;
124 124
         }
125 125
         return $output;
126 126
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Indi/Name.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -29,58 +29,58 @@
 block discarded – undo
29 29
         $output = '';
30 30
         // NAME
31 31
         $_name = $name->getName();
32
-        if(empty($_name)){
32
+        if (empty($_name)) {
33 33
             return $output;
34 34
         }
35
-        $output.= $level." NAME ".$_name."\n";
35
+        $output .= $level." NAME ".$_name."\n";
36 36
         // level up
37 37
         $level++;
38 38
         
39 39
         // NPFX
40 40
         $npfx = $name->getNpfx();
41
-        if(!empty($npfx)){
42
-            $output.=$level." NPFX ".$npfx."\n";
41
+        if (!empty($npfx)) {
42
+            $output .= $level." NPFX ".$npfx."\n";
43 43
         }
44 44
 
45 45
         // GIVN
46 46
         $givn = $name->getGivn();
47
-        if(!empty($givn)){
48
-            $output.=$level." GIVN ".$givn."\n";
47
+        if (!empty($givn)) {
48
+            $output .= $level." GIVN ".$givn."\n";
49 49
         }
50 50
         // NICK
51 51
         $nick = $name->getNick();
52
-        if(!empty($nick)){
53
-            $output.=$level." NICK ".$nick."\n";
52
+        if (!empty($nick)) {
53
+            $output .= $level." NICK ".$nick."\n";
54 54
         }
55 55
         // SPFX
56 56
         $spfx = $name->getSpfx();
57
-        if(!empty($spfx)){
58
-            $output.=$level." SPFX ".$spfx."\n";
57
+        if (!empty($spfx)) {
58
+            $output .= $level." SPFX ".$spfx."\n";
59 59
         }
60 60
         // SURN
61 61
         $surn = $name->getSurn();
62
-        if(!empty($surn)){
63
-            $output.=$level." SURN ".$surn."\n";
62
+        if (!empty($surn)) {
63
+            $output .= $level." SURN ".$surn."\n";
64 64
         }
65 65
         // NSFX
66 66
         $nsfx = $name->getNsfx();
67
-        if(!empty($nsfx)){
68
-            $output.=$level." NSFX ".$nsfx."\n";
67
+        if (!empty($nsfx)) {
68
+            $output .= $level." NSFX ".$nsfx."\n";
69 69
         }
70 70
         // SOUR
71 71
         $sour = $name->getSour();
72
-        if(!empty($sour) && count($sour) > 0){
73
-            foreach($sour as $item){
72
+        if (!empty($sour) && count($sour) > 0) {
73
+            foreach ($sour as $item) {
74 74
                 $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level);
75
-                $output.=$_convert;
75
+                $output .= $_convert;
76 76
             }
77 77
         }
78 78
         // note
79 79
         $note = $name->getSour();
80
-        if(!empty($note) && count($note) > 0){
81
-            foreach($note as $item){
80
+        if (!empty($note) && count($note) > 0) {
81
+            foreach ($note as $item) {
82 82
                 $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
83
-                $output.=$_convert;
83
+                $output .= $_convert;
84 84
             }
85 85
         }
86 86
 
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Indi/Fams.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,19 +29,19 @@
 block discarded – undo
29 29
         $output = '';
30 30
         // NAME
31 31
         $_fams = $fams->getFams();
32
-        if(empty($_fams)){
32
+        if (empty($_fams)) {
33 33
             return $output;
34 34
         }
35
-        $output.= $level." FAMS @".$_fams."@\n";
35
+        $output .= $level." FAMS @".$_fams."@\n";
36 36
         // level up
37 37
         $level++;
38 38
         
39 39
         // note
40 40
         $note = $fams->getNote();
41
-        if(!empty($note) && count($note) > 0){
42
-            foreach($note as $item){
41
+        if (!empty($note) && count($note) > 0) {
42
+            foreach ($note as $item) {
43 43
                 $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
44
-                $output.=$_convert;
44
+                $output .= $_convert;
45 45
             }
46 46
         }
47 47
 
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Note.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
         $level = 0;
30 30
         $output = "";
31 31
         $id = $note->getId();
32
-        if(!empty($id)){
33
-            $output.= $level." ".$id." "." NOTE \n";
34
-        }else{
32
+        if (!empty($id)) {
33
+            $output .= $level." ".$id." "." NOTE \n";
34
+        } else {
35 35
             return $output;
36 36
         }
37 37
         
@@ -39,40 +39,40 @@  discard block
 block discarded – undo
39 39
         $level++;
40 40
         // RIN
41 41
         $rin = $note->getRin();
42
-        if($rin){
43
-            $output.=$level." RIN ".$rin."\n";
42
+        if ($rin) {
43
+            $output .= $level." RIN ".$rin."\n";
44 44
         }
45 45
 
46 46
         // cont
47 47
         $cont = $note->getNote();
48
-        if($cont){
49
-            $output.=$level." CONT ".$cont."\n";
48
+        if ($cont) {
49
+            $output .= $level." CONT ".$cont."\n";
50 50
         }
51 51
 
52 52
         // REFN
53 53
         $refn = $note->getRefn();
54
-        if(!empty($refn) && count($refn) > 0) {
55
-            foreach($refn as $item){
56
-                if($item){
54
+        if (!empty($refn) && count($refn) > 0) {
55
+            foreach ($refn as $item) {
56
+                if ($item) {
57 57
                     $_convert = \PhpGedcom\Writer\Refn::convert($item, $level);
58
-                    $output.=$_convert;
58
+                    $output .= $_convert;
59 59
                 }
60 60
             }
61 61
         }
62 62
         // CHAN
63 63
         $chan = $note->getChan();
64
-        if($chan){
64
+        if ($chan) {
65 65
             $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level);
66
-            $output.=$_convert;
66
+            $output .= $_convert;
67 67
         }
68 68
 
69 69
         // SOUR array
70 70
         $sour = $note->getSour();
71
-        if(!empty($sour) && count($sour) > 0) {
72
-            foreach($sour as $item){
73
-                if($item){
71
+        if (!empty($sour) && count($sour) > 0) {
72
+            foreach ($sour as $item) {
73
+                if ($item) {
74 74
                     $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level);
75
-                    $output.=$_convert;
75
+                    $output .= $_convert;
76 76
                 }
77 77
             }
78 78
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Refn.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
         
30 30
         $output = "";
31 31
         $_refn = $refn->getRefn();
32
-        if(empty($_refn)){
32
+        if (empty($_refn)) {
33 33
             return $output;
34
-        }else{
35
-            $output.=$level." REFN ".$_refn."\n";
34
+        } else {
35
+            $output .= $level." REFN ".$_refn."\n";
36 36
         }
37 37
         // level up
38 38
         $level++;
39 39
         // DATE
40 40
         $type = $refn->getType();
41
-        if(!empty($type)){
42
-            $output.=$level." TYPE ".$type."\n";
41
+        if (!empty($type)) {
42
+            $output .= $level." TYPE ".$type."\n";
43 43
         }
44 44
         
45 45
         return $output;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/NoteRef.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,17 +30,17 @@
 block discarded – undo
30 30
 
31 31
         // $_note
32 32
         $_note = $note->getNote();
33
-        if(!empty($_note)){
34
-            $output.=$level." NOTE ".$_note."\n";
33
+        if (!empty($_note)) {
34
+            $output .= $level." NOTE ".$_note."\n";
35 35
         }
36 36
 
37 37
         $level++;
38 38
         // $sour
39 39
         $sour = $note->getSour();
40
-        if($sour && count($sour) > 0){
41
-            foreach($sour as $item){
40
+        if ($sour && count($sour) > 0) {
41
+            foreach ($sour as $item) {
42 42
                 $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level);
43
-                $output.=$_convert;
43
+                $output .= $_convert;
44 44
             }
45 45
         }
46 46
         return $output;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Fam.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -24,129 +24,129 @@
 block discarded – undo
24 24
      * @param int $level
25 25
      * @return string
26 26
      */
27
-    public static function convert(\PhpGedcom\Record\Fam &$fam, $level=0)
27
+    public static function convert(\PhpGedcom\Record\Fam &$fam, $level = 0)
28 28
     {
29 29
         
30 30
         $output = "";
31 31
         $id = $fam->getId();
32
-        if(empty($id)){
32
+        if (empty($id)) {
33 33
             return $output;
34
-        }else{
35
-            $output.=$level." @".$id."@ FAM "."\n";
34
+        } else {
35
+            $output .= $level." @".$id."@ FAM "."\n";
36 36
         }
37 37
         // level up
38 38
         $level++;
39 39
 
40 40
         // HUSB
41 41
         $husb = $fam->getHusb();
42
-        if(!empty($husb)){
43
-            $output.=$level." HUSB @".$husb."@\n";
42
+        if (!empty($husb)) {
43
+            $output .= $level." HUSB @".$husb."@\n";
44 44
         }
45 45
         
46 46
         // WIFE
47 47
         $wife = $fam->getWife();
48
-        if(!empty($wife)){
49
-            $output.=$level." WIFE @".$wife."@\n";
48
+        if (!empty($wife)) {
49
+            $output .= $level." WIFE @".$wife."@\n";
50 50
         }
51 51
 
52 52
         // CHIL
53 53
         $chil = $fam->getChil();
54
-        if(!empty($chil) && count($chil) > 0){
55
-            foreach($chil as $item){
56
-                if($item){
54
+        if (!empty($chil) && count($chil) > 0) {
55
+            foreach ($chil as $item) {
56
+                if ($item) {
57 57
                     $_convert = $level." CHIL @".$item."@\n";
58
-                    $output.=$_convert;
58
+                    $output .= $_convert;
59 59
                 }
60 60
             }
61 61
         }
62 62
         // NCHI
63 63
         $nchi = $fam->getNchi();
64
-        if(!empty($nchi)){
65
-            $output.=$level." NCHI ".$nchi."\n";
64
+        if (!empty($nchi)) {
65
+            $output .= $level." NCHI ".$nchi."\n";
66 66
         }
67 67
 
68 68
         // SUBM array
69 69
         $subm = $fam->getSubm();
70 70
         
71
-        if(!empty($subm) && count($subm) > 0){
72
-            foreach($subm as $item){
73
-                if($item){
74
-                    $output.=$level." SUBM ".$item."\n";
71
+        if (!empty($subm) && count($subm) > 0) {
72
+            foreach ($subm as $item) {
73
+                if ($item) {
74
+                    $output .= $level." SUBM ".$item."\n";
75 75
                 }
76 76
             }
77 77
         }
78 78
 
79 79
         // RIN
80 80
         $rin = $fam->getRin();
81
-        if(!empty($rin)){
82
-            $output.=$level." RIN ".$rin."\n";
81
+        if (!empty($rin)) {
82
+            $output .= $level." RIN ".$rin."\n";
83 83
         }
84 84
         // CHAN
85 85
         $chan = $fam->getChan();
86
-        if(!empty($chan)){
86
+        if (!empty($chan)) {
87 87
             $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level);
88
-            $output.=$_convert;
88
+            $output .= $_convert;
89 89
         }
90 90
         // SLGS
91 91
         $slgs = $fam->getSlgs();
92
-        if(!empty($slgs) && count($slgs) > 0){
93
-            if($slgs){
92
+        if (!empty($slgs) && count($slgs) > 0) {
93
+            if ($slgs) {
94 94
                 $_convert = \PhpGedcom\Writer\Fam\Slgs::convert($item, $level);
95
-                $output.=$_convert;
95
+                $output .= $_convert;
96 96
             }
97 97
         }
98 98
 
99 99
         // REFN array
100 100
         $refn = $fam->getRefn();
101
-        if(!empty($refn) && count($refn) > 0){
102
-            foreach($refn as $item){
103
-                if($item){
101
+        if (!empty($refn) && count($refn) > 0) {
102
+            foreach ($refn as $item) {
103
+                if ($item) {
104 104
                     $_convert = \PhpGedcom\Writer\Refn::convert($item, $level);
105
-                    $output.=$_convert;
105
+                    $output .= $_convert;
106 106
                 }
107 107
             }
108 108
         }
109 109
 
110 110
         // NOTE array
111 111
         $note = $fam->getNote();
112
-        if(!empty($note) && count($note) > 0){
113
-            foreach($note as $item){
114
-                if($item){
112
+        if (!empty($note) && count($note) > 0) {
113
+            foreach ($note as $item) {
114
+                if ($item) {
115 115
                     $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
116
-                    $output.=$_convert;
116
+                    $output .= $_convert;
117 117
                 }
118 118
             }
119 119
         }
120 120
 
121 121
         // SOUR
122 122
         $sour = $fam->getSour();
123
-        if(!empty($sour) && count($sour) > 0){
124
-            foreach($sour as $item){
125
-                if($item){
123
+        if (!empty($sour) && count($sour) > 0) {
124
+            foreach ($sour as $item) {
125
+                if ($item) {
126 126
                     $_convert = \PhpGedcom\Writer\SourRef::convert($item, $level);
127
-                    $output.=$_convert;
127
+                    $output .= $_convert;
128 128
                 }
129 129
             }
130 130
         }
131 131
 
132 132
         // OBJE
133 133
         $obje = $fam->getObje();
134
-        if(!empty($obje) && count($obje) > 0){
135
-            foreach($obje as $item){
136
-                if($item){
134
+        if (!empty($obje) && count($obje) > 0) {
135
+            foreach ($obje as $item) {
136
+                if ($item) {
137 137
                     $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level);
138
-                    $output.=$_convert;
138
+                    $output .= $_convert;
139 139
                 }
140 140
             }
141 141
         }
142 142
 
143 143
         // EVEN
144 144
         $even = $fam->getAllEven();
145
-        if(!empty($even) && count($even) > 0){
146
-            foreach($even as $item){
147
-                if($item){
145
+        if (!empty($even) && count($even) > 0) {
146
+            foreach ($even as $item) {
147
+                if ($item) {
148 148
                     $_convert = \PhpGedcom\Writer\Fam\Even::convert($item, $level);
149
-                    $output.=$_convert;
149
+                    $output .= $_convert;
150 150
                 }
151 151
             }
152 152
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head/Sour.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $output = "";
31 31
         $_sour = $sour->getSour();
32
-        if($_sour){
33
-            $output.=$level." SOUR ".$_sour."\n";
34
-        }else{
32
+        if ($_sour) {
33
+            $output .= $level." SOUR ".$_sour."\n";
34
+        } else {
35 35
             return $output;
36 36
         }
37 37
 
@@ -40,28 +40,28 @@  discard block
 block discarded – undo
40 40
 
41 41
         // VERS
42 42
         $vers = $sour->getVersion();
43
-        if($vers){
44
-            $output.=$level." VERS ".$vers."\n";
43
+        if ($vers) {
44
+            $output .= $level." VERS ".$vers."\n";
45 45
         }
46 46
 
47 47
         // NAME
48 48
         $name = $sour->getName();
49
-        if($name){
50
-            $output.=$level." NAME ".$name."\n";
49
+        if ($name) {
50
+            $output .= $level." NAME ".$name."\n";
51 51
         }
52 52
 
53 53
         // CORP
54 54
         $corp = $sour->getCorp();
55
-        if($corp){
55
+        if ($corp) {
56 56
             $_convert = \PhpGedcom\Writer\Head\Sour\Corp::convert($corp, $level);
57
-            $output.=$_convert;
57
+            $output .= $_convert;
58 58
         }
59 59
 
60 60
         // DATA
61 61
         $data = $sour->getData();
62
-        if($data){
62
+        if ($data) {
63 63
             $_convert = \PhpGedcom\Writer\Head\Sour\Data::convert($data, $level);
64
-            $output.=$_convert;
64
+            $output .= $_convert;
65 65
         }
66 66
         return $output;
67 67
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head/Sour/Data.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $output = "";
31 31
         $_data = $data->getData();
32
-        if($_data){
33
-            $output.=$level." DATA ".$_data."\n";
34
-        }else{
32
+        if ($_data) {
33
+            $output .= $level." DATA ".$_data."\n";
34
+        } else {
35 35
             return $output;
36 36
         }
37 37
 
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 
41 41
         // DATE
42 42
         $date = $corp->getDate();
43
-        if($date){
44
-            $output.=$level." DATE ".$date."\n";
43
+        if ($date) {
44
+            $output .= $level." DATE ".$date."\n";
45 45
         }
46 46
 
47 47
         // COPR
48 48
         $corp = $corp->getCorp();
49
-        if($corp){
50
-            $output.=$level." COPR ".$corp."\n";
49
+        if ($corp) {
50
+            $output .= $level." COPR ".$corp."\n";
51 51
         }
52 52
 
53 53
         return $output;
Please login to merge, or discard this patch.