Completed
Pull Request — master (#75)
by
unknown
38s
created
lib/Sii.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             \sasco\LibreDTE\Log::write(Estado::REQUEST_ERROR_SOAP, Estado::get(Estado::REQUEST_ERROR_SOAP, $msg));
537 537
             return false;
538 538
         }
539
-        for ($i=0; $i<$retry; $i++) {
539
+        for ($i = 0; $i<$retry; $i++) {
540 540
             try {
541 541
                 if ($args) {
542 542
                     $body = call_user_func_array([$soap, $request], $args);
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
             $dte = '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n".$dte;
606 606
         }
607 607
         do {
608
-            $file = sys_get_temp_dir().'/dte_'.md5(microtime().$token.$dte).'.'.($gzip?'gz':'xml');
608
+            $file = sys_get_temp_dir().'/dte_'.md5(microtime().$token.$dte).'.'.($gzip ? 'gz' : 'xml');
609 609
         } while (file_exists($file));
610 610
         if ($gzip) {
611 611
             $dte = gzencode($dte);
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
             curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
656 656
         }
657 657
         // enviar XML al SII
658
-        for ($i=0; $i<=$retry; $i++) {
658
+        for ($i = 0; $i<=$retry; $i++) {
659 659
             $response = curl_exec($curl);
660 660
             if ($response and $response!='Error 500') {
661 661
                 break;
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
         if ($xml->STATUS!=0) {
685 685
             \sasco\LibreDTE\Log::write(
686 686
                 $xml->STATUS,
687
-                Estado::get($xml->STATUS).(isset($xml->DETAIL)?'. '.implode("\n", (array)$xml->DETAIL->ERROR):'')
687
+                Estado::get($xml->STATUS).(isset($xml->DETAIL) ? '. '.implode("\n", (array)$xml->DETAIL->ERROR) : '')
688 688
             );
689 689
         }
690 690
         return $xml;
Please login to merge, or discard this patch.