@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | private function sanitizeTxtData(string $txtData) : string |
| 46 | 46 | { |
| 47 | 47 | $txtDataArray = explode('\"', $txtData); |
| 48 | - $txtDataArray = array_map(function ($value) { |
|
| 48 | + $txtDataArray = array_map(function($value) { |
|
| 49 | 49 | return str_replace('"', '\"', $value); |
| 50 | 50 | }, $txtDataArray); |
| 51 | 51 | |
@@ -57,20 +57,20 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function __toString() : string |
| 59 | 59 | { |
| 60 | - $splitted_string = $this->splitTxtData(); |
|
| 61 | - $spited_with_quotes = array_map(function ($value) { |
|
| 60 | + $splitted_string = $this->splitTxtData(); |
|
| 61 | + $spited_with_quotes = array_map(function($value) { |
|
| 62 | 62 | return "\"$value\""; |
| 63 | 63 | }, $splitted_string); |
| 64 | 64 | |
| 65 | - $char_sets = implode("\n", $spited_with_quotes); |
|
| 65 | + $char_sets = implode("\n", $spited_with_quotes); |
|
| 66 | 66 | |
| 67 | 67 | if (count($spited_with_quotes) > 1) { |
| 68 | - $rdataString = " ( \n" . $char_sets . "\n ) \n"; |
|
| 68 | + $rdataString = " ( \n".$char_sets."\n ) \n"; |
|
| 69 | 69 | } else { |
| 70 | - $rdataString = ' ' . $char_sets; |
|
| 70 | + $rdataString = ' '.$char_sets; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - return $this->getMainRecordPart() . $rdataString; |
|
| 73 | + return $this->getMainRecordPart().$rdataString; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $splitted_string = str_split($this->getTxtData(), $length); |
| 83 | 83 | |
| 84 | - if(count(array_filter($splitted_string, function (string $value) { return $value === '"';}))) { |
|
| 84 | + if (count(array_filter($splitted_string, function(string $value) { return $value === '"'; }))) { |
|
| 85 | 85 | $splitted_string = $this->splitTxtData(--$length); |
| 86 | 86 | } |
| 87 | 87 | |