Passed
Branch master (6a7148)
by Curtis
01:48
created
library/PhpGedcom/Parser/Head/Sour.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $source = new \PhpGedcom\Record\Head\Sour();
34
-          $source->setSour(trim($record[2]));
33
+            $source = new \PhpGedcom\Record\Head\Sour();
34
+            $source->setSour(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();
Please login to merge, or discard this 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
           $source = new \PhpGedcom\Record\Head\Sour();
34 34
           $source->setSour(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();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                     $source->setData($data);
67 67
                     break;
68 68
                 default:
69
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
69
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
70 70
             }
71 71
 
72 72
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if(isset($record[2])){
33 33
           $source = new \PhpGedcom\Record\Head\Sour();
34 34
           $source->setSour(trim($record[2]));
35
-        }
36
-        else{
35
+        } else{
37 36
            $parser->skipToNextLevel($depth);
38 37
            return null;
39 38
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Sour/Data.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $data = new \PhpGedcom\Record\Head\Sour\Data();
34
-          $data->setData(trim($record[2]));
33
+            $data = new \PhpGedcom\Record\Head\Sour\Data();
34
+            $data->setData(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();
Please login to merge, or discard this 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
           $data = new \PhpGedcom\Record\Head\Sour\Data();
34 34
           $data->setData(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();
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                     $data->setCopr(trim($record[2]));
59 59
                     break;
60 60
                 default:
61
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
61
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
62 62
             }
63 63
 
64 64
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if(isset($record[2])){
33 33
           $data = new \PhpGedcom\Record\Head\Sour\Data();
34 34
           $data->setData(trim($record[2]));
35
-        }
36
-        else{
35
+        } else{
37 36
            $parser->skipToNextLevel($depth);
38 37
            return null;
39 38
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Sour/Corp.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $corp = new \PhpGedcom\Record\Head\Sour\Corp();
34
-          $corp->setCorp(trim($record[2]));
33
+            $corp = new \PhpGedcom\Record\Head\Sour\Corp();
34
+            $corp->setCorp(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
 
Please login to merge, or discard this 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
           $corp = new \PhpGedcom\Record\Head\Sour\Corp();
34 34
           $corp->setCorp(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
 block discarded – undo
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();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                     $corp->addPhon(trim($record[2]));
60 60
                     break;
61 61
                 default:
62
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
62
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
63 63
             }
64 64
 
65 65
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if(isset($record[2])){
33 33
           $corp = new \PhpGedcom\Record\Head\Sour\Corp();
34 34
           $corp->setCorp(trim($record[2]));
35
-        }
36
-        else{
35
+        } else{
37 36
            $parser->skipToNextLevel($depth);
38 37
            return null;
39 38
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Plac.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  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];
31
+        $depth = (int) $record[0];
32 32
 
33 33
         $plac = new \PhpGedcom\Record\Head\Plac();
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         while (!$parser->eof()) {
38 38
             $record = $parser->getCurrentLineRecord();
39 39
             $recordType = strtoupper(trim($record[1]));
40
-            $currentDepth = (int)$record[0];
40
+            $currentDepth = (int) $record[0];
41 41
 
42 42
             if ($currentDepth <= $depth) {
43 43
                 $parser->back();
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                     $plac->setForm(trim($record[2]));
50 50
                     break;
51 51
                 default:
52
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
52
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
53 53
             }
54 54
 
55 55
             $parser->forward();
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Char.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $char = new \PhpGedcom\Record\Head\Char();
34
-          $char->setChar(trim($record[2]));
33
+            $char = new \PhpGedcom\Record\Head\Char();
34
+            $char->setChar(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
 
Please login to merge, or discard this 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
           $char = new \PhpGedcom\Record\Head\Char();
34 34
           $char->setChar(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
 block discarded – undo
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();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     $char->setVers(trim($record[2]));
57 57
                     break;
58 58
                 default:
59
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
59
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
60 60
             }
61 61
 
62 62
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if(isset($record[2])){
33 33
           $char = new \PhpGedcom\Record\Head\Char();
34 34
           $char->setChar(trim($record[2]));
35
-        }
36
-        else{
35
+        } else{
37 36
            $parser->skipToNextLevel($depth);
38 37
            return null;
39 38
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Date.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $date = new \PhpGedcom\Record\Head\Date();
34
-          $date->setDate(trim($record[2]));
33
+            $date = new \PhpGedcom\Record\Head\Date();
34
+            $date->setDate(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();
Please login to merge, or discard this 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
           $date = new \PhpGedcom\Record\Head\Date();
34 34
           $date->setDate(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
                     $date->setTime(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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         if(isset($record[2])){
33 33
           $date = new \PhpGedcom\Record\Head\Date();
34 34
           $date->setDate(trim($record[2]));
35
-        }
36
-        else{
35
+        } else{
37 36
            $parser->skipToNextLevel($depth);
38 37
            return null;
39 38
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Head/Gedc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  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];
31
+        $depth = (int) $record[0];
32 32
 
33 33
         $gedc = new \PhpGedcom\Record\Head\Gedc();
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         while (!$parser->eof()) {
38 38
             $record = $parser->getCurrentLineRecord();
39 39
             $recordType = strtoupper(trim($record[1]));
40
-            $currentDepth = (int)$record[0];
40
+            $currentDepth = (int) $record[0];
41 41
 
42 42
             if ($currentDepth <= $depth) {
43 43
                 $parser->back();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                     $gedc->setForm(trim($record[2]));
53 53
                     break;
54 54
                 default:
55
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
55
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
56 56
             }
57 57
 
58 58
             $parser->forward();
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Caln.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33
-          $identifier = $parser->normalizeIdentifier($record[2]);
33
+            $identifier = $parser->normalizeIdentifier($record[2]);
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
         $caln = new \PhpGedcom\Record\Caln();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  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
           $identifier = $parser->normalizeIdentifier($record[2]);
34 34
         }
35
-        else{
35
+        else {
36 36
            $parser->skipToNextLevel($depth);
37 37
            return null;
38 38
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         while (!$parser->eof()) {
46 46
             $record = $parser->getCurrentLineRecord();
47 47
             $recordType = strtolower(trim($record[1]));
48
-            $lineDepth = (int)$record[0];
48
+            $lineDepth = (int) $record[0];
49 49
 
50 50
             if ($lineDepth <= $depth) {
51 51
                 $parser->back();
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
             }
54 54
 
55 55
             if ($caln->hasAttribute($recordType)) {
56
-                $caln->{'set' . $recordType}(trim($record[2]));
56
+                $caln->{'set'.$recordType}(trim($record[2]));
57 57
             } else {
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
         $depth = (int)$record[0];
32 32
         if(isset($record[2])){
33 33
           $identifier = $parser->normalizeIdentifier($record[2]);
34
-        }
35
-        else{
34
+        } else{
36 35
            $parser->skipToNextLevel($depth);
37 36
            return null;
38 37
         }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Obje.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
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
         $obje = new \PhpGedcom\Record\Obje();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $record = $parser->getCurrentLineRecord();
31 31
         $depth = (int) $record[0];
32
-        if(isset($record[1])){
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
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                     break;
84 84
 
85 85
                 default:
86
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
86
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
87 87
             }
88 88
 
89 89
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.