@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public function __construct($config, Certificate $certificate) |
119 | 119 | { |
120 | 120 | parent::__construct($config, $certificate); |
121 | - $this->xsdassincrono = __DIR__.'/../schemes/v2_01_01/envioLoteEventosAssincrono-v1_00_00.xsd'; |
|
121 | + $this->xsdassincrono = __DIR__ . '/../schemes/v2_01_01/envioLoteEventosAssincrono-v1_00_00.xsd'; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $properties = [ |
290 | 290 | 'perapur' => [ |
291 | 291 | 'required' => false, |
292 | - 'type' => ['string',"null"], |
|
292 | + 'type' => ['string', "null"], |
|
293 | 293 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
294 | 294 | ], |
295 | 295 | 'tpinscestab' => [ |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | . "<sped:tpInsc>{$this->tpInsc}</sped:tpInsc>" |
319 | 319 | . "<sped:nrInsc>{$this->doc}</sped:nrInsc>"; |
320 | 320 | if (!empty($std->perapur)) { |
321 | - $request .= "<sped:perApur>{$std->perapur}</sped:perApur>"; |
|
321 | + $request .= "<sped:perApur>{$std->perapur}</sped:perApur>"; |
|
322 | 322 | } |
323 | 323 | $request .= "<sped:tpInscEstab>{$std->tpinscestab}</sped:tpInscEstab>" |
324 | 324 | . "<sped:nrInscEstab>" |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $properties = [ |
343 | 343 | 'perapur' => [ |
344 | 344 | 'required' => false, |
345 | - 'type' => ['string',"null"], |
|
345 | + 'type' => ['string', "null"], |
|
346 | 346 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
347 | 347 | ], |
348 | 348 | 'nrinscestabprest' => [ |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $properties = [ |
394 | 394 | 'perapur' => [ |
395 | 395 | 'required' => false, |
396 | - 'type' => ['string',"null"], |
|
396 | + 'type' => ['string', "null"], |
|
397 | 397 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
398 | 398 | ], |
399 | 399 | 'nrinscestab' => [ |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | $properties = [ |
437 | 437 | 'perapur' => [ |
438 | 438 | 'required' => false, |
439 | - 'type' => ['string',"null"], |
|
439 | + 'type' => ['string', "null"], |
|
440 | 440 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
441 | 441 | ], |
442 | 442 | 'nrinscestab' => [ |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | $properties = [ |
482 | 482 | 'perapur' => [ |
483 | 483 | 'required' => false, |
484 | - 'type' => ['string',"null"], |
|
484 | + 'type' => ['string', "null"], |
|
485 | 485 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
486 | 486 | ], |
487 | 487 | 'nrinscestabprest' => [ |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | $properties = [ |
532 | 532 | 'perapur' => [ |
533 | 533 | 'required' => false, |
534 | - 'type' => ['string',"null"], |
|
534 | + 'type' => ['string', "null"], |
|
535 | 535 | 'regex' => '^(19[0-9][0-9]|2[0-9][0-9][0-9])[-](0?[1-9]|1[0-2])$' |
536 | 536 | ], |
537 | 537 | ]; |
@@ -615,20 +615,20 @@ discard block |
||
615 | 615 | throw ProcessException::wrongArgument(2002, ''); |
616 | 616 | } |
617 | 617 | //verifica se o evento pertence ao grupo indicado |
618 | - if (! in_array($evt->alias(), $this->grupos[$grupo])) { |
|
618 | + if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
|
619 | 619 | throw new \RuntimeException( |
620 | 620 | 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
621 | 621 | . $this->eventGroup[$grupo] . ' ].' |
622 | 622 | ); |
623 | 623 | } |
624 | 624 | $this->checkCertificate($evt); |
625 | - $xml .= "<evento id=\"".$evt->getId()."\">"; |
|
625 | + $xml .= "<evento id=\"" . $evt->getId() . "\">"; |
|
626 | 626 | $xml .= $evt->toXML(); |
627 | 627 | $xml .= "</evento>"; |
628 | 628 | } |
629 | 629 | //build request |
630 | 630 | $request = "<Reinf xmlns=\"http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v" |
631 | - . $this->serviceVersion."\" >" |
|
631 | + . $this->serviceVersion . "\" >" |
|
632 | 632 | . "<loteEventos>" |
633 | 633 | . $xml |
634 | 634 | . "</loteEventos>" |
@@ -670,14 +670,14 @@ discard block |
||
670 | 670 | throw ProcessException::wrongArgument(2002, ''); |
671 | 671 | } |
672 | 672 | //verifica se o evento pertence ao grupo indicado |
673 | - if (! in_array($evt->alias(), $this->grupos[$grupo])) { |
|
673 | + if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
|
674 | 674 | throw new \RuntimeException( |
675 | 675 | 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
676 | 676 | . $this->eventGroup[$grupo] . ' ].' |
677 | 677 | ); |
678 | 678 | } |
679 | 679 | $this->checkCertificate($evt); |
680 | - $xml .= "<evento Id=\"".$evt->getId()."\">"; |
|
680 | + $xml .= "<evento Id=\"" . $evt->getId() . "\">"; |
|
681 | 681 | $xml .= $evt->toXML(); |
682 | 682 | $xml .= "</evento>"; |
683 | 683 | } |