@@ -127,7 +127,7 @@ discard block  | 
                                                    ||
| 127 | 127 | *  | 
                                                        
| 128 | 128 | * @param string $uf sigla da unidade da Federação  | 
                                                        
| 129 | 129 | * @param string $tpAmb tipo de ambiente 1-produção e 2-homologação  | 
                                                        
| 130 | - * @return mixed string XML do retorno do webservice, ou false se ocorreu algum erro  | 
                                                        |
| 130 | + * @return string string XML do retorno do webservice, ou false se ocorreu algum erro  | 
                                                        |
| 131 | 131 | */  | 
                                                        
| 132 | 132 | public function sefazStatus($uf = '', $tpAmb = null)  | 
                                                        
| 133 | 133 |      { | 
                                                        
@@ -286,9 +286,8 @@ discard block  | 
                                                    ||
| 286 | 286 | *  | 
                                                        
| 287 | 287 | * @param string $uf  | 
                                                        
| 288 | 288 | * @param string $chave  | 
                                                        
| 289 | - * @param string $cOrgao  | 
                                                        |
| 290 | 289 | * @param string $tpEvento  | 
                                                        
| 291 | - * @param string $nSeqEvento  | 
                                                        |
| 290 | + * @param integer $nSeqEvento  | 
                                                        |
| 292 | 291 | * @param string $tagAdic  | 
                                                        
| 293 | 292 | * @return string  | 
                                                        
| 294 | 293 | */  | 
                                                        
@@ -386,12 +386,11 @@  | 
                                                    ||
| 386 | 386 | }  | 
                                                        
| 387 | 387 | //monta a consulta  | 
                                                        
| 388 | 388 | $request = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">"  | 
                                                        
| 389 | - . "<tpAmb>".$this->tpAmb."</tpAmb>"  | 
                                                        |
| 390 | - . ((strlen($this->config->cnpj)==14) ?  | 
                                                        |
| 391 | - "<CNPJ>".$this->config->cnpj."</CNPJ>" :  | 
                                                        |
| 392 | - "<CPF>".$this->config->cnpj."</CPF>"  | 
                                                        |
| 389 | + . "<tpAmb>" . $this->tpAmb . "</tpAmb>"  | 
                                                        |
| 390 | + . ((strlen($this->config->cnpj) == 14) ?  | 
                                                        |
| 391 | + "<CNPJ>" . $this->config->cnpj . "</CNPJ>" : "<CPF>" . $this->config->cnpj . "</CPF>"  | 
                                                        |
| 393 | 392 | )  | 
                                                        
| 394 | - . $tagNSU."</distDFeInt>";  | 
                                                        |
| 393 | + . $tagNSU . "</distDFeInt>";  | 
                                                        |
| 395 | 394 | //valida o xml da requisição  | 
                                                        
| 396 | 395 | $this->isValid($this->urlVersion, $request, 'distDFeInt');  | 
                                                        
| 397 | 396 | $this->lastRequest = $request;  | 
                                                        
@@ -364,6 +364,12 @@  | 
                                                    ||
| 364 | 364 | return $signed;  | 
                                                        
| 365 | 365 | }  | 
                                                        
| 366 | 366 | |
| 367 | + /**  | 
                                                        |
| 368 | + * @param DOMDocument $dom  | 
                                                        |
| 369 | + * @param string $modal  | 
                                                        |
| 370 | + *  | 
                                                        |
| 371 | + * @return string  | 
                                                        |
| 372 | + */  | 
                                                        |
| 367 | 373 | public function getModalXML($dom, $modal)  | 
                                                        
