@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function __toString() : string |
41 | 41 | { |
42 | - return $this->getMainRecordPart() . ' ' . $this->getAddress(); |
|
42 | + return $this->getMainRecordPart().' '.$this->getAddress(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -117,8 +117,7 @@ discard block |
||
117 | 117 | * @param int|null $ttl |
118 | 118 | * @return SoaRecord |
119 | 119 | */ |
120 | - public function appendSoaRecord |
|
121 | - ( |
|
120 | + public function appendSoaRecord( |
|
122 | 121 | string $mName, |
123 | 122 | string $rName, |
124 | 123 | int $serial, |
@@ -150,8 +149,7 @@ discard block |
||
150 | 149 | * @param int|null $ttl |
151 | 150 | * @return SrvRecord |
152 | 151 | */ |
153 | - public function appendSrvRecord |
|
154 | - ( |
|
152 | + public function appendSrvRecord( |
|
155 | 153 | int $priority, |
156 | 154 | int $weight, |
157 | 155 | int $port, |
@@ -199,7 +199,7 @@ |
||
199 | 199 | * @return NaptrRecord |
200 | 200 | */ |
201 | 201 | public function appendNaptrRecord(int $order, int $preference, string $flags, string $services, |
202 | - string $regexp, string $replacement, int $ttl = NULL) : NaptrRecord |
|
202 | + string $regexp, string $replacement, int $ttl = NULL) : NaptrRecord |
|
203 | 203 | { |
204 | 204 | return new NaptrRecord($this->node, $ttl ?? $this->defaultTtl, |
205 | 205 | $order, $preference, $flags, $services, $regexp, $replacement); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function __toString() : string |
41 | 41 | { |
42 | - return $this->getMainRecordPart() . ' ' . $this->getAddress(); |
|
42 | + return $this->getMainRecordPart().' '.$this->getAddress(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function getNode() : Node |
131 | 131 | { |
132 | - if(! $this->isHasNode()) { |
|
132 | + if (!$this->isHasNode()) { |
|
133 | 133 | throw new \RuntimeException('ValidationError has no Node'); |
134 | 134 | } |
135 | 135 | return $this->node; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function getRecord() : Record |
150 | 150 | { |
151 | - if(! $this->isHasRecord()) { |
|
151 | + if (!$this->isHasRecord()) { |
|
152 | 152 | throw new \RuntimeException('ValidationError has no Record'); |
153 | 153 | } |
154 | 154 | return $this->record; |
@@ -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 |
@@ -101,6 +101,6 @@ |
||
101 | 101 | */ |
102 | 102 | public function getText(): string |
103 | 103 | { |
104 | - return self::$textForCode[(int)$this->getValue()]; |
|
104 | + return self::$textForCode[(int) $this->getValue()]; |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | \ No newline at end of file |
@@ -75,7 +75,7 @@ |
||
75 | 75 | */ |
76 | 76 | public function __toString(): string |
77 | 77 | { |
78 | - return $this->getMainRecordPart() . " {$this->getFlags()} {$this->getTag()} \"{$this->getValue()}\""; |
|
78 | + return $this->getMainRecordPart()." {$this->getFlags()} {$this->getTag()} \"{$this->getValue()}\""; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -122,7 +122,7 @@ |
||
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
125 | - * @return string |
|
125 | + * @return integer |
|
126 | 126 | */ |
127 | 127 | public function getFlags() |
128 | 128 | { |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | public function __toString(): string |
76 | 76 | { |
77 | - return $this->getMainRecordPart() . ' ' . |
|
77 | + return $this->getMainRecordPart().' '. |
|
78 | 78 | implode(' ', [ |
79 | 79 | $this->getOrder(), |
80 | 80 | $this->getPreference(), |