| @@ -22,7 +22,7 @@ | ||
| 22 | 22 |  { | 
| 23 | 23 | public static function info($code) | 
| 24 | 24 |      { | 
| 25 | - $codes = (array) json_decode(file_get_contents(__DIR__.'/httpcodes.json'), true); | |
| 25 | + $codes = (array) json_decode(file_get_contents(__DIR__ . '/httpcodes.json'), true); | |
| 26 | 26 |          if (array_key_exists($code, $codes)) { | 
| 27 | 27 | return $codes[$code]; | 
| 28 | 28 | } | 
| @@ -348,7 +348,7 @@ | ||
| 348 | 348 | * | 
| 349 | 349 | * @param int $protocol | 
| 350 | 350 | * | 
| 351 | - * @return type Description | |
| 351 | + * @return integer Description | |
| 352 | 352 | */ | 
| 353 | 353 | public function protocol($protocol = self::SSL_DEFAULT) | 
| 354 | 354 |      { | 
| @@ -186,7 +186,7 @@ discard block | ||
| 186 | 186 |      ) { | 
| 187 | 187 | $this->logger = $logger; | 
| 188 | 188 | $this->certificate = $this->checkCertValidity($certificate); | 
| 189 | - $this->setTemporaryFolder(sys_get_temp_dir().'/sped/'); | |
| 189 | + $this->setTemporaryFolder(sys_get_temp_dir() . '/sped/'); | |
| 190 | 190 | } | 
| 191 | 191 | |
| 192 | 192 | /** | 
| @@ -202,7 +202,7 @@ discard block | ||
| 202 | 202 |          if ($this->disableCertValidation) { | 
| 203 | 203 | return $certificate; | 
| 204 | 204 | } | 
| 205 | -        if (! empty($certificate)) { | |
| 205 | +        if (!empty($certificate)) { | |
| 206 | 206 |              if ($certificate->isExpired()) { | 
| 207 | 207 | throw new RuntimeException( | 
| 208 | 208 | 'The validity of the certificate has expired.' | 
| @@ -261,7 +261,7 @@ discard block | ||
| 261 | 261 | //utilize a API. Outra solução para remover arquivos "perdidos" pode ser | 
| 262 | 262 | //encontrada oportunamente. | 
| 263 | 263 | $dt = new \DateTime(); | 
| 264 | -        $tint         = new \DateInterval("PT".$this->waitingTime."M"); | |
| 264 | +        $tint         = new \DateInterval("PT" . $this->waitingTime . "M"); | |
| 265 | 265 | $tint->invert = true; | 
| 266 | 266 | $tsLimit = $dt->add($tint)->getTimestamp(); | 
| 267 | 267 |          foreach ($contents as $item) { | 
| @@ -431,15 +431,15 @@ discard block | ||
| 431 | 431 | */ | 
| 432 | 432 | public function saveTemporarilyKeyFiles() | 
| 433 | 433 |      { | 
| 434 | -        if (! is_object($this->certificate)) { | |
| 434 | +        if (!is_object($this->certificate)) { | |
| 435 | 435 | throw new RuntimeException( | 
| 436 | 436 | 'Certificate not found.' | 
| 437 | 437 | ); | 
| 438 | 438 | } | 
| 439 | - $this->certsdir = $this->certificate->getCnpj().'/certs/'; | |
| 440 | - $this->prifile = $this->certsdir.Strings::randomString(10).'.pem'; | |
| 441 | - $this->pubfile = $this->certsdir.Strings::randomString(10).'.pem'; | |
| 442 | - $this->certfile = $this->certsdir.Strings::randomString(10).'.pem'; | |
| 439 | + $this->certsdir = $this->certificate->getCnpj() . '/certs/'; | |
| 440 | + $this->prifile = $this->certsdir . Strings::randomString(10) . '.pem'; | |
| 441 | + $this->pubfile = $this->certsdir . Strings::randomString(10) . '.pem'; | |
| 442 | + $this->certfile = $this->certsdir . Strings::randomString(10) . '.pem'; | |
| 443 | 443 | $ret = true; | 
| 444 | 444 | $private = $this->certificate->privateKey; | 
| 445 | 445 |          if ($this->encriptPrivateKey) { | 
| @@ -464,9 +464,9 @@ discard block | ||
| 464 | 464 | ); | 
| 465 | 465 | $ret &= $this->filesystem->put( | 
| 466 | 466 | $this->certfile, | 
| 467 | -            $private."{$this->certificate}" | |
| 467 | +            $private . "{$this->certificate}" | |
| 468 | 468 | ); | 
| 469 | -        if (! $ret) { | |
| 469 | +        if (!$ret) { | |
| 470 | 470 | throw new RuntimeException( | 
| 471 | 471 | 'Unable to save temporary key files in folder.' | 
| 472 | 472 | ); | 
| @@ -484,19 +484,19 @@ discard block | ||
| 484 | 484 | */ | 
| 485 | 485 | public function saveDebugFiles($operation, $request, $response) | 
| 486 | 486 |      { | 
| 487 | -        if (! $this->debugmode) { | |
| 487 | +        if (!$this->debugmode) { | |
| 488 | 488 | return; | 
| 489 | 489 | } | 
| 490 | - $this->debugdir = $this->certificate->getCnpj().'/debug/'; | |
| 490 | + $this->debugdir = $this->certificate->getCnpj() . '/debug/'; | |
| 491 | 491 |          $now = \DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', '')); | 
| 492 | 492 |          $time = substr($now->format("ymdHisu"), 0, 16); | 
| 493 | 493 |          try { | 
| 494 | 494 | $this->filesystem->put( | 
| 495 | - $this->debugdir.$time."_".$operation."_sol.txt", | |
| 495 | + $this->debugdir . $time . "_" . $operation . "_sol.txt", | |
| 496 | 496 | $request | 
| 497 | 497 | ); | 
| 498 | 498 | $this->filesystem->put( | 
| 499 | - $this->debugdir.$time."_".$operation."_res.txt", | |
| 499 | + $this->debugdir . $time . "_" . $operation . "_res.txt", | |
| 500 | 500 | $response | 
| 501 | 501 | ); | 
| 502 | 502 |          } catch (Exception $e) { | 
| @@ -526,10 +526,10 @@ discard block | ||
| 526 | 526 |          foreach ($namespaces as $key => $value) { | 
| 527 | 527 | $envelope .= " $key=\"$value\""; | 
| 528 | 528 | } | 
| 529 | - $envelope .= ">"; | |
| 529 | + $envelope .= ">"; | |
| 530 | 530 | $soapheader = "<$prefix:Header/>"; | 
| 531 | -        if (! empty($header)) { | |
| 532 | - $ns = ! empty($header->namespace) ? $header->namespace : ''; | |
| 531 | +        if (!empty($header)) { | |
| 532 | + $ns = !empty($header->namespace) ? $header->namespace : ''; | |
| 533 | 533 | $name = $header->name; | 
| 534 | 534 | $soapheader = "<$prefix:Header>"; | 
| 535 | 535 | $soapheader .= "<$name xmlns=\"$ns\">"; | 
| @@ -39,7 +39,7 @@ | ||
| 39 | 39 | * @param string $url | 
| 40 | 40 | * @param string $action | 
| 41 | 41 | * @param string $envelope | 
| 42 | - * @param array $parameters | |
| 42 | + * @param string[] $parameters | |
| 43 | 43 | * | 
| 44 | 44 | * @return string | 
| 45 | 45 | * @throws \NFePHP\Common\Exception\SoapException | 
| @@ -66,20 +66,20 @@ discard block | ||
| 66 | 66 | curl_setopt($oCurl, CURLOPT_HEADER, 1); | 
| 67 | 67 | curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, 0); | 
| 68 | 68 | curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, 0); | 
| 69 | -            if (! $this->disablesec) { | |
| 69 | +            if (!$this->disablesec) { | |
| 70 | 70 | curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, 2); | 
| 71 | 71 |                  if (is_file($this->casefaz)) { | 
| 72 | 72 | curl_setopt($oCurl, CURLOPT_CAINFO, $this->casefaz); | 
| 73 | 73 | } | 
| 74 | 74 | } | 
| 75 | 75 | curl_setopt($oCurl, CURLOPT_SSLVERSION, $this->soapprotocol); | 
| 76 | - curl_setopt($oCurl, CURLOPT_SSLCERT, $this->tempdir.$this->certfile); | |
| 77 | - curl_setopt($oCurl, CURLOPT_SSLKEY, $this->tempdir.$this->prifile); | |
| 78 | -            if (! empty($this->temppass)) { | |
| 76 | + curl_setopt($oCurl, CURLOPT_SSLCERT, $this->tempdir . $this->certfile); | |
| 77 | + curl_setopt($oCurl, CURLOPT_SSLKEY, $this->tempdir . $this->prifile); | |
| 78 | +            if (!empty($this->temppass)) { | |
| 79 | 79 | curl_setopt($oCurl, CURLOPT_KEYPASSWD, $this->temppass); | 
| 80 | 80 | } | 
| 81 | 81 | curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, true); | 
| 82 | -            if (! empty($envelope)) { | |
| 82 | +            if (!empty($envelope)) { | |
| 83 | 83 | curl_setopt($oCurl, CURLOPT_POST, true); | 
| 84 | 84 | curl_setopt($oCurl, CURLOPT_POSTFIELDS, $envelope); | 
| 85 | 85 | curl_setopt($oCurl, CURLOPT_HTTPHEADER, $parameters); | 
| @@ -97,14 +97,14 @@ discard block | ||
| 97 | 97 | $this->responseBody = trim(substr($response, $headsize)); | 
| 98 | 98 | $this->saveDebugFiles( | 
| 99 | 99 | $operation, | 
| 100 | - $this->requestHead."\n".$this->requestBody, | |
| 101 | - $this->responseHead."\n".$this->responseBody | |
| 100 | + $this->requestHead . "\n" . $this->requestBody, | |
| 101 | + $this->responseHead . "\n" . $this->responseBody | |
| 102 | 102 | ); | 
| 103 | 103 |          } catch (\Exception $e) { | 
| 104 | 104 | throw SoapException::unableToLoadCurl($e->getMessage()); | 
| 105 | 105 | } | 
| 106 | 106 |          if ($this->soaperror != '') { | 
| 107 | - throw SoapException::soapFault($this->soaperror." [$url]"); | |
| 107 | + throw SoapException::soapFault($this->soaperror . " [$url]"); | |
| 108 | 108 | } | 
| 109 | 109 |          if ($httpcode != 200) { | 
| 110 | 110 | throw SoapException::soapFault( | 
| @@ -126,9 +126,9 @@ discard block | ||
| 126 | 126 |          if ($this->proxyIP != '') { | 
| 127 | 127 | curl_setopt($oCurl, CURLOPT_HTTPPROXYTUNNEL, 1); | 
| 128 | 128 | curl_setopt($oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | 
| 129 | - curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP.':'.$this->proxyPort); | |
| 129 | + curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP . ':' . $this->proxyPort); | |
| 130 | 130 |              if ($this->proxyUser != '') { | 
| 131 | - curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser.':'.$this->proxyPass); | |
| 131 | + curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser . ':' . $this->proxyPass); | |
| 132 | 132 | curl_setopt($oCurl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); | 
| 133 | 133 | } | 
| 134 | 134 | } | 
| @@ -151,10 +151,10 @@ discard block | ||
| 151 | 151 | $dom->preserveWhiteSpace = false; | 
| 152 | 152 | $dom->loadXML($body); | 
| 153 | 153 | $faultstring = ''; | 
| 154 | -        $nodefault   = ! empty($dom->getElementsByTagName('faultstring')->item(0)) | |
| 154 | +        $nodefault   = !empty($dom->getElementsByTagName('faultstring')->item(0)) | |
| 155 | 155 |              ? $dom->getElementsByTagName('faultstring')->item(0) | 
| 156 | 156 | : ''; | 
| 157 | -        if (! empty($nodefault)) { | |
| 157 | +        if (!empty($nodefault)) { | |
| 158 | 158 | $faultstring = $nodefault->nodeValue; | 
| 159 | 159 | } | 
| 160 | 160 | |
| @@ -172,7 +172,7 @@ discard block | ||
| 172 | 172 |      { | 
| 173 | 173 | $response = ''; | 
| 174 | 174 | $this->saveTemporarilyKeyFiles(); | 
| 175 | - $url .= '?WSDL'; | |
| 175 | + $url .= '?WSDL'; | |
| 176 | 176 | $oCurl = curl_init(); | 
| 177 | 177 | curl_setopt($oCurl, CURLOPT_URL, $url); | 
| 178 | 178 | curl_setopt($oCurl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); | 
| @@ -181,9 +181,9 @@ discard block | ||
| 181 | 181 | curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, 0); | 
| 182 | 182 | curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, 0); | 
| 183 | 183 | curl_setopt($oCurl, CURLOPT_SSLVERSION, $this->soapprotocol); | 
| 184 | - curl_setopt($oCurl, CURLOPT_SSLCERT, $this->tempdir.$this->certfile); | |
| 185 | - curl_setopt($oCurl, CURLOPT_SSLKEY, $this->tempdir.$this->prifile); | |
| 186 | -        if (! empty($this->temppass)) { | |
| 184 | + curl_setopt($oCurl, CURLOPT_SSLCERT, $this->tempdir . $this->certfile); | |
| 185 | + curl_setopt($oCurl, CURLOPT_SSLKEY, $this->tempdir . $this->prifile); | |
| 186 | +        if (!empty($this->temppass)) { | |
| 187 | 187 | curl_setopt($oCurl, CURLOPT_KEYPASSWD, $this->temppass); | 
| 188 | 188 | } | 
| 189 | 189 | curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, true); | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | */ | 
| 66 | 66 | protected function toNode() | 
| 67 | 67 |      { | 
| 68 | - $evtid = FactoryId::build( | |
| 68 | + $evtid = FactoryId::build( | |
| 69 | 69 | $this->tpInsc, | 
| 70 | 70 | $this->nrInsc, | 
| 71 | 71 | $this->date, | 
| @@ -87,7 +87,7 @@ discard block | ||
| 87 | 87 | $this->dom->addChild( | 
| 88 | 88 | $ideEvento, | 
| 89 | 89 | "nrRecibo", | 
| 90 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, | |
| 90 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, | |
| 91 | 91 | false | 
| 92 | 92 | ); | 
| 93 | 93 | $this->dom->addChild( | 
| @@ -171,14 +171,14 @@ discard block | ||
| 171 | 171 | $this->dom->addChild( | 
| 172 | 172 | $detAvPrevio, | 
| 173 | 173 | "observacao", | 
| 174 | - ! empty($this->std->observacao) ? $this->std->observacao : null, | |
| 174 | + !empty($this->std->observacao) ? $this->std->observacao : null, | |
| 175 | 175 | false | 
| 176 | 176 | ); | 
| 177 | 177 | |
| 178 | 178 | $infoAvPrevio->appendChild($detAvPrevio); | 
| 179 | 179 | $evtAvPrevio->appendChild($infoAvPrevio); | 
| 180 | 180 | |
| 181 | -        if (! empty($this->std->cancavprevio)) { | |
| 181 | +        if (!empty($this->std->cancavprevio)) { | |
| 182 | 182 |              $cancAvPrevio = $this->dom->createElement("cancAvPrevio"); | 
| 183 | 183 | $this->dom->addChild( | 
| 184 | 184 | $cancAvPrevio, | 
| @@ -189,7 +189,7 @@ discard block | ||
| 189 | 189 | $this->dom->addChild( | 
| 190 | 190 | $cancAvPrevio, | 
| 191 | 191 | "observacao", | 
| 192 | - ! empty($this->std->cancavprevio->observacao) ? $this->std->cancavprevio->observacao : null, | |
| 192 | + !empty($this->std->cancavprevio->observacao) ? $this->std->cancavprevio->observacao : null, | |
| 193 | 193 | false | 
| 194 | 194 | ); | 
| 195 | 195 | $this->dom->addChild( | 
| @@ -170,14 +170,14 @@ discard block | ||
| 170 | 170 | $this->dom->addChild( | 
| 171 | 171 | $exame, | 
| 172 | 172 | "procRealizado", | 
| 173 | - ! empty($exam->procrealizado) ? $exam->procrealizado : null, | |
| 173 | + !empty($exam->procrealizado) ? $exam->procrealizado : null, | |
| 174 | 174 | false | 
| 175 | 175 | ); | 
| 176 | 176 | |
| 177 | 177 | $this->dom->addChild( | 
| 178 | 178 | $exame, | 
| 179 | 179 | "obsProc", | 
| 180 | - ! empty($exam->obsproc) ? $exam->obsproc : null, | |
| 180 | + !empty($exam->obsproc) ? $exam->obsproc : null, | |
| 181 | 181 | false | 
| 182 | 182 | ); | 
| 183 | 183 | |
| @@ -205,14 +205,14 @@ discard block | ||
| 205 | 205 | $this->dom->addChild( | 
| 206 | 206 | $exame, | 
| 207 | 207 | "dtFimMonit", | 
| 208 | - ! empty($exam->dtfimmonit) ? $exam->dtfimmonit : null, | |
| 208 | + !empty($exam->dtfimmonit) ? $exam->dtfimmonit : null, | |
| 209 | 209 | false | 
| 210 | 210 | ); | 
| 211 | 211 | |
| 212 | 212 | $this->dom->addChild( | 
| 213 | 213 | $exame, | 
| 214 | 214 | "indResult", | 
| 215 | - ! empty($exam->indresult) ? $exam->indresult : null, | |
| 215 | + !empty($exam->indresult) ? $exam->indresult : null, | |
| 216 | 216 | false | 
| 217 | 217 | ); | 
| 218 | 218 | |
| @@ -239,7 +239,7 @@ discard block | ||
| 239 | 239 | $this->dom->addChild( | 
| 240 | 240 | $respMonit, | 
| 241 | 241 | "ufConsClasse", | 
| 242 | - ! empty($this->std->respmonit->ufconsclasse) ? $this->std->respmonit->ufconsclasse : null, | |
| 242 | + !empty($this->std->respmonit->ufconsclasse) ? $this->std->respmonit->ufconsclasse : null, | |
| 243 | 243 | false | 
| 244 | 244 | ); | 
| 245 | 245 | |
| @@ -250,7 +250,7 @@ discard block | ||
| 250 | 250 | $this->dom->addChild( | 
| 251 | 251 | $ideServSaude, | 
| 252 | 252 | "codCNES", | 
| 253 | - ! empty($this->std->ideservsaude->codcnes) ? $this->std->ideservsaude->codcnes : null, | |
| 253 | + !empty($this->std->ideservsaude->codcnes) ? $this->std->ideservsaude->codcnes : null, | |
| 254 | 254 | false | 
| 255 | 255 | ); | 
| 256 | 256 | |
| @@ -264,7 +264,7 @@ discard block | ||
| 264 | 264 | $this->dom->addChild( | 
| 265 | 265 | $ideServSaude, | 
| 266 | 266 | "email", | 
| 267 | - ! empty($this->std->ideservsaude->email) ? $this->std->ideservsaude->email : null, | |
| 267 | + !empty($this->std->ideservsaude->email) ? $this->std->ideservsaude->email : null, | |
| 268 | 268 | false | 
| 269 | 269 | ); | 
| 270 | 270 | |
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 | $this->dom->addChild( | 
| 72 | 72 | $ideEvento, | 
| 73 | 73 | "nrRecArqBase", | 
| 74 | - ! empty($this->std->nrrecarqbase) ? $this->std->nrrecarqbase : null, | |
| 74 | + !empty($this->std->nrrecarqbase) ? $this->std->nrrecarqbase : null, | |
| 75 | 75 | false | 
| 76 | 76 | ); | 
| 77 | 77 | $this->dom->addChild( | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | ); | 
| 92 | 92 | $this->node->appendChild($ideTrabalhador); | 
| 93 | 93 | |
| 94 | -        if (! empty($this->std->vrdeddep)) { | |
| 94 | +        if (!empty($this->std->vrdeddep)) { | |
| 95 | 95 |              $infoDep = $this->dom->createElement("infoDep"); | 
| 96 | 96 | $this->dom->addChild( | 
| 97 | 97 | $infoDep, | 
| @@ -107,7 +107,7 @@ discard block | ||
| 107 | 107 | $this->dom->addChild( | 
| 108 | 108 | $infoIrrf, | 
| 109 | 109 | "codCateg", | 
| 110 | - ! empty($nIrrf->codcateg) ? $nIrrf->codcateg : null, | |
| 110 | + !empty($nIrrf->codcateg) ? $nIrrf->codcateg : null, | |
| 111 | 111 | false | 
| 112 | 112 | ); | 
| 113 | 113 | $this->dom->addChild( | 
| @@ -169,7 +169,7 @@ discard block | ||
| 169 | 169 | $this->dom->addChild( | 
| 170 | 170 | $idePais, | 
| 171 | 171 | "nifBenef", | 
| 172 | - ! empty($nIrrf->idepgtoext->nifbenef) ? $nIrrf->idepgtoext->nifbenef : null, | |
| 172 | + !empty($nIrrf->idepgtoext->nifbenef) ? $nIrrf->idepgtoext->nifbenef : null, | |
| 173 | 173 | false | 
| 174 | 174 | ); | 
| 175 | 175 | $idePgtoExt->appendChild($idePais); | 
| @@ -184,19 +184,19 @@ discard block | ||
| 184 | 184 | $this->dom->addChild( | 
| 185 | 185 | $endExt, | 
| 186 | 186 | "nrLograd", | 
| 187 | - ! empty($nIrrf->idepgtoext->nrlograd) ? $nIrrf->idepgtoext->nrlograd : null, | |
| 187 | + !empty($nIrrf->idepgtoext->nrlograd) ? $nIrrf->idepgtoext->nrlograd : null, | |
| 188 | 188 | false | 
| 189 | 189 | ); | 
| 190 | 190 | $this->dom->addChild( | 
| 191 | 191 | $endExt, | 
| 192 | 192 | "complem", | 
| 193 | - ! empty($nIrrf->idepgtoext->complem) ? $nIrrf->idepgtoext->complem : null, | |
| 193 | + !empty($nIrrf->idepgtoext->complem) ? $nIrrf->idepgtoext->complem : null, | |
| 194 | 194 | false | 
| 195 | 195 | ); | 
| 196 | 196 | $this->dom->addChild( | 
| 197 | 197 | $endExt, | 
| 198 | 198 | "bairro", | 
| 199 | - ! empty($nIrrf->idepgtoext->bairro) ? $nIrrf->idepgtoext->bairro : null, | |
| 199 | + !empty($nIrrf->idepgtoext->bairro) ? $nIrrf->idepgtoext->bairro : null, | |
| 200 | 200 | false | 
| 201 | 201 | ); | 
| 202 | 202 | $this->dom->addChild( | 
| @@ -208,7 +208,7 @@ discard block | ||
| 208 | 208 | $this->dom->addChild( | 
| 209 | 209 | $endExt, | 
| 210 | 210 | "codPostal", | 
| 211 | - ! empty($nIrrf->idepgtoext->codpostal) ? $nIrrf->idepgtoext->codpostal : null, | |
| 211 | + !empty($nIrrf->idepgtoext->codpostal) ? $nIrrf->idepgtoext->codpostal : null, | |
| 212 | 212 | false | 
| 213 | 213 | ); | 
| 214 | 214 | $idePgtoExt->appendChild($endExt); | 
| @@ -81,7 +81,7 @@ | ||
| 81 | 81 | $this->dom->addChild( | 
| 82 | 82 | $infoIrrf, | 
| 83 | 83 | "nrRecArqBase", | 
| 84 | - ! empty($this->std->infoirrf->nrrecarqbase) ? $this->std->infoirrf->nrrecarqbase : '', | |
| 84 | + !empty($this->std->infoirrf->nrrecarqbase) ? $this->std->infoirrf->nrrecarqbase : '', | |
| 85 | 85 | false | 
| 86 | 86 | ); | 
| 87 | 87 | $this->dom->addChild( | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | $this->dom->addChild( | 
| 94 | 94 | $ideEvento, | 
| 95 | 95 | "nrRecibo", | 
| 96 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, | |
| 96 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, | |
| 97 | 97 | false | 
| 98 | 98 | ); | 
| 99 | 99 | $this->dom->addChild( | 
| @@ -215,7 +215,7 @@ discard block | ||
| 215 | 215 | $this->dom->addChild( | 
| 216 | 216 | $nfs, | 
| 217 | 217 | "serie", | 
| 218 | - ! empty($prodnfs->serie) ? $prodnfs->serie : null, | |
| 218 | + !empty($prodnfs->serie) ? $prodnfs->serie : null, | |
| 219 | 219 | false | 
| 220 | 220 | ); | 
| 221 | 221 | |
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | $this->dom->addChild( | 
| 115 | 115 | $ideEstab, | 
| 116 | 116 | "fimValid", | 
| 117 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, | |
| 117 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, | |
| 118 | 118 | false | 
| 119 | 119 | ); | 
| 120 | 120 | |
| @@ -127,7 +127,7 @@ discard block | ||
| 127 | 127 | } | 
| 128 | 128 | $node->appendChild($ideEstab); | 
| 129 | 129 | |
| 130 | -        if (! empty($this->std->dadosestab)) { | |
| 130 | +        if (!empty($this->std->dadosestab)) { | |
| 131 | 131 |              $dadosEstab = $this->dom->createElement("dadosEstab"); | 
| 132 | 132 | $this->dom->addChild( | 
| 133 | 133 | $dadosEstab, | 
| @@ -142,7 +142,7 @@ discard block | ||
| 142 | 142 | $this->std->dadosestab->aliqgilrat->aliqrat, | 
| 143 | 143 | true | 
| 144 | 144 | ); | 
| 145 | - $fap = ! empty($this->std->dadosestab->aliqgilrat->fap) ? $this->std->dadosestab->aliqgilrat->fap : null; | |
| 145 | + $fap = !empty($this->std->dadosestab->aliqgilrat->fap) ? $this->std->dadosestab->aliqgilrat->fap : null; | |
| 146 | 146 |              if ($fap) { | 
| 147 | 147 | $fap = number_format($fap, 4, '.', ''); | 
| 148 | 148 | } | 
| @@ -152,7 +152,7 @@ discard block | ||
| 152 | 152 | $fap, | 
| 153 | 153 | false | 
| 154 | 154 | ); | 
| 155 | - $aliqrata = ! empty($this->std->dadosestab->aliqgilrat->aliqratajust) | |
| 155 | + $aliqrata = !empty($this->std->dadosestab->aliqgilrat->aliqratajust) | |
| 156 | 156 | ? $this->std->dadosestab->aliqgilrat->aliqratajust | 
| 157 | 157 | : null; | 
| 158 | 158 |              if ($aliqrata) { | 
| @@ -164,7 +164,7 @@ discard block | ||
| 164 | 164 | $aliqrata, | 
| 165 | 165 | false | 
| 166 | 166 | ); | 
| 167 | -            if (! empty($this->std->dadosestab->aliqgilrat->procadmjudrat)) { | |
| 167 | +            if (!empty($this->std->dadosestab->aliqgilrat->procadmjudrat)) { | |
| 168 | 168 |                  $procAdmJudRat = $this->dom->createElement("procAdmJudRat"); | 
| 169 | 169 | $this->dom->addChild( | 
| 170 | 170 | $procAdmJudRat, | 
| @@ -186,7 +186,7 @@ discard block | ||
| 186 | 186 | ); | 
| 187 | 187 | $aliqGilrat->appendChild($procAdmJudRat); | 
| 188 | 188 | } | 
| 189 | -            if (! empty($this->std->dadosestab->aliqgilrat->procadmjudfap)) { | |
| 189 | +            if (!empty($this->std->dadosestab->aliqgilrat->procadmjudfap)) { | |
| 190 | 190 |                  $procAdmJudFap = $this->dom->createElement("procAdmJudFap"); | 
| 191 | 191 | $this->dom->addChild( | 
| 192 | 192 | $procAdmJudFap, | 
| @@ -210,7 +210,7 @@ discard block | ||
| 210 | 210 | } | 
| 211 | 211 | $dadosEstab->appendChild($aliqGilrat); | 
| 212 | 212 | |
| 213 | -            if (! empty($this->std->dadosestab->infocaepf)) { | |
| 213 | +            if (!empty($this->std->dadosestab->infocaepf)) { | |
| 214 | 214 |                  $infoCaepf = $this->dom->createElement("infoCaepf"); | 
| 215 | 215 | $this->dom->addChild( | 
| 216 | 216 | $infoCaepf, | 
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | $dadosEstab->appendChild($infoCaepf); | 
| 222 | 222 | } | 
| 223 | 223 | |
| 224 | -            if (! empty($this->std->dadosestab->infoobra)) { | |
| 224 | +            if (!empty($this->std->dadosestab->infoobra)) { | |
| 225 | 225 |                  $infoObra = $this->dom->createElement("infoObra"); | 
| 226 | 226 | $this->dom->addChild( | 
| 227 | 227 | $infoObra, | 
| @@ -250,7 +250,7 @@ discard block | ||
| 250 | 250 | $this->dom->addChild( | 
| 251 | 251 | $infoApr, | 
| 252 | 252 | "nrProcJud", | 
| 253 | - ! empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) | |
| 253 | + !empty($this->std->dadosestab->infotrab->infoapr->nrprocjud) | |
| 254 | 254 | ? $this->std->dadosestab->infotrab->infoapr->nrprocjud | 
| 255 | 255 | : null, | 
| 256 | 256 | false | 
| @@ -258,13 +258,13 @@ discard block | ||
| 258 | 258 | $this->dom->addChild( | 
| 259 | 259 | $infoApr, | 
| 260 | 260 | "contEntEd", | 
| 261 | - ! empty($this->std->dadosestab->infotrab->infoapr->contented) | |
| 261 | + !empty($this->std->dadosestab->infotrab->infoapr->contented) | |
| 262 | 262 | ? $this->std->dadosestab->infotrab->infoapr->contented | 
| 263 | 263 | : null, | 
| 264 | 264 | false | 
| 265 | 265 | ); | 
| 266 | 266 | |
| 267 | -            if (! empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { | |
| 267 | +            if (!empty($this->std->dadosestab->infotrab->infoapr->infoenteduc)) { | |
| 268 | 268 |                  foreach ($this->std->dadosestab->infotrab->infoapr->infoenteduc as $edu) { | 
| 269 | 269 |                      $infoEntEduc = $this->dom->createElement("infoEntEduc"); | 
| 270 | 270 | $this->dom->addChild( | 
| @@ -278,7 +278,7 @@ discard block | ||
| 278 | 278 | } | 
| 279 | 279 | |
| 280 | 280 | $infoTrab->appendChild($infoApr); | 
| 281 | -            if (! empty($this->std->dadosestab->infotrab->infopdc)) { | |
| 281 | +            if (!empty($this->std->dadosestab->infotrab->infopdc)) { | |
| 282 | 282 |                  $infoPCD = $this->dom->createElement("infoPCD"); | 
| 283 | 283 | $this->dom->addChild( | 
| 284 | 284 | $infoPCD, | 
| @@ -289,7 +289,7 @@ discard block | ||
| 289 | 289 | $this->dom->addChild( | 
| 290 | 290 | $infoPCD, | 
| 291 | 291 | "nrProcJud", | 
| 292 | - ! empty($this->std->dadosestab->infotrab->infopdc->nrprocjud) | |
| 292 | + !empty($this->std->dadosestab->infotrab->infopdc->nrprocjud) | |
| 293 | 293 | ? $this->std->dadosestab->infotrab->infopdc->nrprocjud | 
| 294 | 294 | : null, | 
| 295 | 295 | false | 
| @@ -300,7 +300,7 @@ discard block | ||
| 300 | 300 | $node->appendChild($dadosEstab); | 
| 301 | 301 | } | 
| 302 | 302 | |
| 303 | -        if (! empty($this->std->novavalidade) && $this->std->modo == 'ALT') { | |
| 303 | +        if (!empty($this->std->novavalidade) && $this->std->modo == 'ALT') { | |
| 304 | 304 | $newVal = $this->std->novavalidade; | 
| 305 | 305 |              $novaValidade = $this->dom->createElement("novaValidade"); | 
| 306 | 306 | $this->dom->addChild( | 
| @@ -312,7 +312,7 @@ discard block | ||
| 312 | 312 | $this->dom->addChild( | 
| 313 | 313 | $ideRubrica, | 
| 314 | 314 | "fimValid", | 
| 315 | - ! empty($newVal->fimvalid) ? $newVal->fimvalid : null, | |
| 315 | + !empty($newVal->fimvalid) ? $newVal->fimvalid : null, | |
| 316 | 316 | false | 
| 317 | 317 | ); | 
| 318 | 318 | $node->appendChild($novaValidade); |