@@ -285,8 +285,7 @@ |
||
285 | 285 | $this->dom->addChild( |
286 | 286 | $instEnsino, |
287 | 287 | "bairro", |
288 | - !empty($this->std->estagiario->instituicao->bairro) ? $this->std->estagiario->instituicao->bairro : |
|
289 | - null, |
|
288 | + !empty($this->std->estagiario->instituicao->bairro) ? $this->std->estagiario->instituicao->bairro : null, |
|
290 | 289 | false |
291 | 290 | ); |
292 | 291 |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $this->dom->addChild( |
91 | 91 | $idePeriodo, |
92 | 92 | "fimValid", |
93 | - ! empty($this->std->ideperiodo->fimvalid) ? $this->std->ideperiodo->fimvalid : '', |
|
93 | + !empty($this->std->ideperiodo->fimvalid) ? $this->std->ideperiodo->fimvalid : '', |
|
94 | 94 | false |
95 | 95 | ); |
96 | 96 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $this->dom->addChild( |
233 | 233 | $info, |
234 | 234 | "foneFixo", |
235 | - ! empty($cad->foneFixo) ? $cad->foneFixo : '', |
|
235 | + !empty($cad->foneFixo) ? $cad->foneFixo : '', |
|
236 | 236 | false |
237 | 237 | ); |
238 | 238 | $this->dom->addChild( |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | $infoCadastro->appendChild($info); |
251 | 251 | } |
252 | 252 | |
253 | - if (isset($this->std->infoop) && !empty($infoCadastro)) { |
|
254 | - $cad = $this->std->infoop; |
|
253 | + if (isset($this->std->infoop) && !empty($infoCadastro)) { |
|
254 | + $cad = $this->std->infoop; |
|
255 | 255 | $infoOP = $this->dom->createElement("infoOP"); |
256 | 256 | $this->dom->addChild( |
257 | 257 | $infoOP, |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | true |
261 | 261 | ); |
262 | 262 | if (isset($this->std->infoefr)) { |
263 | - $cad = $this->std->infoefr; |
|
263 | + $cad = $this->std->infoefr; |
|
264 | 264 | $infoEFR = $this->dom->createElement("infoEFR"); |
265 | 265 | $this->dom->addChild( |
266 | 266 | $infoEFR, |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $infoOP->appendChild($infoEFR); |
278 | 278 | } |
279 | 279 | if (isset($this->std->infoente)) { |
280 | - $cad = $this->std->infoente; |
|
280 | + $cad = $this->std->infoente; |
|
281 | 281 | $infoEnte = $this->dom->createElement("infoEnte"); |
282 | 282 | $this->dom->addChild( |
283 | 283 | $infoEnte, |
@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\Common\Certificate; |
19 | 19 | use NFePHP\eSocial\Common\Factory; |
20 | -use NFePHP\eSocial\Common\FactoryId; |
|
21 | 20 | use NFePHP\eSocial\Common\FactoryInterface; |
22 | 21 | use stdClass; |
23 | 22 |
@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\Common\Certificate; |
19 | 19 | use NFePHP\eSocial\Common\Factory; |
20 | -use NFePHP\eSocial\Common\FactoryId; |
|
21 | 20 | use NFePHP\eSocial\Common\FactoryInterface; |
22 | 21 | use stdClass; |
23 | 22 |
@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\Common\Certificate; |
19 | 19 | use NFePHP\eSocial\Common\Factory; |
20 | -use NFePHP\eSocial\Common\FactoryId; |
|
21 | 20 | use NFePHP\eSocial\Common\FactoryInterface; |
22 | 21 | use stdClass; |
23 | 22 |
@@ -537,8 +537,8 @@ |
||
537 | 537 | true |
538 | 538 | ); |
539 | 539 | foreach ($pgant->infopgtoant as $ipa) { |
540 | - //echo "<pre>"; |
|
541 | - //print_r($ipa); |
|
540 | + //echo "<pre>"; |
|
541 | + //print_r($ipa); |
|
542 | 542 | //echo "</pre>"; |
543 | 543 | //die; |
544 | 544 | $infoPgtoAnt = $this->dom->createElement("infoPgtoAnt"); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->dom->addChild( |
79 | 79 | $ideEvento, |
80 | 80 | "nrRecibo", |
81 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
81 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
82 | 82 | false |
83 | 83 | ); |
84 | 84 | $this->dom->addChild( |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | ); |
189 | 189 | if (!empty($pgtofl->retpgtotot)) { |
190 | 190 | foreach ($pgtofl->retpgtotot as $pg) { |
191 | - $retPgtoTot = $this->dom->createElement("retPgtoTot"); |
|
191 | + $retPgtoTot = $this->dom->createElement("retPgtoTot"); |
|
192 | 192 | $this->dom->addChild( |
193 | 193 | $retPgtoTot, |
194 | 194 | "codRubr", |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | //set properties from config |
121 | 121 | $stdConf = json_decode($config); |
122 | 122 | $this->date = new DateTime(); |
123 | - if (! empty($date)) { |
|
123 | + if (!empty($date)) { |
|
124 | 124 | $this->date = new DateTime($date); |
125 | 125 | } |
126 | 126 | $this->tpAmb = $stdConf->tpAmb; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->nmRazao = $stdConf->empregador->nmRazao; |
132 | 132 | $this->layoutStr = $this->strLayoutVer($this->layout); |
133 | 133 | $this->certificate = $certificate; |
134 | - if (empty($std) || ! is_object($std)) { |
|
134 | + if (empty($std) || !is_object($std)) { |
|
135 | 135 | throw new \InvalidArgumentException( |
136 | 136 | 'Você deve passar os parâmetros num stdClass.' |
137 | 137 | ); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | .$this->evtName |
143 | 143 | .".schema" |
144 | 144 | ); |
145 | - $this->schema = realpath( |
|
145 | + $this->schema = realpath( |
|
146 | 146 | __DIR__ |
147 | 147 | ."/../../schemes/$this->layoutStr/" |
148 | 148 | .$this->evtName |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $fils = explode('.', $layout); |
170 | 170 | $str = 'v'; |
171 | 171 | foreach ($fils as $fil) { |
172 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
172 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
173 | 173 | } |
174 | 174 | return substr($str, 0, -1); |
175 | 175 | } |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | */ |
202 | 202 | protected function validInputData($data) |
203 | 203 | { |
204 | - if (! is_file($this->jsonschema)) { |
|
204 | + if (!is_file($this->jsonschema)) { |
|
205 | 205 | return true; |
206 | 206 | } |
207 | 207 | $validator = new JsonValid(); |
208 | - $validator->check($data, (object) ['$ref' => 'file://'.$this->jsonschema]); |
|
209 | - if (! $validator->isValid()) { |
|
208 | + $validator->check($data, (object) ['$ref' => 'file://' . $this->jsonschema]); |
|
209 | + if (!$validator->isValid()) { |
|
210 | 210 | $msg = "JSON does not validate. Violations:\n"; |
211 | 211 | foreach ($validator->getErrors() as $error) { |
212 | 212 | $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']); |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | */ |
365 | 365 | public function standardizeProperties(stdClass $data) |
366 | 366 | { |
367 | - if (! is_file($this->jsonschema)) { |
|
367 | + if (!is_file($this->jsonschema)) { |
|
368 | 368 | return $data; |
369 | 369 | } |
370 | 370 | $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema)); |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | { |
381 | 381 | $xml = $this->dom->saveXML($this->eSocial); |
382 | 382 | $xml = Strings::clearXmlString($xml); |
383 | - if (! empty($this->certificate)) { |
|
383 | + if (!empty($this->certificate)) { |
|
384 | 384 | $xml = Signer::sign( |
385 | 385 | $this->certificate, |
386 | 386 | $xml, |