Passed
Push — master ( 5b4e1e...8c5742 )
by
unknown
02:00 queued 14s
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/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.
src/MakeCTeOS.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         $std = $this->equilizeParameters($std, $possible);
597 597
         $identificador = '#4 <infPercurso> - ';
598 598
         $this->infPercurso[] = $this->dom->createElement('infPercurso');
599
-        $posicao = (int)count($this->infPercurso) - 1;
599
+        $posicao = (int) count($this->infPercurso) - 1;
600 600
         $this->dom->addChild(
601 601
             $this->infPercurso[$posicao],
602 602
             'UFPer',
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         $identificador = '#91 <ObsCont> - ';
676 676
         if (count($this->obsCont) <= 10) {
677 677
             $this->obsCont[] = $this->dom->createElement('ObsCont');
678
-            $posicao = (int)count($this->obsCont) - 1;
678
+            $posicao = (int) count($this->obsCont) - 1;
679 679
             $this->obsCont[$posicao]->setAttribute('xCampo', $std->xCampo);
680 680
             $this->dom->addChild(
681 681
                 $this->obsCont[$posicao],
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
         $identificador = '#94 <ObsFisco> - ';
714 714
         if (count($this->obsFisco) <= 10) {
715 715
             $this->obsFisco[] = $this->dom->createElement('ObsFisco');
716
-            $posicao = (int)count($this->obsFisco) - 1;
716
+            $posicao = (int) count($this->obsFisco) - 1;
717 717
             $this->obsFisco[$posicao]->setAttribute('xCampo', $std->xCampo);
718 718
             $this->dom->addChild(
719 719
                 $this->obsFisco[$posicao],
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
         $std = $this->equilizeParameters($std, $possible);
1104 1104
         $identificador = '#65 <Comp> - ';
1105 1105
         $this->comp[] = $this->dom->createElement('Comp');
1106
-        $posicao = (int)count($this->comp) - 1;
1106
+        $posicao = (int) count($this->comp) - 1;
1107 1107
         $this->dom->addChild(
1108 1108
             $this->comp[$posicao],
1109 1109
             'xNome',
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
         $std = $this->equilizeParameters($std, $possible);
1591 1591
         $ident = '#319 <infDocRef> - ';
1592 1592
         $this->infDocRef[] = $this->dom->createElement('infDocRef');
1593
-        $posicao = (int)count($this->infDocRef) - 1;
1593
+        $posicao = (int) count($this->infDocRef) - 1;
1594 1594
         if (!empty($std->chBPe)) {
1595 1595
             $this->dom->addChild(
1596 1596
                 $this->infDocRef[$posicao],
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
         $std = $this->equilizeParameters($std, $possible);
1656 1656
         $identificador = '#360 <seg> - ';
1657 1657
         $this->seg[] = $this->dom->createElement('seg');
1658
-        $posicao = (int)count($this->seg) - 1;
1658
+        $posicao = (int) count($this->seg) - 1;
1659 1659
         $this->dom->addChild(
1660 1660
             $this->seg[$posicao],
1661 1661
             'respSeg',
@@ -2085,7 +2085,7 @@  discard block
 block discarded – undo
2085 2085
         $std = $this->equilizeParameters($std, $possible);
2086 2086
         $identificador = '#65 <comp> - ';
2087 2087
         $this->infGTVe[] = $this->dom->createElement('infGTVe');
2088
-        $posicao = (int)count($this->infGTVe) - 1;
2088
+        $posicao = (int) count($this->infGTVe) - 1;
2089 2089
         $this->dom->addChild(
2090 2090
             $this->infGTVe[$posicao],
2091 2091
             'chCTe',
@@ -2136,7 +2136,7 @@  discard block
 block discarded – undo
2136 2136
             false,
2137 2137
             $identificador . 'Nome do componente (informar apenas para outros)'
2138 2138
         );
2139
-        $posicao = (int)count($this->infGTVe) - 1;
2139
+        $posicao = (int) count($this->infGTVe) - 1;
2140 2140
         $this->dom->appChild($this->infGTVe[$posicao], $comp, 'Inclui Comp na tag infGTVe');
2141 2141
         return $comp;
2142 2142
     }
Please login to merge, or discard this patch.
src/Factories/QRCode.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
         if ($mod == 67) {
39 39
             $cte = $dom->getElementsByTagName('CTeOS')->item(0);
40 40
         } else {
41
-            $tpCTe = (int)$dom->getElementsByTagName('tpCTe')->item(0)->nodeValue;
41
+            $tpCTe = (int) $dom->getElementsByTagName('tpCTe')->item(0)->nodeValue;
42 42
             if (($tpCTe == 5) || ($tpCTe == 6)) {
43 43
                 // CTe simplificado
44 44
                 $cte = $dom->getElementsByTagName('CTeSimp')->item(0);
45
-            }else{
45
+            } else {
46 46
                 $cte = $dom->getElementsByTagName('CTe')->item(0);
47 47
             }
48 48
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             if (($tpCTe == 5) || ($tpCTe == 6)) {
43 43
                 // CTe simplificado
44 44
                 $cte = $dom->getElementsByTagName('CTeSimp')->item(0);
45
-            }else{
45
+            } else{
46 46
                 $cte = $dom->getElementsByTagName('CTe')->item(0);
47 47
             }
48 48
         }
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
@@ -115,7 +115,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Tools.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -184,8 +184,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.