@@ -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', microtime(true)); |
| 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\">"; |
@@ -176,7 +176,6 @@ |
||
| 176 | 176 | /** |
| 177 | 177 | * Stringfy layout number |
| 178 | 178 | * |
| 179 | - * @param type $layout |
|
| 180 | 179 | * |
| 181 | 180 | * @return string |
| 182 | 181 | */ |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @var array |
| 102 | 102 | */ |
| 103 | 103 | protected $grupos = [ |
| 104 | - 1 => [ //EVENTOS INICIAIS grupo [1] |
|
| 104 | + 1 => [//EVENTOS INICIAIS grupo [1] |
|
| 105 | 105 | 'S-1000', |
| 106 | 106 | 'S-1005', |
| 107 | 107 | 'S-1010', |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | 'S-1080', |
| 116 | 116 | 'S-2100', |
| 117 | 117 | ], |
| 118 | - 2 => [ //EVENTOS NÃO PERIÓDICOS grupo [2] |
|
| 118 | + 2 => [//EVENTOS NÃO PERIÓDICOS grupo [2] |
|
| 119 | 119 | 'S-2190', |
| 120 | 120 | 'S-2200', |
| 121 | 121 | 'S-2205', |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | 'S-5011', |
| 140 | 140 | 'S-5012', |
| 141 | 141 | ], |
| 142 | - 3 => [ //EVENTOS PERIÓDICOS grupo [3] |
|
| 142 | + 3 => [//EVENTOS PERIÓDICOS grupo [3] |
|
| 143 | 143 | 'S-1200', |
| 144 | 144 | 'S-1202', |
| 145 | 145 | 'S-1207', |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | $this->certificate = $certificate; |
| 184 | 184 | |
| 185 | 185 | $this->path = realpath( |
| 186 | - __DIR__.'/../../' |
|
| 187 | - ).'/'; |
|
| 186 | + __DIR__ . '/../../' |
|
| 187 | + ) . '/'; |
|
| 188 | 188 | |
| 189 | 189 | $this->serviceXsd = XsdSeeker::seek( |
| 190 | - $this->path."schemes/comunicacao/$this->serviceStr/" |
|
| 190 | + $this->path . "schemes/comunicacao/$this->serviceStr/" |
|
| 191 | 191 | ); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $fils = explode('.', $version); |
| 204 | 204 | $str = 'v'; |
| 205 | 205 | foreach ($fils as $fil) { |
| 206 | - $str .= str_pad($fil, $length, '0', STR_PAD_LEFT).'_'; |
|
| 206 | + $str .= str_pad($fil, $length, '0', STR_PAD_LEFT) . '_'; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | return substr($str, 0, -1); |
@@ -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); |
@@ -38,6 +38,7 @@ discard block |
||
| 38 | 38 | /** |
| 39 | 39 | * |
| 40 | 40 | * @param Certificate $certificate |
| 41 | + * @return void |
|
| 41 | 42 | */ |
| 42 | 43 | public function loadCertificate(Certificate $certificate); |
| 43 | 44 | |
@@ -45,6 +46,7 @@ discard block |
||
| 45 | 46 | * Set logger class |
| 46 | 47 | * |
| 47 | 48 | * @param LoggerInterface $logger |
| 49 | + * @return LoggerInterface |
|
| 48 | 50 | */ |
| 49 | 51 | public function loadLogger(LoggerInterface $logger); |
| 50 | 52 | |
@@ -52,6 +54,7 @@ discard block |
||
| 52 | 54 | * Set timeout for connection |
| 53 | 55 | * |
| 54 | 56 | * @param int $timesecs |
| 57 | + * @return integer |
|
| 55 | 58 | */ |
| 56 | 59 | public function timeout($timesecs); |
| 57 | 60 | |
@@ -59,6 +62,7 @@ discard block |
||
| 59 | 62 | * Set security protocol for soap communications |
| 60 | 63 | * |
| 61 | 64 | * @param int $protocol |
| 65 | + * @return integer |
|
| 62 | 66 | */ |
| 63 | 67 | public function protocol($protocol = self::SSL_DEFAULT); |
| 64 | 68 | |
@@ -69,6 +73,7 @@ discard block |
||
| 69 | 73 | * @param int $port |
| 70 | 74 | * @param string $user |
| 71 | 75 | * @param string $password |
| 76 | + * @return void |
|
| 72 | 77 | */ |
| 73 | 78 | public function proxy($ip, $port, $user, $password); |
| 74 | 79 | |
@@ -80,7 +85,6 @@ discard block |
||
| 80 | 85 | * @param string $action |
| 81 | 86 | * @param string $envelope |
| 82 | 87 | * @param array $parameters |
| 83 | - * @param string $request |
|
| 84 | 88 | */ |
| 85 | 89 | public function send( |
| 86 | 90 | $operation, |
@@ -65,7 +65,7 @@ |
||
| 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, |
@@ -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( |
@@ -65,7 +65,7 @@ |
||
| 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, |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $this->dom->addChild( |
| 135 | 135 | $ideVinculo, |
| 136 | 136 | "codCateg", |
| 137 | - ! empty($this->std->idevinculo->codcateg) ? $this->std->idevinculo->codcateg : null, |
|
| 137 | + !empty($this->std->idevinculo->codcateg) ? $this->std->idevinculo->codcateg : null, |
|
| 138 | 138 | false |
| 139 | 139 | ); |
| 140 | 140 | $this->node->appendChild($ideVinculo); |
@@ -160,21 +160,21 @@ discard block |
||
| 160 | 160 | $this->dom->addChild( |
| 161 | 161 | $iniAfastamento, |
| 162 | 162 | "infoMesmoMtv", |
| 163 | - ! empty($this->std->iniafastamento->infomesmomtv) ? $this->std->iniafastamento->infomesmomtv : null, |
|
| 163 | + !empty($this->std->iniafastamento->infomesmomtv) ? $this->std->iniafastamento->infomesmomtv : null, |
|
| 164 | 164 | false |
| 165 | 165 | ); |
| 166 | 166 | |
| 167 | 167 | $this->dom->addChild( |
| 168 | 168 | $iniAfastamento, |
| 169 | 169 | "tpAcidTransito", |
| 170 | - ! empty($this->std->iniafastamento->tpacidtransito) ? $this->std->iniafastamento->tpacidtransito : null, |
|
| 170 | + !empty($this->std->iniafastamento->tpacidtransito) ? $this->std->iniafastamento->tpacidtransito : null, |
|
| 171 | 171 | false |
| 172 | 172 | ); |
| 173 | 173 | |
| 174 | 174 | $this->dom->addChild( |
| 175 | 175 | $iniAfastamento, |
| 176 | 176 | "observacao", |
| 177 | - ! empty($this->std->iniafastamento->observacao) ? $this->std->iniafastamento->observacao : null, |
|
| 177 | + !empty($this->std->iniafastamento->observacao) ? $this->std->iniafastamento->observacao : null, |
|
| 178 | 178 | false |
| 179 | 179 | ); |
| 180 | 180 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $this->dom->addChild( |
| 186 | 186 | $infoAtestado, |
| 187 | 187 | "codCID", |
| 188 | - ! empty($info->codcid) ? $info->codcid : null, |
|
| 188 | + !empty($info->codcid) ? $info->codcid : null, |
|
| 189 | 189 | false |
| 190 | 190 | ); |
| 191 | 191 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $this->dom->addChild( |
| 224 | 224 | $emitente, |
| 225 | 225 | "ufOC", |
| 226 | - ! empty($info->emitente->ufoc) ? $info->emitente->ufoc : null, |
|
| 226 | + !empty($info->emitente->ufoc) ? $info->emitente->ufoc : null, |
|
| 227 | 227 | false |
| 228 | 228 | ); |
| 229 | 229 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - if (! empty($this->std->infocessao)) { |
|
| 237 | + if (!empty($this->std->infocessao)) { |
|
| 238 | 238 | $infoCessao = $this->dom->createElement("infoCessao"); |
| 239 | 239 | |
| 240 | 240 | $this->dom->addChild( |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $iniAfastamento->appendChild($infoCessao); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - if (! empty($this->std->infomandsind)) { |
|
| 257 | + if (!empty($this->std->infomandsind)) { |
|
| 258 | 258 | $infoMandSind = $this->dom->createElement("infoMandSind"); |
| 259 | 259 | |
| 260 | 260 | $this->dom->addChild( |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | $infoAfastamento->appendChild($iniAfastamento); |
| 278 | 278 | |
| 279 | - if (! empty($this->std->inforetif)) { |
|
| 279 | + if (!empty($this->std->inforetif)) { |
|
| 280 | 280 | $infoRetif = $this->dom->createElement("infoRetif"); |
| 281 | 281 | |
| 282 | 282 | $this->dom->addChild( |
@@ -296,14 +296,14 @@ discard block |
||
| 296 | 296 | $this->dom->addChild( |
| 297 | 297 | $infoRetif, |
| 298 | 298 | "nrProc", |
| 299 | - ! empty($this->std->inforetif->nrproc) ? $this->std->inforetif->nrproc : null, |
|
| 299 | + !empty($this->std->inforetif->nrproc) ? $this->std->inforetif->nrproc : null, |
|
| 300 | 300 | false |
| 301 | 301 | ); |
| 302 | 302 | |
| 303 | 303 | $infoAfastamento->appendChild($infoRetif); |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | - if (! empty($this->std->fimafastamento)) { |
|
| 306 | + if (!empty($this->std->fimafastamento)) { |
|
| 307 | 307 | $fimAfastamento = $this->dom->createElement("fimAfastamento"); |
| 308 | 308 | |
| 309 | 309 | $this->dom->addChild( |