@@ -575,6 +575,9 @@ |
||
| 575 | 575 | } |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | + /** |
|
| 579 | + * @param stdClass $std |
|
| 580 | + */ |
|
| 578 | 581 | protected function validInputParameters($properties, $std) |
| 579 | 582 | { |
| 580 | 583 | foreach ($properties as $key => $rules) { |
@@ -284,7 +284,7 @@ |
||
| 284 | 284 | 'required' => true, |
| 285 | 285 | 'type' => 'string', |
| 286 | 286 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
| 287 | - ], |
|
| 287 | + ], |
|
| 288 | 288 | 'nrinscestabprest' => [ |
| 289 | 289 | 'required' => true, |
| 290 | 290 | 'type' => 'string', |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $this->validInputParameters($properties, $std); |
| 199 | 199 | |
| 200 | 200 | $this->method = "ConsultaInformacoesConsolidadas"; |
| 201 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 201 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 202 | 202 | $request = "<sped:{$this->method}>" |
| 203 | 203 | . "<sped:tipoInscricaoContribuinte>{$std->tipoinscricaocontribuinte}</sped:tipoInscricaoContribuinte>" |
| 204 | 204 | . "<sped:numeroInscricaoContribuinte>{$std->numeroinscricaocontribuinte}</sped:numeroInscricaoContribuinte>" |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | protected function consultR1($evt) |
| 216 | 216 | { |
| 217 | 217 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 218 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 218 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 219 | 219 | $request = "<sped:{$this->method}>" |
| 220 | 220 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 221 | 221 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $this->validInputParameters($properties, $std); |
| 259 | 259 | |
| 260 | 260 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 261 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 261 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 262 | 262 | $request = "<sped:{$this->method}>" |
| 263 | 263 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 264 | 264 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | $this->validInputParameters($properties, $std); |
| 306 | 306 | |
| 307 | 307 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 308 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 308 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 309 | 309 | $request = "<sped:{$this->method}>" |
| 310 | 310 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 311 | 311 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | $this->validInputParameters($properties, $std); |
| 342 | 342 | |
| 343 | 343 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 344 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 344 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 345 | 345 | $request = "<sped:{$this->method}>" |
| 346 | 346 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 347 | 347 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $this->validInputParameters($properties, $std); |
| 387 | 387 | |
| 388 | 388 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 389 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 389 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 390 | 390 | $request = "<sped:{$this->method}>" |
| 391 | 391 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 392 | 392 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | $this->validInputParameters($properties, $std); |
| 417 | 417 | |
| 418 | 418 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 419 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 419 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 420 | 420 | $request = "<sped:{$this->method}>" |
| 421 | 421 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 422 | 422 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $this->validInputParameters($properties, $std); |
| 450 | 450 | |
| 451 | 451 | $this->method = "ConsultaReciboEvento{$evt}"; |
| 452 | - $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/".$this->method; |
|
| 452 | + $this->action = "http://sped.fazenda.gov.br/ConsultasReinf/" . $this->method; |
|
| 453 | 453 | $request = "<sped:{$this->method}>" |
| 454 | 454 | . "<sped:tipoEvento>{$evt}</sped:tipoEvento>" |
| 455 | 455 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
@@ -485,20 +485,20 @@ discard block |
||
| 485 | 485 | throw ProcessException::wrongArgument(2002, ''); |
| 486 | 486 | } |
| 487 | 487 | //verifica se o evento pertence ao grupo indicado |
| 488 | - if (! in_array($evt->alias(), $this->grupos[$grupo])) { |
|
| 488 | + if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
|
| 489 | 489 | throw new \RuntimeException( |
| 490 | 490 | 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
| 491 | 491 | . $this->eventGroup[$grupo] . ' ].' |
| 492 | 492 | ); |
| 493 | 493 | } |
| 494 | 494 | $this->checkCertificate($evt); |
| 495 | - $xml .= "<evento id=\"".$evt->getId()."\">"; |
|
| 495 | + $xml .= "<evento id=\"" . $evt->getId() . "\">"; |
|
| 496 | 496 | $xml .= $evt->toXML(); |
| 497 | 497 | $xml .= "</evento>"; |
| 498 | 498 | } |
| 499 | 499 | //build request |
| 500 | 500 | $request = "<Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v" |
| 501 | - . $this->serviceVersion."\" >" |
|
| 501 | + . $this->serviceVersion . "\" >" |
|
| 502 | 502 | . "<loteEventos>" |
| 503 | 503 | . $xml |
| 504 | 504 | . "</loteEventos>" |