Passed
Branch master (6a7148)
by Curtis
01:48
created
library/PhpGedcom/Writer/Head/Plac.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
         $level++;
34 34
         // FORM
35 35
         $form = $plac->getForm();
36
-        if($form){
37
-            $output.=$level." FORM ".$form."\n";
36
+        if ($form) {
37
+            $output .= $level." FORM ".$form."\n";
38 38
         }
39 39
         
40 40
         return $output;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head/Char.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public static function convert(\PhpGedcom\Record\Head\Char &$char, $level)
29 29
     {
30
-        $output ="";
30
+        $output = "";
31 31
         // char
32 32
         $_char = $char->getChar();
33
-        if($_char){
34
-            $output.=$level." CHAR ".$_char."\n";
35
-        }else{
33
+        if ($_char) {
34
+            $output .= $level." CHAR ".$_char."\n";
35
+        } else {
36 36
             return $output;
37 37
         }
38 38
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
         $level++;
41 41
         // VERS
42 42
         $vers = $char->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
         
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head/Date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $output = "";
31 31
         $_date = $date->getDate();
32
-        if($_date){
33
-            $output .=$level." DATE ".$_date."\n";
34
-        }else{
32
+        if ($_date) {
33
+            $output .= $level." DATE ".$_date."\n";
34
+        } else {
35 35
             return $output;
36 36
         }
37 37
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $level++;
40 40
         // Time
41 41
         $time = $date->getTime();
42
-        if($time){
43
-            $output.=$level." TIME ".$time."\n";
42
+        if ($time) {
43
+            $output .= $level." TIME ".$time."\n";
44 44
         }
45 45
 
46 46
         return $output;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head/Gedc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
33 33
         $level++;
34 34
         // VERS
35 35
         $vers = $gedc->getVersion();
36
-        if($vers){
37
-            $output.=$level." VERS ".$vers."\n";
36
+        if ($vers) {
37
+            $output .= $level." VERS ".$vers."\n";
38 38
         }
39 39
 
40 40
         // FORM
41 41
         $form = $gedc->getForm();
42
-        if($form){
43
-            $output.=$level." FORM ".$form."\n";
42
+        if ($form) {
43
+            $output .= $level." FORM ".$form."\n";
44 44
         }
45 45
         return $output;
46 46
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Caln.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $output = "";
30 30
         $_caln = $caln->getCaln();
31
-        if(empty($_caln)){
31
+        if (empty($_caln)) {
32 32
             return $output;
33
-        }else{
34
-            $output.=$level." CALN ".$_caln."\n";
33
+        } else {
34
+            $output .= $level." CALN ".$_caln."\n";
35 35
         }
36 36
 
37 37
         // level up
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
         // medi
41 41
         $medi = $caln->getMedi();
42
-        if(!empty($medi)){
43
-            $output.=$level." MEDI ".$medi."\n";
42
+        if (!empty($medi)) {
43
+            $output .= $level." MEDI ".$medi."\n";
44 44
         }
45 45
         return $output;
46 46
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Obje.php 1 patch
Spacing   +23 added lines, -23 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 = $obje->getId();
32
-        if($id){
33
-            $output.=$level." ".$id." OBJE\n";
34
-        }else{
32
+        if ($id) {
33
+            $output .= $level." ".$id." OBJE\n";
34
+        } else {
35 35
             return $output;
36 36
         }
37 37
 
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 
41 41
         // FORM
42 42
         $form = $obje->getName();
43
-        if($form){
44
-            $output.=$level." FORM ".$form."\n";
43
+        if ($form) {
44
+            $output .= $level." FORM ".$form."\n";
45 45
         }
46 46
 
47 47
         // TITL
48 48
         $titl = $obje->getTitl();
49
-        if($titl){
50
-            $output.=$level." TITL ".$titl."\n";
49
+        if ($titl) {
50
+            $output .= $level." TITL ".$titl."\n";
51 51
         }
52 52
 
53 53
         // OBJE 
@@ -55,49 +55,49 @@  discard block
 block discarded – undo
55 55
 
56 56
         // RIN
57 57
         $rin = $obje->getRin();
58
-        if($rin){
59
-            $output.=$level." RIN ".$rin."\n";
58
+        if ($rin) {
59
+            $output .= $level." RIN ".$rin."\n";
60 60
         }
61 61
 
62 62
         // REFN
63 63
         $refn = $obje->getRefn();
64
-        if(!empty($refn) && count($refn) > 0) {
65
-            foreach($refn as $item){
66
-                if($item){
64
+        if (!empty($refn) && count($refn) > 0) {
65
+            foreach ($refn as $item) {
66
+                if ($item) {
67 67
                     $_convert = \PhpGedcom\Writer\Refn::convert($item, $level);
68
-                    $output.=$_convert;
68
+                    $output .= $_convert;
69 69
                 }
70 70
             }
71 71
         }
72 72
 
73 73
         // BLOB
74 74
         $blob = $obje->getBlob();
75
-        if($blob){
76
-            $output.=$level." BLOB ".$blob."\n";
75
+        if ($blob) {
76
+            $output .= $level." BLOB ".$blob."\n";
77 77
         }
78 78
 
79 79
         // NOTE
80 80
         $note = $obje->getNote();
81
-        if($note && count($note) > 0) {
82
-            foreach($note as $item){
83
-                if($item){
81
+        if ($note && count($note) > 0) {
82
+            foreach ($note as $item) {
83
+                if ($item) {
84 84
                     $_convert = \PhpGedcom\Writer\NoteRef::convert($item, $level);
85
-                    $output.=$_convert;
85
+                    $output .= $_convert;
86 86
                 }
87 87
             }
88 88
         }
89 89
 
90 90
         // CHAN
91 91
         $chan = $obje->getChan();
92
-        if($chan){
92
+        if ($chan) {
93 93
             $_convert = \PhpGedcom\Writer\Chan::convert($chan, $level);
94
-            $output.=$_convert;
94
+            $output .= $_convert;
95 95
         }
96 96
 
97 97
         // FILE
98 98
         $file = $obje->getFile();
99
-        if($file){
100
-            $output.=$level." FILE ".$file."\n";
99
+        if ($file) {
100
+            $output .= $level." FILE ".$file."\n";
101 101
         }
102 102
 
103 103
         // 
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Head.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -34,79 +34,79 @@
 block discarded – undo
34 34
 
35 35
       //SOUR
36 36
       $sour = $head->getSour();
37
-      if($sour){
37
+      if ($sour) {
38 38
         $_convert = \PhpGedcom\Writer\Head\Sour::convert($sour, $level);
39
-        $output.=$_convert;
39
+        $output .= $_convert;
40 40
       }
41 41
       
42 42
       // DEST
43 43
       $dest = $head->getDest();
44
-      if($dest){
45
-        $output.=$level." DEST ".$dest."\n";
44
+      if ($dest) {
45
+        $output .= $level." DEST ".$dest."\n";
46 46
       }
47 47
 
48 48
       //Subm
49 49
       $subm = $head->getSubm();
50
-      if($subm){
51
-        $output.=$level." SUBM ".$subm."\n";
50
+      if ($subm) {
51
+        $output .= $level." SUBM ".$subm."\n";
52 52
       }
53 53
 
54 54
       // SUBN
55 55
       $subn = $head->getSubn();
56
-      if($subn){
57
-        $output.=$level." SUBN ".$subn."\n";
56
+      if ($subn) {
57
+        $output .= $level." SUBN ".$subn."\n";
58 58
       }
59 59
 
60 60
       // FILE
61 61
       $file = $head->getFile();
62
-      if($file){
63
-        $output.=$level." FILE ".$file."\n";
62
+      if ($file) {
63
+        $output .= $level." FILE ".$file."\n";
64 64
       }
65 65
 
66 66
       // COPR
67 67
       $copr = $head->getCopr();
68
-      if($copr){
69
-        $output.=$level." COPR ".$copr."\n";
68
+      if ($copr) {
69
+        $output .= $level." COPR ".$copr."\n";
70 70
       }
71 71
 
72 72
       // LANG
73 73
       $lang = $head->getLang();
74
-      if($lang){
75
-        $output.=$level." LANG ".$lang."\n";
74
+      if ($lang) {
75
+        $output .= $level." LANG ".$lang."\n";
76 76
       }
77 77
       // DATE
78 78
       $date = $head->getDate();
79
-      if($date){
79
+      if ($date) {
80 80
         $_convert = \PhpGedcom\Writer\Head\Date::convert($date, $level);
81
-        $output.=$_convert;
81
+        $output .= $_convert;
82 82
       }
83 83
 
84 84
 
85 85
       // GEDC
86 86
       $gedc = $head->getGedc();
87
-      if($gedc){
87
+      if ($gedc) {
88 88
         $_convert = \PhpGedcom\Writer\Head\Gedc::convert($gedc, $level);
89
-        $output.=$_convert;
89
+        $output .= $_convert;
90 90
       }
91 91
 
92 92
 
93 93
       // CHAR
94 94
       $char = $head->getChar();
95
-      if($char){
95
+      if ($char) {
96 96
         $_convert = \PhpGedcom\Writer\Head\Char::convert($char, $level);
97
-        $output.=$_convert;
97
+        $output .= $_convert;
98 98
       }
99 99
       // PLAC
100 100
       $plac = $head->getPlac();
101
-      if($plac){
101
+      if ($plac) {
102 102
         $_convert = \PhpGedcom\Writer\Head\Plac::convert($plac, $level);
103
-        $output.=$_convert;
103
+        $output .= $_convert;
104 104
       }
105 105
 
106 106
       // NOTE
107 107
       $note = $head->getNote();
108
-      if($note){
109
-        $output.=$level." NOTE ".$note."\n";
108
+      if ($note) {
109
+        $output .= $level." NOTE ".$note."\n";
110 110
       }
111 111
       // 
112 112
         /*
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Subn.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,53 +29,53 @@
 block discarded – undo
29 29
         $level = 0;
30 30
         $output = "";
31 31
         $_subn = $subn->getSubn();
32
-        if(empty($_subn)){
32
+        if (empty($_subn)) {
33 33
             return $output;
34
-        }else{
35
-            $output.=$level." ".$_subn." SUBN \n";
34
+        } else {
35
+            $output .= $level." ".$_subn." SUBN \n";
36 36
         }
37 37
         // level up
38 38
         $level++;
39 39
 
40 40
         // SUBM
41 41
         $subm = $subn->getSubm();
42
-        if(!empty($subm)){
43
-            $output.=$level." SUBM ".$subm."\n";
42
+        if (!empty($subm)) {
43
+            $output .= $level." SUBM ".$subm."\n";
44 44
         }
45 45
 
46 46
         // FAMF
47 47
         $famf = $subn->getFamf();
48
-        if(!empty($famf)){
49
-            $output.=$level." FAMF ".$famf."\n";
48
+        if (!empty($famf)) {
49
+            $output .= $level." FAMF ".$famf."\n";
50 50
         }
51 51
 
52 52
         // TEMP
53 53
         $temp = $subn->getTemp();
54
-        if(!empty($temp)){
55
-            $output.=$level." TEMP ".$temp."\n";
54
+        if (!empty($temp)) {
55
+            $output .= $level." TEMP ".$temp."\n";
56 56
         }
57 57
 
58 58
         // ANCE
59 59
         $ance = $subn->getAnce();
60
-        if(!empty($ance)){
61
-            $output.=$level." ANCE ".$ance."\n";
60
+        if (!empty($ance)) {
61
+            $output .= $level." ANCE ".$ance."\n";
62 62
         }
63 63
         
64 64
         // DESC
65 65
         $desc = $subn->getDesc();
66
-        if(!empty($desc)){
67
-            $output.=$level." DESC ".$desc."\n";
66
+        if (!empty($desc)) {
67
+            $output .= $level." DESC ".$desc."\n";
68 68
         }
69 69
         // ORDI
70 70
         $ordi = $subn->getOrdi();
71
-        if(!empty($ordi)){
72
-            $output.=$level." ORDI ".$ordi."\n";
71
+        if (!empty($ordi)) {
72
+            $output .= $level." ORDI ".$ordi."\n";
73 73
         }
74 74
 
75 75
         // RIN
76 76
         $rin = $subn->getRin();
77
-        if(!empty($rin)){
78
-            $output.=$level." RIN ".$rin."\n";
77
+        if (!empty($rin)) {
78
+            $output .= $level." RIN ".$rin."\n";
79 79
         }
80 80
         
81 81
         return $output;
Please login to merge, or discard this patch.
library/PhpGedcom/Writer/Phon.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public static function convert($phon, $level = 1)
29 29
     {
30
-        $output = "{$level} PHON " . $phon . "\n";
30
+        $output = "{$level} PHON ".$phon."\n";
31 31
         
32 32
         return $output;
33 33
     }
Please login to merge, or discard this patch.