@@ -28,12 +28,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -28,7 +28,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -28,12 +28,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -28,12 +28,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -28,7 +28,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -28,11 +28,11 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -29,10 +29,10 @@ discard block |
||
| 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 |
||
| 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(); |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | public static function parse(\PhpGedcom\Parser $parser) |
| 31 | 31 | { |
| 32 | 32 | $record = $parser->getCurrentLineRecord(); |
| 33 | - $depth = (int)$record[0]; |
|
| 34 | - if(isset($record[1])){ |
|
| 33 | + $depth = (int) $record[0]; |
|
| 34 | + if (isset($record[1])) { |
|
| 35 | 35 | $identifier = $parser->normalizeIdentifier($record[1]); |
| 36 | 36 | } |
| 37 | - else{ |
|
| 37 | + else { |
|
| 38 | 38 | $parser->skipToNextLevel($depth); |
| 39 | 39 | return null; |
| 40 | 40 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | while (!$parser->eof()) { |
| 49 | 49 | $record = $parser->getCurrentLineRecord(); |
| 50 | - $currentDepth = (int)$record[0]; |
|
| 50 | + $currentDepth = (int) $record[0]; |
|
| 51 | 51 | $recordType = strtoupper(trim($record[1])); |
| 52 | 52 | |
| 53 | 53 | if ($currentDepth <= $depth) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $head->setNote($parser->parseMultiLineRecord()); |
| 102 | 102 | break; |
| 103 | 103 | default: |
| 104 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 104 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $parser->forward(); |
@@ -28,11 +28,11 @@ discard block |
||
| 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])){ |
|
| 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 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | while (!$parser->eof()) { |
| 48 | 48 | $record = $parser->getCurrentLineRecord(); |
| 49 | - $currentDepth = (int)$record[0]; |
|
| 49 | + $currentDepth = (int) $record[0]; |
|
| 50 | 50 | $recordType = strtoupper(trim($record[1])); |
| 51 | 51 | |
| 52 | 52 | if ($currentDepth <= $depth) { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $subn->setChan($chan); |
| 88 | 88 | break; |
| 89 | 89 | default: |
| 90 | - $parser->logUnhandledRecord(get_class() . ' @ ' . __LINE__); |
|
| 90 | + $parser->logUnhandledRecord(get_class().' @ '.__LINE__); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $parser->forward(); |