@@ -171,7 +171,7 @@ |
||
171 | 171 | $this->dom->addChild( |
172 | 172 | $nova, |
173 | 173 | "fimValid", |
174 | - ! empty($this->std->novavalidade->fimvalid) |
|
174 | + !empty($this->std->novavalidade->fimvalid) |
|
175 | 175 | ? $this->std->novavalidade->fimvalid |
176 | 176 | : null, |
177 | 177 | false |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $this->dom->addChild( |
107 | 107 | $ide, |
108 | 108 | "fimValid", |
109 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
109 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
110 | 110 | false |
111 | 111 | ); |
112 | 112 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $this->dom->addChild( |
182 | 182 | $nova, |
183 | 183 | "fimValid", |
184 | - ! empty($this->std->novavalidade->fimvalid) |
|
184 | + !empty($this->std->novavalidade->fimvalid) |
|
185 | 185 | ? $this->std->novavalidade->fimvalid |
186 | 186 | : null, |
187 | 187 | false |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | } elseif ($this->std->modo == 'ALT') { |
198 | 198 | $node = $this->dom->createElement("alteracao"); |
199 | 199 | $node->appendChild($ide); |
200 | - isset($dados) ? $node->appendChild($dados): null; |
|
201 | - isset($nova) ? $node->appendChild($nova): null; |
|
200 | + isset($dados) ? $node->appendChild($dados) : null; |
|
201 | + isset($nova) ? $node->appendChild($nova) : null; |
|
202 | 202 | } else { |
203 | 203 | $node = $this->dom->createElement("exclusao"); |
204 | 204 | $node->appendChild($ide); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->dom->addChild( |
87 | 87 | $idePeriodo, |
88 | 88 | "fimValid", |
89 | - ! empty($this->std->ideperiodo->fimvalid) ? $this->std->ideperiodo->fimvalid : '', |
|
89 | + !empty($this->std->ideperiodo->fimvalid) ? $this->std->ideperiodo->fimvalid : '', |
|
90 | 90 | false |
91 | 91 | ); |
92 | 92 | //infoCadastro |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $this->dom->addChild( |
226 | 226 | $info, |
227 | 227 | "foneFixo", |
228 | - ! empty($cad->fonefixo) ? $cad->fonefixo : '', |
|
228 | + !empty($cad->fonefixo) ? $cad->fonefixo : '', |
|
229 | 229 | false |
230 | 230 | ); |
231 | 231 | $this->dom->addChild( |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | ); |
243 | 243 | $infoCadastro->appendChild($info); |
244 | 244 | } |
245 | - if (isset($this->std->infoop) && !empty($infoCadastro)) { |
|
246 | - $cad = $this->std->infoop; |
|
245 | + if (isset($this->std->infoop) && !empty($infoCadastro)) { |
|
246 | + $cad = $this->std->infoop; |
|
247 | 247 | $infoOP = $this->dom->createElement("infoOP"); |
248 | 248 | $this->dom->addChild( |
249 | 249 | $infoOP, |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | true |
253 | 253 | ); |
254 | 254 | if (isset($this->std->infoefr)) { |
255 | - $cad = $this->std->infoefr; |
|
255 | + $cad = $this->std->infoefr; |
|
256 | 256 | $infoEFR = $this->dom->createElement("infoEFR"); |
257 | 257 | $this->dom->addChild( |
258 | 258 | $infoEFR, |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $infoOP->appendChild($infoEFR); |
270 | 270 | } |
271 | 271 | if (isset($this->std->infoente)) { |
272 | - $cad = $this->std->infoente; |
|
272 | + $cad = $this->std->infoente; |
|
273 | 273 | $infoEnte = $this->dom->createElement("infoEnte"); |
274 | 274 | $this->dom->addChild( |
275 | 275 | $infoEnte, |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function toStd($xml = null) |
59 | 59 | { |
60 | - if (! empty($xml)) { |
|
60 | + if (!empty($xml)) { |
|
61 | 61 | $this->whichIs($xml); |
62 | 62 | } |
63 | 63 | $sxml = simplexml_load_string($this->node); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function whichIs($xml) |
79 | 79 | { |
80 | - if (! Validator::isXML($xml)) { |
|
80 | + if (!Validator::isXML($xml)) { |
|
81 | 81 | throw new InvalidArgumentException( |
82 | 82 | "O argumento passado não é um XML válido." |
83 | 83 | ); |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $dom->formatOutput = false; |
88 | 88 | $dom->loadXML($xml); |
89 | 89 | foreach ($this->rootTagList as $key) { |
90 | - $node = ! empty($dom->getElementsByTagName($key)->item(0)) |
|
90 | + $node = !empty($dom->getElementsByTagName($key)->item(0)) |
|
91 | 91 | ? $dom->getElementsByTagName($key)->item(0) |
92 | 92 | : ''; |
93 | - if (! empty($node)) { |
|
93 | + if (!empty($node)) { |
|
94 | 94 | $this->node = $dom->saveXML($node); |
95 | 95 | return $key; |
96 | 96 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function toJson($xml = null) |
118 | 118 | { |
119 | - if (! empty($xml)) { |
|
119 | + if (!empty($xml)) { |
|
120 | 120 | $this->toStd($xml); |
121 | 121 | } |
122 | 122 | return $this->json; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function toArray($xml = null) |
131 | 131 | { |
132 | - if (! empty($xml)) { |
|
132 | + if (!empty($xml)) { |
|
133 | 133 | $this->toStd($xml); |
134 | 134 | } |
135 | 135 | return json_decode($this->json, true); |
@@ -123,14 +123,14 @@ |
||
123 | 123 | $orig .= "$p->"; |
124 | 124 | } |
125 | 125 | $exist = false; |
126 | - $test = "\$exist = (!empty(".substr($orig, 0, strlen($orig) - 2).")) ? true : false;"; |
|
126 | + $test = "\$exist = (!empty(" . substr($orig, 0, strlen($orig) - 2) . ")) ? true : false;"; |
|
127 | 127 | eval($test); |
128 | 128 | } |
129 | 129 | $orig .= $name; |
130 | 130 | $resp = null; |
131 | 131 | eval("\$resp = $orig;"); |
132 | 132 | if (!empty($resp) || $resp === 0) { |
133 | - $comm .= $name.'= $resp'; |
|
133 | + $comm .= $name . '= $resp'; |
|
134 | 134 | } else { |
135 | 135 | $comm .= "$name = null"; |
136 | 136 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ); |
120 | 120 | $this->node->appendChild($ideVinculo); |
121 | 121 | $infoAvPrevio = $this->dom->createElement("infoAvPrevio"); |
122 | - if (! empty($this->std->infoavprevio->detavprevio)) { |
|
122 | + if (!empty($this->std->infoavprevio->detavprevio)) { |
|
123 | 123 | $detAvPrevio = $this->dom->createElement("detAvPrevio"); |
124 | 124 | $this->dom->addChild( |
125 | 125 | $detAvPrevio, |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | $this->dom->addChild( |
143 | 143 | $detAvPrevio, |
144 | 144 | "observacao", |
145 | - ! empty($this->std->infoavprevio->detavprevio->observacao) ? |
|
145 | + !empty($this->std->infoavprevio->detavprevio->observacao) ? |
|
146 | 146 | $this->std->infoavprevio->detavprevio->observacao : null, |
147 | 147 | false |
148 | 148 | ); |
149 | 149 | $infoAvPrevio->appendChild($detAvPrevio); |
150 | 150 | } |
151 | - if (! empty($this->std->infoavprevio->cancavprevio)) { |
|
151 | + if (!empty($this->std->infoavprevio->cancavprevio)) { |
|
152 | 152 | $cancAvPrevio = $this->dom->createElement("cancAvPrevio"); |
153 | 153 | $this->dom->addChild( |
154 | 154 | $cancAvPrevio, |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $this->dom->addChild( |
160 | 160 | $cancAvPrevio, |
161 | 161 | "observacao", |
162 | - ! empty($this->std->infoavprevio->cancavprevio->observacao) ? |
|
162 | + !empty($this->std->infoavprevio->cancavprevio->observacao) ? |
|
163 | 163 | $this->std->infoavprevio->cancavprevio->observacao : null, |
164 | 164 | false |
165 | 165 | ); |
@@ -16,7 +16,6 @@ |
||
16 | 16 | */ |
17 | 17 | use NFePHP\Common\Certificate; |
18 | 18 | use NFePHP\eSocial\Common\Factory; |
19 | -use NFePHP\eSocial\Common\FactoryId; |
|
20 | 19 | use NFePHP\eSocial\Common\FactoryInterface; |
21 | 20 | use stdClass; |
22 | 21 |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | |
318 | 318 | /** |
319 | 319 | * Add infosaudecolet to remunPerApur |
320 | - * @param type $node |
|
320 | + * @param \DOMElement $node |
|
321 | 321 | * @param type $std |
322 | 322 | * @return type |
323 | 323 | */ |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | /** |
392 | 392 | * Add infoperant to dmDev |
393 | - * @param type $node |
|
393 | + * @param \DOMElement $node |
|
394 | 394 | * @param type $std |
395 | 395 | * @return type |
396 | 396 | */ |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->dom->addChild( |
106 | 106 | $ide, |
107 | 107 | "fimValid", |
108 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
108 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
109 | 109 | false |
110 | 110 | ); |
111 | 111 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $this->dom->addChild( |
172 | 172 | $nova, |
173 | 173 | "fimValid", |
174 | - ! empty($this->std->novavalidade->fimvalid) |
|
174 | + !empty($this->std->novavalidade->fimvalid) |
|
175 | 175 | ? $this->std->novavalidade->fimvalid |
176 | 176 | : null, |
177 | 177 | false |
@@ -16,7 +16,6 @@ |
||
16 | 16 | */ |
17 | 17 | use NFePHP\Common\Certificate; |
18 | 18 | use NFePHP\eSocial\Common\Factory; |
19 | -use NFePHP\eSocial\Common\FactoryId; |
|
20 | 19 | use NFePHP\eSocial\Common\FactoryInterface; |
21 | 20 | use stdClass; |
22 | 21 |