Passed
Branch master (6a7148)
by Curtis
01:48
created
library/PhpGedcom/Parser/SourRef/Even.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/SourRef/Data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/ObjeRef.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,37 +30,37 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Chan.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/RepoRef.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,29 +29,29 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Indi.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Sour.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -29,96 +29,96 @@
 block discarded – undo
29 29
         
30 30
         $output = "";
31 31
         $_sour = $sour->getSour();
32
-        if(empty($_sour)){
32
+        if (empty($_sour)) {
33 33
             return $output;
34
-        }else{
35
-            $output.=$level." ".$_sour." SOUR "."\n";
34
+        } else {
35
+            $output .= $level." ".$_sour." SOUR "."\n";
36 36
         }
37 37
         // level up
38 38
         $level++;
39 39
 
40 40
         // TITL
41 41
         $titl = $sour->getType();
42
-        if(!empty($type)){
43
-            $output.=$level." TITL ".$titl."\n";
42
+        if (!empty($type)) {
43
+            $output .= $level." TITL ".$titl."\n";
44 44
         }
45 45
         
46 46
         // RIN
47 47
         $rin = $sour->getRin();
48
-        if(!empty($rin)){
49
-            $output.=$level." RIN ".$rin."\n";
48
+        if (!empty($rin)) {
49
+            $output .= $level." RIN ".$rin."\n";
50 50
         }
51 51
 
52 52
         // AUTH
53 53
         $auth = $sour->getAuth();
54
-        if(!empty($auth)){
55
-            $output.=$level." AUTH ".$auth."\n";
54
+        if (!empty($auth)) {
55
+            $output .= $level." AUTH ".$auth."\n";
56 56
         }
57 57
 
58 58
         // TEXT
59 59
         $text = $sour->getText();
60
-        if(!empty($text)){
61
-            $output.=$level." TEXT ".$text."\n";
60
+        if (!empty($text)) {
61
+            $output .= $level." TEXT ".$text."\n";
62 62
         }
63 63
 
64 64
         // PUBL
65 65
         $publ = $sour->getPubl();
66
-        if(!empty($publ)){
67
-            $output.=$level." PUBL ".$publ."\n";
66
+        if (!empty($publ)) {
67
+            $output .= $level." PUBL ".$publ."\n";
68 68
         }
69 69
 
70 70
         // ABBR
71 71
         $abbr = $sour->getAbbr();
72
-        if(!empty($abbr)){
73
-            $output.=$level." ABBR ".$abbr."\n";
72
+        if (!empty($abbr)) {
73
+            $output .= $level." ABBR ".$abbr."\n";
74 74
         }
75 75
 
76 76
         // REPO  
77 77
         $repo = $sour->getRepo();
78
-        if(!empty($repo)){
78
+        if (!empty($repo)) {
79 79
             $_convert = \PhpGedcom\Writer\RepoRef::convert($repo, $level);
80
-            $output.=$_convert;
80
+            $output .= $_convert;
81 81
         }
82 82
 
83 83
         // NOTE array
84 84
         $note = $sour->getNote();
85
-        if(!empty($note) && count($note) > 0){
86
-            foreach($note as $item){
85
+        if (!empty($note) && count($note) > 0) {
86
+            foreach ($note as $item) {
87 87
                 $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
88
-                $output.=$_convert;
88
+                $output .= $_convert;
89 89
             }
90 90
         }
91 91
 
92 92
         // DATA
93 93
         $data = $sour->getData();
94
-        if(!empty($data)){
94
+        if (!empty($data)) {
95 95
             $_convert = \PhpGedcom\Writer\Sour\Data::convert($data, $level);
96
-            $output.=$_convert;
96
+            $output .= $_convert;
97 97
         }
98 98
 
99 99
         // OBJE array
100 100
         $obje = $sour->getObje();
101
-        if(!empty($obje) && count($obje) > 0){
102
-            foreach($obje as $item){
101
+        if (!empty($obje) && count($obje) > 0) {
102
+            foreach ($obje as $item) {
103 103
                 $_convert = \PhpGedcom\Writer\ObjeRef::convert($item, $level);
104
-                $output.=$_convert;
104
+                $output .= $_convert;
105 105
             }
106 106
         }
107 107
 
108 108
         // REFN array
109 109
         $refn = $sour->getRefn();
110
-        if(!empty($refn) && count($refn) > 0){
111
-            foreach($refn as $item){
110
+        if (!empty($refn) && count($refn) > 0) {
111
+            foreach ($refn as $item) {
112 112
                 $_convert = \PhpGedcom\Writer\Refn::convert($item, $level);
113
-                $output.=$_convert;
113
+                $output .= $_convert;
114 114
             }
115 115
         }
116 116
 
117 117
         // chan
118 118
         $chan = $sour->getChan();
119
-        if(!empty($chan)){
119
+        if (!empty($chan)) {
120 120
             $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level);
121
-            $output.=$_convert;
121
+            $output .= $_convert;
122 122
         }
123 123
         return $output;
124 124
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/SourRef.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -28,44 +28,44 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Fam/Even/Wife.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.