Passed
Branch master (6a7148)
by Curtis
01:48
created
library/PhpGedcom/Parser/Indi/Lds.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[1])){
33
-          $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1])));
34
-          $lds = new $className();
33
+            $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1])));
34
+            $lds = new $className();
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   +7 added lines, -7 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[1])){
33
-          $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1])));
31
+        $depth = (int) $record[0];
32
+        if (isset($record[1])) {
33
+          $className = '\\PhpGedcom\\Record\\Indi\\'.ucfirst(strtolower(trim($record[1])));
34 34
           $lds = new $className();
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();
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
                     break;
77 77
                 default:
78 78
                     $self = get_called_class();
79
-                    $method = 'parse' . $recordType;
79
+                    $method = 'parse'.$recordType;
80 80
 
81 81
                     if (method_exists($self, $method)) {
82 82
                         $self::$method($parser, $lds);
83 83
                     } else {
84
-                        $parser->logUnhandledRecord($self . ' @ ' . __LINE__);
84
+                        $parser->logUnhandledRecord($self.' @ '.__LINE__);
85 85
                     }
86 86
             }
87 87
 
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[1])){
33 33
           $className = '\\PhpGedcom\\Record\\Indi\\' . ucfirst(strtolower(trim($record[1])));
34 34
           $lds = new $className();
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/Indi/Fams.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  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
         if (count($record) < 3) {
34
-            $parser->logSkippedRecord('Missing family information; ' . get_class(), ' @ ' . __LINE__);
34
+            $parser->logSkippedRecord('Missing family information; '.get_class(), ' @ '.__LINE__);
35 35
             $parser->skipToNextLevel($depth);
36 36
             return null;
37 37
         }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         while (!$parser->eof()) {
47 47
             $record = $parser->getCurrentLineRecord();
48 48
             $recordType = strtoupper(trim($record[1]));
49
-            $currentDepth = (int)$record[0];
49
+            $currentDepth = (int) $record[0];
50 50
 
51 51
             if ($currentDepth <= $depth) {
52 52
                 $parser->back();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                     }
62 62
                     break;
63 63
                 default:
64
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
64
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
65 65
             }
66 66
 
67 67
             $parser->forward();
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/Indi/Chr.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         $record = $parser->getCurrentLineRecord();
26 26
         if(isset($record[2])){
27
-          $even->setFamc(trim($record[2]));
27
+            $even->setFamc(trim($record[2]));
28 28
         }
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public static function parseFamc($parser, $even)
24 24
     {
25 25
         $record = $parser->getCurrentLineRecord();
26
-        if(isset($record[2])){
26
+        if (isset($record[2])) {
27 27
           $even->setFamc(trim($record[2]));
28 28
         }
29 29
     }
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/ObjeRef/File.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $file = new \PhpGedcom\Record\ObjeRef\File();
31 31
         $record = $parser->getCurrentLineRecord();
32
-		$depth = (int) $record[0];
32
+        $depth = (int) $record[0];
33 33
         if(isset($record[2])) {
34 34
             $file->setFile($record[2]);
35 35
         }else {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
         $file = new \PhpGedcom\Record\ObjeRef\File();
31 31
         $record = $parser->getCurrentLineRecord();
32 32
 		$depth = (int) $record[0];
33
-        if(isset($record[2])) {
33
+        if (isset($record[2])) {
34 34
             $file->setFile($record[2]);
35
-        }else {
35
+        } else {
36 36
             return null;
37 37
         }
38 38
         $parser->forward();
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         while (!$parser->eof()) {
41 41
             $record = $parser->getCurrentLineRecord();
42 42
             $recordType = strtoupper(trim($record[1]));
43
-            $currentDepth = (int)$record[0];
43
+            $currentDepth = (int) $record[0];
44 44
             
45 45
             if ($currentDepth <= $depth) {
46 46
                 $parser->back();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 case 'TITL':
55 55
                     $file->setTitl(trim($record[2]));
56 56
                 default:
57
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
57
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
58 58
             }
59 59
             
60 60
             $parser->forward();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 		$depth = (int) $record[0];
33 33
         if(isset($record[2])) {
34 34
             $file->setFile($record[2]);
35
-        }else {
35
+        } else {
36 36
             return null;
37 37
         }
38 38
         $parser->forward();
Please login to merge, or discard this patch.
library/PhpGedcom/Parser/ObjeRef/File/Form.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $form = new \PhpGedcom\Record\ObjeRef\File\Form();
31 31
         $record = $parser->getCurrentLineRecord();
32
-		$depth = (int) $record[0];
32
+        $depth = (int) $record[0];
33 33
         if(isset($record[2])) {
34 34
             $form->setForm($record[2]);
35 35
         } else {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $form = new \PhpGedcom\Record\ObjeRef\File\Form();
31 31
         $record = $parser->getCurrentLineRecord();
32 32
 		$depth = (int) $record[0];
33
-        if(isset($record[2])) {
33
+        if (isset($record[2])) {
34 34
             $form->setForm($record[2]);
35 35
         } else {
36 36
             $parser->skipToNextLevel($depth);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         while (!$parser->eof()) {
42 42
             $record = $parser->getCurrentLineRecord();
43 43
             $recordType = strtoupper(trim($record[1]));
44
-            $currentDepth = (int)$record[0];
44
+            $currentDepth = (int) $record[0];
45 45
             
46 46
             if ($currentDepth <= $depth) {
47 47
                 $parser->back();
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     $form->setType(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.
library/PhpGedcom/Parser/Note.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(4);
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
         $note = new \PhpGedcom\Record\Note();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 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(4);
31
-        $depth = (int)$record[0];
32
-        if(isset($record[1])){
31
+        $depth = (int) $record[0];
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
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         while (!$parser->eof()) {
50 50
             $record = $parser->getCurrentLineRecord();
51
-            $currentDepth = (int)$record[0];
51
+            $currentDepth = (int) $record[0];
52 52
             $recordType = strtoupper(trim($record[1]));
53 53
 
54 54
             if ($currentDepth <= $depth) {
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 
59 59
             switch ($recordType) {
60 60
                 case 'CONT':
61
-                    $note->setNote($note->getNote() . "\n");
61
+                    $note->setNote($note->getNote()."\n");
62 62
                     if (isset($record[2])) {
63
-                        $note->setNote($note->getNote() . $record[2]);
63
+                        $note->setNote($note->getNote().$record[2]);
64 64
                     }
65 65
                     break;
66 66
                 case 'CONC':
67 67
                     if (isset($record[2])) {
68
-                        $note->setNote($note->getNote() . $record[2]);
68
+                        $note->setNote($note->getNote().$record[2]);
69 69
                     }
70 70
                     break;
71 71
                 case 'REFN':
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                     $note->setChan($chan);
85 85
                     break;
86 86
                 default:
87
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
87
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
88 88
             }
89 89
 
90 90
             $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.
library/PhpGedcom/Parser/Plac.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
-          $_plac = trim($record[2]);
33
+            $_plac = trim($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
         $plac = new \PhpGedcom\Record\Plac();
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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
           $_plac = trim($record[2]);
34 34
         }
35
-        else{
35
+        else {
36 36
            $parser->skipToNextLevel($depth);
37 37
            return null;
38 38
         }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         while (!$parser->eof()) {
46 46
             $record = $parser->getCurrentLineRecord();
47
-            $currentDepth = (int)$record[0];
47
+            $currentDepth = (int) $record[0];
48 48
             $recordType = strtoupper(trim($record[1]));
49 49
 
50 50
             if ($currentDepth <= $depth) {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     $plac->setMap($map);
75 75
                     break;
76 76
                 default:
77
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
77
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
78 78
             }
79 79
 
80 80
             $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
           $_plac = trim($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/Refn.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
-          $refn = new \PhpGedcom\Record\Refn();
34
-          $refn->setRefn(trim($record[2]));
33
+            $refn = new \PhpGedcom\Record\Refn();
34
+            $refn->setRefn(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
           $refn = new \PhpGedcom\Record\Refn();
34 34
           $refn->setRefn(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
                     $refn->setType(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
           $refn = new \PhpGedcom\Record\Refn();
34 34
           $refn->setRefn(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/NoteRef.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
     public static function parse(\PhpGedcom\Parser $parser)
26 26
     {
27 27
         $record = $parser->getCurrentLineRecord();
28
-        $depth = (int)$record[0];
28
+        $depth = (int) $record[0];
29 29
 
30 30
         $note = new \PhpGedcom\Record\NoteRef();
31 31
 
32 32
         if (count($record) < 3) {
33
-            $parser->logSkippedRecord('Missing note information; ' . get_class(), ' @ ' . __LINE__);
33
+            $parser->logSkippedRecord('Missing note information; '.get_class(), ' @ '.__LINE__);
34 34
             $parser->skipToNextLevel($depth);
35 35
             return null;
36 36
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         while (!$parser->eof()) {
50 50
             $record = $parser->getCurrentLineRecord();
51 51
             $recordType = strtoupper(trim($record[1]));
52
-            $currentDepth = (int)$record[0];
52
+            $currentDepth = (int) $record[0];
53 53
 
54 54
             if ($currentDepth <= $depth) {
55 55
                 $parser->back();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                     $note->addSour($sour);
63 63
                     break;
64 64
                 default:
65
-                    $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__);
65
+                    $parser->logUnhandledRecord(get_class().' @ '.__LINE__);
66 66
             }
67 67
 
68 68
             $parser->forward();
Please login to merge, or discard this patch.