@@ -48,9 +48,9 @@ |
||
48 | 48 | */ |
49 | 49 | protected static function validInputData(stdClass $data) |
50 | 50 | { |
51 | - $filejsonschema = __DIR__. "/../../storage/config_json.schema"; |
|
51 | + $filejsonschema = __DIR__ . "/../../storage/config_json.schema"; |
|
52 | 52 | $validator = new JsonValid(); |
53 | - $validator->check($data, (object)['$ref' => 'file://' . $filejsonschema]); |
|
53 | + $validator->check($data, (object) ['$ref' => 'file://' . $filejsonschema]); |
|
54 | 54 | if (!$validator->isValid()) { |
55 | 55 | $msg = ""; |
56 | 56 | foreach ($validator->getErrors() as $error) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $path = realpath(__DIR__ . "/../../storage"); |
32 | 32 | $json = file_get_contents( |
33 | - $path . '/txtstructure' . ($version*100) . '.json' |
|
33 | + $path . '/txtstructure' . ($version * 100) . '.json' |
|
34 | 34 | ); |
35 | 35 | self::$entities = json_decode($json, true); |
36 | 36 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($default != $count) { |
82 | 82 | self::$errors[] = "ERRO: O número de parâmetros na linha " |
83 | 83 | . "está errado (esperado #$default) -> (encontrado #$count). [ $row ] Esperado [ " |
84 | - . self::$entities[$ref]." ]"; |
|
84 | + . self::$entities[$ref] . " ]"; |
|
85 | 85 | } |
86 | 86 | foreach ($fields as $field) { |
87 | 87 | if ($field != trim($field)) { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $dtEmi = new DateTime($ide->getElementsByTagName('dhEmi')->item(0)->nodeValue); |
37 | 37 | $ano = $dtEmi->format('y'); |
38 | 38 | $mes = $dtEmi->format('m'); |
39 | - $tpEmis = (string)$contingency->tpEmis; |
|
39 | + $tpEmis = (string) $contingency->tpEmis; |
|
40 | 40 | $emit = $dom->getElementsByTagName('emit')->item(0); |
41 | 41 | $cnpj = $emit->getElementsByTagName('CNPJ')->item(0)->nodeValue; |
42 | 42 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | throw DocumentsException::wrongDocument(3, "<protCTe>"); |
130 | 130 | } |
131 | 131 | $infProt = $ret->getElementsByTagName('infProt')->item(0); |
132 | - $cStat = $infProt->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
132 | + $cStat = $infProt->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
133 | 133 | $xMotivo = $infProt->getElementsByTagName('xMotivo')->item(0)->nodeValue; |
134 | 134 | $dig = $infProt->getElementsByTagName("digVal")->item(0); |
135 | 135 | $digProt = '000'; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | throw DocumentsException::wrongDocument(3, "<protCTe>"); |
187 | 187 | } |
188 | 188 | $infProt = $ret->getElementsByTagName('infProt')->item(0); |
189 | - $cStat = $infProt->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
189 | + $cStat = $infProt->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
190 | 190 | $xMotivo = $infProt->getElementsByTagName('xMotivo')->item(0)->nodeValue; |
191 | 191 | $dig = $infProt->getElementsByTagName("digVal")->item(0); |
192 | 192 | $digProt = '000'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | // $resLote = $ret->getElementsByTagName('idLote')->item(0)->nodeValue; |
240 | 240 | //extrai a rag retEvento da resposta (retorno da SEFAZ) |
241 | 241 | $retEv = $ret->getElementsByTagName('retEventoCTe')->item(0); |
242 | - $cStat = $retEv->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
242 | + $cStat = $retEv->getElementsByTagName('cStat')->item(0)->nodeValue; |
|
243 | 243 | $xMotivo = $retEv->getElementsByTagName('xMotivo')->item(0)->nodeValue; |
244 | 244 | $tpEvento = $retEv->getElementsByTagName('tpEvento')->item(0)->nodeValue; |
245 | 245 | $cStatValids = ['135', '136']; |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | $identificador = '#91 <ObsCont> - '; |
782 | 782 | if (count($this->obsCont) <= 10) { |
783 | 783 | $this->obsCont[] = $this->dom->createElement('ObsCont'); |
784 | - $posicao = (int)count($this->obsCont) - 1; |
|
784 | + $posicao = (int) count($this->obsCont) - 1; |
|
785 | 785 | $this->obsCont[$posicao]->setAttribute('xCampo', $std->xCampo); |
786 | 786 | $this->dom->addChild( |
787 | 787 | $this->obsCont[$posicao], |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $identificador = '#94 <ObsFisco> - '; |
820 | 820 | if (count($this->obsFisco) <= 10) { |
821 | 821 | $this->obsFisco[] = $this->dom->createElement('ObsFisco'); |
822 | - $posicao = (int)count($this->obsFisco) - 1; |
|
822 | + $posicao = (int) count($this->obsFisco) - 1; |
|
823 | 823 | $this->obsFisco[$posicao]->setAttribute('xCampo', $std->xCampo); |
824 | 824 | $this->dom->addChild( |
825 | 825 | $this->obsFisco[$posicao], |
@@ -1582,7 +1582,7 @@ discard block |
||
1582 | 1582 | $std = $this->equilizeParameters($std, $possible); |
1583 | 1583 | $identificador = '#139 <infEspecie> - '; |
1584 | 1584 | $this->infEspecie[] = $this->dom->createElement('infEspecie'); |
1585 | - $posicao = (int)count($this->infEspecie) - 1; |
|
1585 | + $posicao = (int) count($this->infEspecie) - 1; |
|
1586 | 1586 | $this->dom->addChild( |
1587 | 1587 | $this->infEspecie[$posicao], |
1588 | 1588 | 'tpEspecie', |
@@ -1631,7 +1631,7 @@ discard block |
||
1631 | 1631 | $std = $this->equilizeParameters($std, $possible); |
1632 | 1632 | $identificador = '#139 <infVeiculo> - '; |
1633 | 1633 | $this->infVeiculo[] = $this->dom->createElement('infVeiculo'); |
1634 | - $posicao = (int)count($this->infVeiculo) - 1; |
|
1634 | + $posicao = (int) count($this->infVeiculo) - 1; |
|
1635 | 1635 | $this->dom->addChild( |
1636 | 1636 | $this->infVeiculo[$posicao], |
1637 | 1637 | 'placa', |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | $signed = $this->addQRCode($dom); |
356 | 356 | } |
357 | 357 | $this->isValid($this->versao, $signed, $method); |
358 | - $modal = (int)$dom->getElementsByTagName('modal')->item(0)->nodeValue; |
|
358 | + $modal = (int) $dom->getElementsByTagName('modal')->item(0)->nodeValue; |
|
359 | 359 | if ($modelo == 57) { |
360 | 360 | switch ($modal) { |
361 | 361 | case 1: |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | protected function sendRequest($request, array $parameters = []) |
602 | 602 | { |
603 | 603 | $this->checkSoap(); |
604 | - return (string)$this->soap->send( |
|
604 | + return (string) $this->soap->send( |
|
605 | 605 | $this->urlService, |
606 | 606 | $this->urlMethod, |
607 | 607 | $this->urlAction, |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | public static function putQRTag( |
31 | 31 | \DOMDocument $dom, |
32 | - $certificate, |
|
33 | - $url = '' |
|
32 | + $certificate, |
|
33 | + $url = '' |
|
34 | 34 | ) |
35 | 35 | { |
36 | 36 | $mod = $dom->getElementsByTagName('mod')->item(0)->nodeValue; |
@@ -115,7 +115,7 @@ |
||
115 | 115 | ); |
116 | 116 | $type = strtoupper(str_replace('-', '', $type)); |
117 | 117 | if (empty($type)) { |
118 | - $type = (string)$list[$acronym]; |
|
118 | + $type = (string) $list[$acronym]; |
|
119 | 119 | } |
120 | 120 | $this->config = $this->configBuild($dt->getTimestamp(), $motive, $type); |
121 | 121 | return $this->__toString(); |
@@ -184,8 +184,7 @@ discard block |
||
184 | 184 | . "<tpAmb>" . $this->tpAmb . "</tpAmb>" |
185 | 185 | . "<cUFAutor>$cUF</cUFAutor>" |
186 | 186 | . ((strlen($this->config->cnpj) == 14) ? |
187 | - "<CNPJ>{$this->config->cnpj}</CNPJ>" : |
|
188 | - "<CPF>{$this->config->cnpj}</CPF>" |
|
187 | + "<CNPJ>{$this->config->cnpj}</CNPJ>" : "<CPF>{$this->config->cnpj}</CPF>" |
|
189 | 188 | ) |
190 | 189 | . $tagNSU . "</distDFeInt>"; |
191 | 190 | //valida o xml da requisição |
@@ -531,8 +530,7 @@ discard block |
||
531 | 530 | //monta a consulta |
532 | 531 | $consulta = "<consChNFe><chNFe>$chave</chNFe></consChNFe>" |
533 | 532 | . ((strlen($this->config->cnpj) == 14) ? |
534 | - "<CNPJ>{$this->config->cnpj}</CNPJ>" : |
|
535 | - "<CPF>{$this->config->cnpj}</CPF>" |
|
533 | + "<CNPJ>{$this->config->cnpj}</CNPJ>" : "<CPF>{$this->config->cnpj}</CPF>" |
|
536 | 534 | ) |
537 | 535 | . "</distDFeInt>"; |
538 | 536 | //valida o xml da requisição |