@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $this->nmRazao = $stdConf->empregador->nmRazao; |
140 | 140 | $this->layoutStr = $this->strLayoutVer($this->layout); |
141 | 141 | $this->certificate = $certificate; |
142 | - if (empty($std) || ! is_object($std)) { |
|
142 | + if (empty($std) || !is_object($std)) { |
|
143 | 143 | throw new \InvalidArgumentException( |
144 | 144 | 'Você deve passar os parâmetros num stdClass.' |
145 | 145 | ); |
@@ -194,15 +194,15 @@ discard block |
||
194 | 194 | //v02_05_00 |
195 | 195 | if (substr($layout, 0, 1) == 'S') { |
196 | 196 | $str = 'v_S_'; |
197 | - $fils = explode('.', substr($layout, 2, strlen($layout)-1)); |
|
197 | + $fils = explode('.', substr($layout, 2, strlen($layout) - 1)); |
|
198 | 198 | foreach ($fils as $fil) { |
199 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
199 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
200 | 200 | } |
201 | 201 | } else { |
202 | 202 | $fils = explode('.', $layout); |
203 | 203 | $str = 'v'; |
204 | 204 | foreach ($fils as $fil) { |
205 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
205 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
206 | 206 | } |
207 | 207 | } |
208 | 208 | return substr($str, 0, -1); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | protected function validInputData($data) |
237 | 237 | { |
238 | - if (! is_file($this->jsonschema)) { |
|
238 | + if (!is_file($this->jsonschema)) { |
|
239 | 239 | return true; |
240 | 240 | } |
241 | 241 | $errors = JsonValidation::validate($data, $this->jsonschema, $this->definitions); |
@@ -244,9 +244,9 @@ discard block |
||
244 | 244 | } |
245 | 245 | $msg = ''; |
246 | 246 | foreach ($errors as $key => $error) { |
247 | - $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']). ";"; |
|
247 | + $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']) . ";"; |
|
248 | 248 | } |
249 | - $msg = substr($msg, 0, strlen($msg)-2); |
|
249 | + $msg = substr($msg, 0, strlen($msg) - 2); |
|
250 | 250 | throw new \Exception($msg); |
251 | 251 | } |
252 | 252 | |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | public function standardizeProperties(stdClass $data) |
396 | 396 | { |
397 | - if (! is_file($this->jsonschema)) { |
|
397 | + if (!is_file($this->jsonschema)) { |
|
398 | 398 | return $data; |
399 | 399 | } |
400 | 400 | $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema)); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | { |
410 | 410 | $xml = $this->dom->saveXML($this->eSocial); |
411 | 411 | $xml = Strings::clearXmlString($xml); |
412 | - if (! empty($this->certificate)) { |
|
412 | + if (!empty($this->certificate)) { |
|
413 | 413 | $xml = Signer::sign( |
414 | 414 | $this->certificate, |
415 | 415 | $xml, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->dom->addChild( |
60 | 60 | $ideEstab, |
61 | 61 | "fimValid", |
62 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
62 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
63 | 63 | false |
64 | 64 | ); |
65 | 65 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | $node->appendChild($ideEstab); |
74 | 74 | |
75 | - if (! empty($this->std->dadosestab)) { |
|
75 | + if (!empty($this->std->dadosestab)) { |
|
76 | 76 | $dadosEstab = $this->dom->createElement("dadosEstab"); |
77 | 77 | $this->dom->addChild( |
78 | 78 | $dadosEstab, |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->std->dadosestab->aliqgilrat->aliqrat, |
88 | 88 | true |
89 | 89 | ); |
90 | - $fap = ! empty($this->std->dadosestab->aliqgilrat->fap) ? $this->std->dadosestab->aliqgilrat->fap : null; |
|
90 | + $fap = !empty($this->std->dadosestab->aliqgilrat->fap) ? $this->std->dadosestab->aliqgilrat->fap : null; |
|
91 | 91 | if ($fap) { |
92 | 92 | $fap = number_format($fap, 4, '.', ''); |
93 | 93 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $fap, |
98 | 98 | false |
99 | 99 | ); |
100 | - $aliqrata = ! empty($this->std->dadosestab->aliqgilrat->aliqratajust) |
|
100 | + $aliqrata = !empty($this->std->dadosestab->aliqgilrat->aliqratajust) |
|
101 | 101 | ? $this->std->dadosestab->aliqgilrat->aliqratajust |
102 | 102 | : null; |
103 | 103 | if ($aliqrata) { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $aliqrata, |
110 | 110 | false |
111 | 111 | ); |
112 | - if (! empty($this->std->dadosestab->aliqgilrat->procadmjudrat)) { |
|
112 | + if (!empty($this->std->dadosestab->aliqgilrat->procadmjudrat)) { |
|
113 | 113 | $procAdmJudRat = $this->dom->createElement("procAdmJudRat"); |
114 | 114 | $this->dom->addChild( |
115 | 115 | $procAdmJudRat, |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ); |
132 | 132 | $aliqGilrat->appendChild($procAdmJudRat); |
133 | 133 | } |
134 | - if (! empty($this->std->dadosestab->aliqgilrat->procadmjudfap)) { |
|
134 | + if (!empty($this->std->dadosestab->aliqgilrat->procadmjudfap)) { |
|
135 | 135 | $procAdmJudFap = $this->dom->createElement("procAdmJudFap"); |
136 | 136 | $this->dom->addChild( |
137 | 137 | $procAdmJudFap, |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | $dadosEstab->appendChild($aliqGilrat); |
157 | 157 | |
158 | - if (! empty($this->std->dadosestab->infocaepf)) { |
|
158 | + if (!empty($this->std->dadosestab->infocaepf)) { |
|
159 | 159 | $infoCaepf = $this->dom->createElement("infoCaepf"); |
160 | 160 | $this->dom->addChild( |
161 | 161 | $infoCaepf, |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $dadosEstab->appendChild($infoCaepf); |
167 | 167 | } |
168 | 168 | |
169 | - if (! empty($this->std->dadosestab->infoobra)) { |
|
169 | + if (!empty($this->std->dadosestab->infoobra)) { |
|
170 | 170 | $infoObra = $this->dom->createElement("infoObra"); |
171 | 171 | $this->dom->addChild( |
172 | 172 | $infoObra, |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $this->std->dadosestab->infotrab->regpt, |
185 | 185 | true |
186 | 186 | ); |
187 | - if (! empty($this->std->dadosestab->infoapr)) { |
|
187 | + if (!empty($this->std->dadosestab->infoapr)) { |
|
188 | 188 | $infoApr = $this->dom->createElement("infoApr"); |
189 | 189 | $this->dom->addChild( |
190 | 190 | $infoApr, |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $this->dom->addChild( |
196 | 196 | $infoApr, |
197 | 197 | "nrProcJud", |
198 | - ! empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) |
|
198 | + !empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) |
|
199 | 199 | ? $this->std->dadosestab->infotrab->infoapr->nrprocjud |
200 | 200 | : null, |
201 | 201 | false |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | $this->dom->addChild( |
204 | 204 | $infoApr, |
205 | 205 | "contEntEd", |
206 | - ! empty($this->std->dadosestab->infotrab->infoapr->contented) |
|
206 | + !empty($this->std->dadosestab->infotrab->infoapr->contented) |
|
207 | 207 | ? $this->std->dadosestab->infotrab->infoapr->contented |
208 | 208 | : null, |
209 | 209 | false |
210 | 210 | ); |
211 | 211 | |
212 | - if (! empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { |
|
212 | + if (!empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { |
|
213 | 213 | foreach ($this->std->dadosestab->infotrab->infoapr->infoenteduc as $edu) { |
214 | 214 | $infoEntEduc = $this->dom->createElement("infoEntEduc"); |
215 | 215 | $this->dom->addChild( |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | $infoTrab->appendChild($infoApr); |
226 | 226 | } |
227 | - if (! empty($this->std->dadosestab->infotrab->infopdc)) { |
|
227 | + if (!empty($this->std->dadosestab->infotrab->infopdc)) { |
|
228 | 228 | $infoPCD = $this->dom->createElement("infoPCD"); |
229 | 229 | $this->dom->addChild( |
230 | 230 | $infoPCD, |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $this->dom->addChild( |
236 | 236 | $infoPCD, |
237 | 237 | "nrProcJud", |
238 | - ! empty($this->std->dadosestab->infotrab->infopdc->nrprocjud) |
|
238 | + !empty($this->std->dadosestab->infotrab->infopdc->nrprocjud) |
|
239 | 239 | ? $this->std->dadosestab->infotrab->infopdc->nrprocjud |
240 | 240 | : null, |
241 | 241 | false |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $node->appendChild($dadosEstab); |
247 | 247 | } |
248 | 248 | |
249 | - if (! empty($this->std->novavalidade) && $this->std->modo == 'ALT') { |
|
249 | + if (!empty($this->std->novavalidade) && $this->std->modo == 'ALT') { |
|
250 | 250 | $newVal = $this->std->novavalidade; |
251 | 251 | $novaValidade = $this->dom->createElement("novaValidade"); |
252 | 252 | $this->dom->addChild( |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $this->dom->addChild( |
259 | 259 | $novaValidade, |
260 | 260 | "fimValid", |
261 | - ! empty($newVal->fimvalid) ? $newVal->fimvalid : null, |
|
261 | + !empty($newVal->fimvalid) ? $newVal->fimvalid : null, |
|
262 | 262 | false |
263 | 263 | ); |
264 | 264 | $node->appendChild($novaValidade); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $this->dom->addChild( |
354 | 354 | $aliqGilrat, |
355 | 355 | "aliqRat", |
356 | - ! empty($this->std->dadosestab->aliqgilrat->aliqrat) |
|
356 | + !empty($this->std->dadosestab->aliqgilrat->aliqrat) |
|
357 | 357 | ? $this->std->dadosestab->aliqgilrat->aliqrat |
358 | 358 | : null, |
359 | 359 | false |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | ); |
426 | 426 | $dadosEstab->appendChild($infoCaepf); |
427 | 427 | } |
428 | - if (! empty($this->std->dadosestab->infoobra)) { |
|
428 | + if (!empty($this->std->dadosestab->infoobra)) { |
|
429 | 429 | $infoObra = $this->dom->createElement("infoObra"); |
430 | 430 | $this->dom->addChild( |
431 | 431 | $infoObra, |
@@ -442,12 +442,12 @@ discard block |
||
442 | 442 | $this->dom->addChild( |
443 | 443 | $infoApr, |
444 | 444 | "nrProcJud", |
445 | - ! empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) |
|
445 | + !empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) |
|
446 | 446 | ? $this->std->dadosestab->infotrab->infoapr->nrprocjud |
447 | 447 | : null, |
448 | 448 | false |
449 | 449 | ); |
450 | - if (! empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { |
|
450 | + if (!empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { |
|
451 | 451 | foreach ($this->std->dadosestab->infotrab->infoapr->infoenteduc as $edu) { |
452 | 452 | $infoEntEduc = $this->dom->createElement("infoEntEduc"); |
453 | 453 | $this->dom->addChild( |