Completed
Push — master ( a41bca...d54f6c )
by Giancarlos
02:37
created
src/Greenter/Ws/Services/FeSunat.php 3 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,10 @@  discard block
 block discarded – undo
24 24
     const PRODUCCION = 'https://e-factura.sunat.gob.pe/ol-ti-itcpfegem/billService';
25 25
     const WSDL_ENDPOINT = 'https://e-beta.sunat.gob.pe/ol-ti-itcpfegem-beta/billService?wsdl';
26 26
 
27
+    /**
28
+     * @param string $user
29
+     * @param string $password
30
+     */
27 31
     public function __construct($user, $password)
28 32
     {
29 33
         parent::__construct($user, $password);
@@ -32,7 +36,7 @@  discard block
 block discarded – undo
32 36
 
33 37
     /**
34 38
      * @param $filename
35
-     * @param $content
39
+     * @param string $content
36 40
      * @return BillResult
37 41
      */
38 42
     public function send($filename, $content)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 'fileName' => $filename,
46 46
                 'contentFile' => $content,
47 47
             ];
48
-            $response = $client->__soapCall('sendBill', [ 'parameters' => $params ]);
48
+            $response = $client->__soapCall('sendBill', ['parameters' => $params]);
49 49
 
50 50
             $cdrZip = $response->applicationResponse;
51 51
             $result
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 'fileName' => $filename,
70 70
                 'contentFile' => $content,
71 71
             ];
72
-            $response = $client->__soapCall('sendSummary', [ 'parameters' => $params ]);
72
+            $response = $client->__soapCall('sendSummary', ['parameters' => $params]);
73 73
             return $response->ticket;
74 74
         }
75 75
         catch (\Exception $e) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $params = [
87 87
                 'ticket' => $ticket,
88 88
             ];
89
-            $response = $client->__soapCall('getStatus', [ 'parameters' => $params ]);
89
+            $response = $client->__soapCall('getStatus', ['parameters' => $params]);
90 90
             return $response->statusResponse;
91 91
         }
92 92
         catch (\SoapFault $fault) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
                 ->setCdrResponse($this->extractResponse($cdrZip))
53 53
                 ->setCdrZip($cdrZip)
54 54
                 ->setSuccess(true);
55
-        }
56
-        catch (\SoapFault $e) {
55
+        } catch (\SoapFault $e) {
57 56
             $result->setError($this->getErrorFromFault($e));
58 57
         }
59 58
 
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
             ];
72 71
             $response = $client->__soapCall('sendSummary', [ 'parameters' => $params ]);
73 72
             return $response->ticket;
74
-        }
75
-        catch (\Exception $e) {
73
+        } catch (\Exception $e) {
76 74
             // $client->__getLastResponse()
77 75
             return $e->getMessage();
78 76
         }
@@ -88,8 +86,7 @@  discard block
 block discarded – undo
88 86
             ];
89 87
             $response = $client->__soapCall('getStatus', [ 'parameters' => $params ]);
90 88
             return $response->statusResponse;
91
-        }
92
-        catch (\SoapFault $fault) {
89
+        } catch (\SoapFault $fault) {
93 90
             // $client->__getLastResponse()
94 91
             // $fault->faultstring;
95 92
             return $fault->faultcode;
Please login to merge, or discard this patch.
src/Greenter/Helper/ZipHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function decompress($zipContent, $fileToExtract)
42 42
     {
43
-        $temp = tempnam(sys_get_temp_dir(),time() . '.zip');
43
+        $temp = tempnam(sys_get_temp_dir(), time() . '.zip');
44 44
         file_put_contents($temp, $zipContent);
45 45
         $zip = new ZipArchive;
46 46
         $output = "";
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function decompressLastFile($zipContent)
63 63
     {
64
-        $temp = tempnam(sys_get_temp_dir(),time() . '.zip');
64
+        $temp = tempnam(sys_get_temp_dir(), time() . '.zip');
65 65
         file_put_contents($temp, $zipContent);
66 66
         $zip = new ZipArchive;
67 67
         $output = "";
Please login to merge, or discard this patch.