Passed
Pull Request — master (#312)
by
unknown
01:17
created
src/Common/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Common/ValidTXT.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Factories/ContingencyCTe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Factories/Contingency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
         $type = strtoupper(str_replace('-', '', $type));
115 115
 
116 116
         if (empty($type)) {
117
-            $type = (string)$list[$acronym];
117
+            $type = (string) $list[$acronym];
118 118
         }
119 119
         $this->config = $this->configBuild($dt->getTimestamp(), $motive, $type);
120 120
         return $this->__toString();
Please login to merge, or discard this patch.
src/Complements.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
src/Common/Tools.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             $signed = $this->addQRCode($dom);
359 359
         }
360 360
         $this->isValid($this->versao, $signed, $method);
361
-        $modal = (int)$dom->getElementsByTagName('modal')->item(0)->nodeValue;
361
+        $modal = (int) $dom->getElementsByTagName('modal')->item(0)->nodeValue;
362 362
         if ($modelo != 67) {
363 363
             switch ($modal) {
364 364
                 case 1:
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
     protected function sendRequest($request, array $parameters = [])
599 599
     {
600 600
         $this->checkSoap();
601
-        return (string)$this->soap->send(
601
+        return (string) $this->soap->send(
602 602
             $this->urlService,
603 603
             $this->urlMethod,
604 604
             $this->urlAction,
Please login to merge, or discard this patch.
src/MakeCTeOS.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         $std = $this->equilizeParameters($std, $possible);
619 619
         $identificador = '#4 <infPercurso> - ';
620 620
         $this->infPercurso[] = $this->dom->createElement('infPercurso');
621
-        $posicao = (int)count($this->infPercurso) - 1;
621
+        $posicao = (int) count($this->infPercurso) - 1;
622 622
         $this->dom->addChild(
623 623
             $this->infPercurso[$posicao],
624 624
             'UFPer',
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
         $identificador = '#91 <ObsCont> - ';
698 698
         if (count($this->obsCont) <= 10) {
699 699
             $this->obsCont[] = $this->dom->createElement('ObsCont');
700
-            $posicao = (int)count($this->obsCont) - 1;
700
+            $posicao = (int) count($this->obsCont) - 1;
701 701
             $this->obsCont[$posicao]->setAttribute('xCampo', $std->xCampo);
702 702
             $this->dom->addChild(
703 703
                 $this->obsCont[$posicao],
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         $identificador = '#94 <ObsFisco> - ';
736 736
         if (count($this->obsFisco) <= 10) {
737 737
             $this->obsFisco[] = $this->dom->createElement('ObsFisco');
738
-            $posicao = (int)count($this->obsFisco) - 1;
738
+            $posicao = (int) count($this->obsFisco) - 1;
739 739
             $this->obsFisco[$posicao]->setAttribute('xCampo', $std->xCampo);
740 740
             $this->dom->addChild(
741 741
                 $this->obsFisco[$posicao],
@@ -1117,7 +1117,7 @@  discard block
 block discarded – undo
1117 1117
         $std = $this->equilizeParameters($std, $possible);
1118 1118
         $identificador = '#65 <Comp> - ';
1119 1119
         $this->comp[] = $this->dom->createElement('Comp');
1120
-        $posicao = (int)count($this->comp) - 1;
1120
+        $posicao = (int) count($this->comp) - 1;
1121 1121
         $this->dom->addChild(
1122 1122
             $this->comp[$posicao],
1123 1123
             'xNome',
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
         $std = $this->equilizeParameters($std, $possible);
1593 1593
         $identificador = '#257 <infQ> - ';
1594 1594
         $this->infQ[] = $this->dom->createElement('infQ');
1595
-        $posicao = (int)count($this->infQ) - 1;
1595
+        $posicao = (int) count($this->infQ) - 1;
1596 1596
         $this->dom->addChild(
1597 1597
             $this->infQ[$posicao],
1598 1598
             'qCarga',
@@ -1622,7 +1622,7 @@  discard block
 block discarded – undo
1622 1622
         $std = $this->equilizeParameters($std, $possible);
1623 1623
         $ident = '#319 <infDocRef> - ';
1624 1624
         $this->infDocRef[] = $this->dom->createElement('infDocRef');
1625
-        $posicao = (int)count($this->infDocRef) - 1;
1625
+        $posicao = (int) count($this->infDocRef) - 1;
1626 1626
         if (!empty($std->chBPe)) {
1627 1627
             $this->dom->addChild(
1628 1628
                 $this->infDocRef[$posicao],
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
         $std = $this->equilizeParameters($std, $possible);
1688 1688
         $identificador = '#360 <seg> - ';
1689 1689
         $this->seg[] = $this->dom->createElement('seg');
1690
-        $posicao = (int)count($this->seg) - 1;
1690
+        $posicao = (int) count($this->seg) - 1;
1691 1691
         $this->dom->addChild(
1692 1692
             $this->seg[$posicao],
1693 1693
             'respSeg',
@@ -2114,7 +2114,7 @@  discard block
 block discarded – undo
2114 2114
         $std = $this->equilizeParameters($std, $possible);
2115 2115
         $identificador = '#65 <comp> - ';
2116 2116
         $this->infGTVe[] = $this->dom->createElement('infGTVe');
2117
-        $posicao = (int)count($this->infGTVe) - 1;
2117
+        $posicao = (int) count($this->infGTVe) - 1;
2118 2118
         $this->dom->addChild(
2119 2119
             $this->infGTVe[$posicao],
2120 2120
             'chCTe',
@@ -2165,7 +2165,7 @@  discard block
 block discarded – undo
2165 2165
             false,
2166 2166
             $identificador . 'Nome do componente (informar apenas para outros)'
2167 2167
         );
2168
-        $posicao = (int)count($this->infGTVe) - 1;
2168
+        $posicao = (int) count($this->infGTVe) - 1;
2169 2169
         $this->dom->appChild($this->infGTVe[$posicao], $comp, 'Inclui Comp na tag infGTVe');
2170 2170
         return $comp;
2171 2171
     }
Please login to merge, or discard this patch.
src/MakeCTe.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
         $identificador = '#91 <ObsCont> - ';
1656 1656
         if (count($this->obsCont) <= 10) {
1657 1657
             $this->obsCont[] = $this->dom->createElement('ObsCont');
1658
-            $posicao = (int)count($this->obsCont) - 1;
1658
+            $posicao = (int) count($this->obsCont) - 1;
1659 1659
             $this->obsCont[$posicao]->setAttribute('xCampo', $std->xCampo);
1660 1660
             $this->dom->addChild(
1661 1661
                 $this->obsCont[$posicao],
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
         $identificador = '#94 <ObsFisco> - ';
1694 1694
         if (count($this->obsFisco) <= 10) {
1695 1695
             $this->obsFisco[] = $this->dom->createElement('ObsFisco');
1696
-            $posicao = (int)count($this->obsFisco) - 1;
1696
+            $posicao = (int) count($this->obsFisco) - 1;
1697 1697
             $this->obsFisco[$posicao]->setAttribute('xCampo', $std->xCampo);
1698 1698
             $this->dom->addChild(
1699 1699
                 $this->obsFisco[$posicao],
@@ -2659,7 +2659,7 @@  discard block
 block discarded – undo
2659 2659
         $std = $this->equilizeParameters($std, $possible);
2660 2660
         $identificador = '#65 <pass> - ';
2661 2661
         $this->comp[] = $this->dom->createElement('Comp');
2662
-        $posicao = (int)count($this->comp) - 1;
2662
+        $posicao = (int) count($this->comp) - 1;
2663 2663
         $this->dom->addChild(
2664 2664
             $this->comp[$posicao],
2665 2665
             'xNome',
@@ -3157,7 +3157,7 @@  discard block
 block discarded – undo
3157 3157
         $std = $this->equilizeParameters($std, $possible);
3158 3158
         $identificador = '#257 <infQ> - ';
3159 3159
         $this->infQ[] = $this->dom->createElement('infQ');
3160
-        $posicao = (int)count($this->infQ) - 1;
3160
+        $posicao = (int) count($this->infQ) - 1;
3161 3161
         $this->dom->addChild(
3162 3162
             $this->infQ[$posicao],
3163 3163
             'cUnid',
@@ -3647,7 +3647,7 @@  discard block
 block discarded – undo
3647 3647
         $std = $this->equilizeParameters($std, $possible);
3648 3648
         $identificador = '#345 <emiDocAnt> - ';
3649 3649
         $this->emiDocAnt[] = $this->dom->createElement('emiDocAnt');
3650
-        $posicao = (int)count($this->emiDocAnt) - 1;
3650
+        $posicao = (int) count($this->emiDocAnt) - 1;
3651 3651
         if (!empty($std->CNPJ)) {
3652 3652
             $this->dom->addChild(
3653 3653
                 $this->emiDocAnt[$posicao],
@@ -3703,7 +3703,7 @@  discard block
 block discarded – undo
3703 3703
         $std = $this->equilizeParameters($std, $possible);
3704 3704
         $identificador = '#358 <idDocAntEle> - ';
3705 3705
         $this->idDocAntEle[count($this->emiDocAnt) - 1][] = $this->dom->createElement('idDocAntEle');
3706
-        $posicao = (int)count($this->idDocAntEle[count($this->emiDocAnt) - 1]) - 1;
3706
+        $posicao = (int) count($this->idDocAntEle[count($this->emiDocAnt) - 1]) - 1;
3707 3707
         $this->dom->addChild(
3708 3708
             $this->idDocAntEle[count($this->emiDocAnt) - 1][$posicao],
3709 3709
             'chCTe',
@@ -3732,7 +3732,7 @@  discard block
 block discarded – undo
3732 3732
         $std = $this->equilizeParameters($std, $possible);
3733 3733
         $identificador = '#358 <idDocAntPap> - ';
3734 3734
         $this->idDocAntPap[count($this->emiDocAnt) - 1][] = $this->dom->createElement('idDocAntPap');
3735
-        $posicao = (int)count($this->idDocAntPap[count($this->emiDocAnt) - 1]) - 1;
3735
+        $posicao = (int) count($this->idDocAntPap[count($this->emiDocAnt) - 1]) - 1;
3736 3736
         $this->dom->addChild(
3737 3737
             $this->idDocAntPap[count($this->emiDocAnt) - 1][$posicao],
3738 3738
             'tpDoc',
@@ -3995,7 +3995,7 @@  discard block
 block discarded – undo
3995 3995
         $std = $this->equilizeParameters($std, $possible);
3996 3996
         $identificador = '#12 <detCont> - ';
3997 3997
         $this->lacre[count($this->detCont) - 1][] = $this->dom->createElement('lacre');
3998
-        $posicao = (int)count($this->lacre[count($this->detCont) - 1]) - 1;
3998
+        $posicao = (int) count($this->lacre[count($this->detCont) - 1]) - 1;
3999 3999
         $this->dom->addChild(
4000 4000
             $this->lacre[count($this->detCont) - 1][$posicao],
4001 4001
             'nLacre',
@@ -4022,7 +4022,7 @@  discard block
 block discarded – undo
4022 4022
         $std = $this->equilizeParameters($std, $possible);
4023 4023
         $identificador = '#15 <detCont> <infNF> - ';
4024 4024
         $this->infNFCont[count($this->detCont) - 1][] = $this->dom->createElement('infNF');
4025
-        $posicao = (int)count($this->infNFCont[count($this->detCont) - 1]) - 1;
4025
+        $posicao = (int) count($this->infNFCont[count($this->detCont) - 1]) - 1;
4026 4026
         $this->dom->addChild(
4027 4027
             $this->infNFCont[count($this->detCont) - 1][$posicao],
4028 4028
             'serie',
@@ -4056,7 +4056,7 @@  discard block
 block discarded – undo
4056 4056
         $std = $this->equilizeParameters($std, $possible);
4057 4057
         $identificador = '#19 <infNFe> - ';
4058 4058
         $this->infNFeCont[count($this->detCont) - 1][] = $this->dom->createElement('infNFe');
4059
-        $posicao = (int)count($this->infNFeCont[count($this->detCont) - 1]) - 1;
4059
+        $posicao = (int) count($this->infNFeCont[count($this->detCont) - 1]) - 1;
4060 4060
         $this->dom->addChild(
4061 4061
             $this->infNFeCont[count($this->detCont) - 1][$posicao],
4062 4062
             'chave',
Please login to merge, or discard this patch.
src/MakeGTVe.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.