| 368 | 374 |      { | 
                                                        
| 369 | 375 | $modal = $dom->getElementsByTagName($modal)->item(0);  | 
                                                        
@@ -154,7 +154,6 @@  | 
                                                    ||
| 154 | 154 | * NOTE: This action is not necessary, I use only for my needs to  | 
                                                        
| 155 | 155 | * leave the MDFE marked as Canceled in order to avoid mistakes  | 
                                                        
| 156 | 156 | * after its cancellation.  | 
                                                        
| 157 | - * @param string $MDFE content of autorized MDFE XML  | 
                                                        |
| 158 | 157 | * @param string $cancelamento content of SEFAZ response  | 
                                                        
| 159 | 158 | * @return string  | 
                                                        
| 160 | 159 | * @throws \InvalidArgumentException  | 
                                                        
@@ -5,7 +5,6 @@  | 
                                                    ||
| 5 | 5 | use DOMDocument;  | 
                                                        
| 6 | 6 | use NFePHP\MDFe\Common\Standardize;  | 
                                                        
| 7 | 7 | use NFePHP\MDFe\Exception\DocumentsException;  | 
                                                        
| 8 | -use NFePHP\Common\Strings;  | 
                                                        |
| 9 | 8 | |
| 10 | 9 | class Complements  | 
                                                        
| 11 | 10 |  { | 
                                                        
@@ -84,7 +84,7 @@ discard block  | 
                                                    ||
| 84 | 84 | */  | 
                                                        
| 85 | 85 | public function __toString()  | 
                                                        
| 86 | 86 |      { | 
                                                        
| 87 | - return (string)$this->json;  | 
                                                        |
| 87 | + return (string) $this->json;  | 
                                                        |
| 88 | 88 | }  | 
                                                        
| 89 | 89 | |
| 90 | 90 | /**  | 
                                                        
@@ -96,7 +96,7 @@ discard block  | 
                                                    ||
| 96 | 96 | $resp = simplexml_load_string($xml, null, LIBXML_NOCDATA);  | 
                                                        
| 97 | 97 | $aWS = [];  | 
                                                        
| 98 | 98 |          foreach ($resp->children() as $element) { | 
                                                        
| 99 | - $sigla = (string)$element->sigla;  | 
                                                        |
| 99 | + $sigla = (string) $element->sigla;  | 
                                                        |
| 100 | 100 | $aWS[$sigla] = [];  | 
                                                        
| 101 | 101 |              if (isset($element->homologacao)) { | 
                                                        
| 102 | 102 | $aWS[$sigla] += $this->extract($element->homologacao, 'homologacao');  | 
                                                        
@@ -119,11 +119,11 @@ discard block  | 
                                                    ||
| 119 | 119 |      { | 
                                                        
| 120 | 120 | $amb[$environment] = [];  | 
                                                        
| 121 | 121 |          foreach ($node->children() as $children) { | 
                                                        
| 122 | - $name = (string)$children->getName();  | 
                                                        |
| 123 | - $method = (string)$children['method'];  | 
                                                        |
| 124 | - $operation = (string)$children['operation'];  | 
                                                        |
| 125 | - $version = (string)$children['version'];  | 
                                                        |
| 126 | - $url = (string)$children[0];  | 
                                                        |
| 122 | + $name = (string) $children->getName();  | 
                                                        |
| 123 | + $method = (string) $children['method'];  | 
                                                        |
| 124 | + $operation = (string) $children['operation'];  | 
                                                        |
| 125 | + $version = (string) $children['version'];  | 
                                                        |
| 126 | + $url = (string) $children[0];  | 
                                                        |
| 127 | 127 | $operations = [  | 
                                                        
| 128 | 128 | 'method' => $method,  | 
                                                        
| 129 | 129 | 'operation' => $operation,  | 
                                                        
@@ -1828,10 +1828,6 @@ discard block  | 
                                                    ||
| 1828 | 1828 | * tagVag  | 
                                                        
| 1829 | 1829 | * tag MDFe/infMDFe/infModal/ferrov/trem/vag  | 
                                                        
| 1830 | 1830 | *  | 
                                                        
| 1831 | - * @param string $serie  | 
                                                        |
| 1832 | - * @param string $nVag  | 
                                                        |
| 1833 | - * @param string $nSeq  | 
                                                        |
| 1834 | - * @param string $tonUtil  | 
                                                        |
| 1835 | 1831 | *  | 
                                                        
| 1836 | 1832 | * @return DOMElement  | 
                                                        
| 1837 | 1833 | */  | 
                                                        
@@ -2191,7 +2187,6 @@ discard block  | 
                                                    ||
| 2191 | 2187 | * condutor  | 
                                                        
| 2192 | 2188 | * tag MDFe/infMDFe/infModal/rodo/veicTracao/condutor  | 
                                                        
| 2193 | 2189 | *  | 
                                                        
| 2194 | - * @param string $cEmbComb  | 
                                                        |
| 2195 | 2190 | *  | 
                                                        
| 2196 | 2191 | * @return DOMElement  | 
                                                        
| 2197 | 2192 | */  | 
                                                        
@@ -2728,7 +2723,7 @@ discard block  | 
                                                    ||
| 2728 | 2723 | * Replace all unsuported chars  | 
                                                        
| 2729 | 2724 | *  | 
                                                        
| 2730 | 2725 | * @param stdClass $std  | 
                                                        
| 2731 | - * @param array $possible  | 
                                                        |
| 2726 | + * @param string[] $possible  | 
                                                        |
| 2732 | 2727 | * @return stdClass  | 
                                                        
| 2733 | 2728 | */  | 
                                                        
| 2734 | 2729 | private function equilizeParameters(stdClass $std, $possible)  |