@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\EFDReinf\Common\Factory; |
19 | 19 | use NFePHP\EFDReinf\Common\FactoryInterface; |
20 | -use NFePHP\EFDReinf\Common\FactoryId; |
|
21 | 20 | use NFePHP\Common\Certificate; |
22 | 21 | use stdClass; |
23 | 22 |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | * @var array |
98 | 98 | */ |
99 | 99 | protected $grupos = [ |
100 | - 1 => [ //EVENTOS INICIAIS grupo [1] |
|
100 | + 1 => [//EVENTOS INICIAIS grupo [1] |
|
101 | 101 | 'R-1000', |
102 | 102 | 'R-1070' |
103 | 103 | ], |
104 | - 2 => [ //EVENTOS NÃO PERIÓDICOS grupo [2] |
|
104 | + 2 => [//EVENTOS NÃO PERIÓDICOS grupo [2] |
|
105 | 105 | 'R-2030', |
106 | 106 | 'R-2040', |
107 | 107 | 'R-2050', |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'R-5011', |
112 | 112 | 'R-9000' |
113 | 113 | ], |
114 | - 3 => [ //EVENTOS PERIÓDICOS grupo [3] |
|
114 | + 3 => [//EVENTOS PERIÓDICOS grupo [3] |
|
115 | 115 | 'R-2010', |
116 | 116 | 'R-2020', |
117 | 117 | 'R-2070', |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $this->path = realpath( |
147 | 147 | __DIR__ . '/../../' |
148 | - ).'/'; |
|
148 | + ) . '/'; |
|
149 | 149 | |
150 | 150 | $this->serviceXsd = XsdSeeker::seek( |
151 | 151 | $this->path . "schemes/comunicacao/v$this->serviceVersion/" |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $x = substr($input, 5, 6); |
56 | 56 | $y = substr($input, 11, 4); |
57 | 57 | $dd = substr($input, -2); |
58 | - $value = $n.$x.$y; |
|
58 | + $value = $n . $x . $y; |
|
59 | 59 | $a = str_split($value); |
60 | 60 | $soma = 0; |
61 | 61 | $i = 16; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | if ($m2 > 9) { |
79 | 79 | $m2 -= 10; |
80 | 80 | } |
81 | - return $m1.$m2; |
|
81 | + return $m1 . $m2; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | */ |
107 | 107 | protected static function clearString($input, $lenght) |
108 | 108 | { |
109 | - $input = str_replace(['-','/','.'], '', $input); |
|
110 | - $input = substr($input, 0, $lenght-1); |
|
109 | + $input = str_replace(['-', '/', '.'], '', $input); |
|
110 | + $input = substr($input, 0, $lenght - 1); |
|
111 | 111 | $input = str_pad($input, $lenght, '0', STR_PAD_RIGHT); |
112 | 112 | if (!preg_match('/^[0-9]+$/', $input)) { |
113 | 113 | throw new \InvalidArgumentException("O numero do processo tem estrutura incorreta."); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | return ''; |
98 | 98 | } |
99 | 99 | $this->method = "ConsultaInformacoesConsolidadas"; |
100 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
100 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
101 | 101 | $request = "<sped:tipoInscricaoContribuinte>$this->tpInsc</sped:tipoInscricaoContribuinte>"; |
102 | 102 | $request .= "<sped:numeroInscricaoContribuinte>$this->nrInsc</sped:numeroInscricaoContribuinte>"; |
103 | 103 | $request .= "<sped:numeroProtocoloFechamento>$recibofechamento</sped:numeroProtocoloFechamento>"; |
@@ -133,20 +133,20 @@ discard block |
||
133 | 133 | throw ProcessException::wrongArgument(2002, ''); |
134 | 134 | } |
135 | 135 | //verifica se o evento pertence ao grupo indicado |
136 | - if (! in_array($evt->alias(), $this->grupos[$grupo])) { |
|
136 | + if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
|
137 | 137 | throw new \RuntimeException( |
138 | 138 | 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
139 | 139 | . $this->eventGroup[$grupo] . ' ].' |
140 | 140 | ); |
141 | 141 | } |
142 | 142 | $this->checkCertificate($evt); |
143 | - $xml .= "<evento id=\"".$evt->getId()."\">"; |
|
143 | + $xml .= "<evento id=\"" . $evt->getId() . "\">"; |
|
144 | 144 | $xml .= $evt->toXML(); |
145 | 145 | $xml .= "</evento>"; |
146 | 146 | } |
147 | 147 | //build request |
148 | 148 | $request = "<Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v" |
149 | - . $this->serviceVersion."\" >" |
|
149 | + . $this->serviceVersion . "\" >" |
|
150 | 150 | . "<loteEventos>" |
151 | 151 | . $xml |
152 | 152 | . "</loteEventos>" |