Completed
Branch master (709945)
by Roberto
10:22 queued 07:58
created
src/Common/Soap/SoapBase.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -294,7 +294,7 @@
 block discarded – undo
294 294
     /**
295 295
      * Set security protocol
296 296
      * @param int $protocol
297
-     * @return type Description
297
+     * @return integer Description
298 298
      */
299 299
     public function protocol($protocol = self::SSL_DEFAULT)
300 300
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 
18 18
 use NFePHP\Common\Certificate;
19 19
 use NFePHP\EFDReinf\Common\Soap\SoapInterface;
20
-use NFePHP\Common\Exception\SoapException;
21 20
 use NFePHP\Common\Exception\RuntimeException;
22 21
 use NFePHP\Common\Strings;
23 22
 use League\Flysystem\Filesystem;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
             );
385 385
         }
386 386
         $this->certsdir = $this->certificate->getCnpj() . '/certs/';
387
-        $this->prifile = $this->certsdir. Strings::randomString(10).'.pem';
388
-        $this->pubfile = $this->certsdir . Strings::randomString(10).'.pem';
389
-        $this->certfile = $this->certsdir . Strings::randomString(10).'.pem';
387
+        $this->prifile = $this->certsdir . Strings::randomString(10) . '.pem';
388
+        $this->pubfile = $this->certsdir . Strings::randomString(10) . '.pem';
389
+        $this->certfile = $this->certsdir . Strings::randomString(10) . '.pem';
390 390
         $ret = true;
391 391
         $private = $this->certificate->privateKey;
392 392
         if ($this->encriptPrivateKey) {
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         );
412 412
         $ret &= $this->filesystem->put(
413 413
             $this->certfile,
414
-            $private."{$this->certificate}"
414
+            $private . "{$this->certificate}"
415 415
         );
416 416
         if (!$ret) {
417 417
             throw new RuntimeException(
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
         //utilize a API. Outra solução para remover arquivos "perdidos" pode ser
438 438
         //encontrada oportunamente.
439 439
         $dt = new \DateTime();
440
-        $tint = new \DateInterval("PT".$this->waitingTime."M");
440
+        $tint = new \DateInterval("PT" . $this->waitingTime . "M");
441 441
         $tint->invert = true;
442 442
         $tsLimit = $dt->add($tint)->getTimestamp();
443 443
         foreach ($contents as $item) {
Please login to merge, or discard this patch.
src/Common/Soap/SoapCurl.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      * @param string $url
40 40
      * @param string $action
41 41
      * @param string $envelope
42
-     * @param array $parameters
42
+     * @param string[] $parameters
43 43
      * @return string
44 44
      * @throws \NFePHP\Common\Exception\SoapException
45 45
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 curl_setopt($oCurl, CURLOPT_KEYPASSWD, $this->temppass);
79 79
             }
80 80
             curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, true);
81
-            if (! empty($envelope)) {
81
+            if (!empty($envelope)) {
82 82
                 curl_setopt($oCurl, CURLOPT_POST, true);
83 83
                 curl_setopt($oCurl, CURLOPT_POSTFIELDS, $envelope);
84 84
                 curl_setopt($oCurl, CURLOPT_HTTPHEADER, $parameters);
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
         if ($this->proxyIP != '') {
160 160
             curl_setopt($oCurl, CURLOPT_HTTPPROXYTUNNEL, 1);
161 161
             curl_setopt($oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
162
-            curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP.':'.$this->proxyPort);
162
+            curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP . ':' . $this->proxyPort);
163 163
             if ($this->proxyUser != '') {
164
-                curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser.':'.$this->proxyPass);
164
+                curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser . ':' . $this->proxyPass);
165 165
                 curl_setopt($oCurl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
166 166
             }
167 167
         }
Please login to merge, or discard this patch.
src/Common/Soap/SoapInterface.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,24 +33,28 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      *
35 35
      * @param Certificate $certificate
36
+     * @return void
36 37
      */
37 38
     public function loadCertificate(Certificate $certificate);
38 39
     
39 40
     /**
40 41
      * Set logger class
41 42
      * @param LoggerInterface $logger
43
+     * @return LoggerInterface
42 44
      */
43 45
     public function loadLogger(LoggerInterface $logger);
44 46
     
45 47
     /**
46 48
      * Set timeout for connection
47 49
      * @param int $timesecs
50
+     * @return integer
48 51
      */
49 52
     public function timeout($timesecs);
50 53
     
51 54
     /**
52 55
      * Set security protocol for soap communications
53 56
      * @param int $protocol
57
+     * @return integer
54 58
      */
55 59
     public function protocol($protocol = self::SSL_DEFAULT);
56 60
     
@@ -60,6 +64,7 @@  discard block
 block discarded – undo
60 64
      * @param int $port
61 65
      * @param string $user
62 66
      * @param string $password
67
+     * @return void
63 68
      */
64 69
     public function proxy($ip, $port, $user, $password);
65 70
     
@@ -70,7 +75,6 @@  discard block
 block discarded – undo
70 75
      * @param string $action
71 76
      * @param string $envelope
72 77
      * @param array $parameters
73
-     * @param string $request
74 78
      */
75 79
     public function send(
76 80
         $operation,
Please login to merge, or discard this patch.
src/Common/Soap/SoapCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 {
23 23
     public static function info($code)
24 24
     {
25
-        $codes = (array) json_decode(file_get_contents(__DIR__.'/httpcodes.json'), true);
25
+        $codes = (array) json_decode(file_get_contents(__DIR__ . '/httpcodes.json'), true);
26 26
         if (array_key_exists($code, $codes)) {
27 27
             return $codes[$code];
28 28
         }
Please login to merge, or discard this patch.
src/Common/FakePretty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $html .= '<h2>body</h2>';
51 51
         $html .= str_replace(
52 52
             ['<', '>'],
53
-            ['&lt;','&gt;'],
53
+            ['&lt;', '&gt;'],
54 54
             str_replace(
55 55
                 '<?xml version="1.0"?>',
56 56
                 '<?xml version="1.0" encoding="UTF-8"?>',
Please login to merge, or discard this patch.
src/Common/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
         
96 96
         $this->path = realpath(
97 97
             __DIR__ . '/../../'
98
-        ).'/';
98
+        ) . '/';
99 99
         
100 100
         $this->serviceXsd = XsdSeeker::seek(
101 101
             $this->path . "schemes/comunicacao/$this->serviceVersion/"
Please login to merge, or discard this patch.
src/Common/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
             return true;
217 217
         }
218 218
         $validator = new JsonValid();
219
-        $validator->check($data, (object)['$ref' => 'file://' . $this->jsonschema]);
219
+        $validator->check($data, (object) ['$ref' => 'file://' . $this->jsonschema]);
220 220
         if (!$validator->isValid()) {
221 221
             $msg = "JSON does not validate. Violations:\n";
222 222
             foreach ($validator->getErrors() as $error) {
Please login to merge, or discard this patch.