@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\Common\Certificate; |
19 | 19 | use NFePHP\eSocial\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; |
@@ -384,9 +384,9 @@ discard block |
||
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 |
||
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 |
||
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) { |
@@ -307,7 +307,7 @@ |
||
307 | 307 | * Set security protocol |
308 | 308 | * |
309 | 309 | * @param int $protocol |
310 | - * @return type Description |
|
310 | + * @return integer Description |
|
311 | 311 | */ |
312 | 312 | public function protocol($protocol = self::SSL_DEFAULT) |
313 | 313 | { |
@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\eSocial\Common\Factory; |
19 | 19 | use NFePHP\eSocial\Common\FactoryInterface; |
20 | -use NFePHP\eSocial\Common\FactoryId; |
|
21 | 20 | use NFePHP\Common\Certificate; |
22 | 21 | use stdClass; |
23 | 22 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | protected function getProperties( |
84 | 84 | \stdClass $schema, |
85 | 85 | \stdClass $data, |
86 | - \stdClass &$clone, |
|
86 | + \stdClass & $clone, |
|
87 | 87 | $keys, |
88 | 88 | $ref = '' |
89 | 89 | ) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | $this->getProperties($prop, $data, $clone, $keys, $ref); |
107 | 107 | } else { |
108 | - $comm = "\$clone->"; |
|
108 | + $comm = "\$clone->"; |
|
109 | 109 | $orig = "\$data->"; |
110 | 110 | if (!empty($ref)) { |
111 | 111 | $part = explode(':', $ref); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $orig .= "$p->"; |
116 | 116 | } |
117 | 117 | $exist = false; |
118 | - $test = "\$exist = (!empty(" . substr($orig, 0, strlen($orig)-2).")) ? true : false;"; |
|
118 | + $test = "\$exist = (!empty(" . substr($orig, 0, strlen($orig) - 2) . ")) ? true : false;"; |
|
119 | 119 | eval($test); |
120 | 120 | } |
121 | 121 | $orig .= $name; |
@@ -22,7 +22,7 @@ |
||
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 | } |
@@ -78,7 +78,7 @@ discard block |
||
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); |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | if ($this->proxyIP != '') { |
121 | 121 | curl_setopt($oCurl, CURLOPT_HTTPPROXYTUNNEL, 1); |
122 | 122 | curl_setopt($oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); |
123 | - curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP.':'.$this->proxyPort); |
|
123 | + curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP . ':' . $this->proxyPort); |
|
124 | 124 | if ($this->proxyUser != '') { |
125 | - curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser.':'.$this->proxyPass); |
|
125 | + curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser . ':' . $this->proxyPass); |
|
126 | 126 | curl_setopt($oCurl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); |
127 | 127 | } |
128 | 128 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * @param string $url |
42 | 42 | * @param string $action |
43 | 43 | * @param string $envelope |
44 | - * @param array $parameters |
|
44 | + * @param string[] $parameters |
|
45 | 45 | * @return string |
46 | 46 | * @throws \NFePHP\Common\Exception\SoapException |
47 | 47 | */ |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $html .= '<h2>body</h2>'; |
51 | 51 | $html .= str_replace( |
52 | 52 | ['<', '>'], |
53 | - ['<','>'], |
|
53 | + ['<', '>'], |
|
54 | 54 | str_replace( |
55 | 55 | '<?xml version="1.0"?>', |
56 | 56 | '<?xml version="1.0" encoding="UTF-8"?>', |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @var array |
85 | 85 | */ |
86 | 86 | protected $grupos = [ |
87 | - 1 => [ //EVENTOS INICIAIS grupo [1] |
|
87 | + 1 => [//EVENTOS INICIAIS grupo [1] |
|
88 | 88 | 'S-1000', |
89 | 89 | 'S-1005', |
90 | 90 | 'S-1010', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | 'S-1080', |
99 | 99 | 'S-2100' |
100 | 100 | ], |
101 | - 2 => [ //EVENTOS NÃO PERIÓDICOS grupo [2] |
|
101 | + 2 => [//EVENTOS NÃO PERIÓDICOS grupo [2] |
|
102 | 102 | 'S-2190', |
103 | 103 | 'S-2200', |
104 | 104 | 'S-2205', |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | 'S-5011', |
123 | 123 | 'S-5012' |
124 | 124 | ], |
125 | - 3 => [ //EVENTOS PERIÓDICOS grupo [3] |
|
125 | + 3 => [//EVENTOS PERIÓDICOS grupo [3] |
|
126 | 126 | 'S-1200', |
127 | 127 | 'S-1202', |
128 | 128 | 'S-1207', |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $this->path = realpath( |
168 | 168 | __DIR__ . '/../../' |
169 | - ).'/'; |
|
169 | + ) . '/'; |
|
170 | 170 | |
171 | 171 | $this->serviceXsd = XsdSeeker::seek( |
172 | 172 | $this->path . "schemes/comunicacao/$this->serviceStr/" |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $fils = explode('.', $version); |
184 | 184 | $str = 'v'; |
185 | 185 | foreach ($fils as $fil) { |
186 | - $str .= str_pad($fil, $length, '0', STR_PAD_LEFT). '_'; |
|
186 | + $str .= str_pad($fil, $length, '0', STR_PAD_LEFT) . '_'; |
|
187 | 187 | } |
188 | 188 | return substr($str, 0, -1); |
189 | 189 | } |
@@ -177,7 +177,6 @@ |
||
177 | 177 | /** |
178 | 178 | * Stringfy layout number |
179 | 179 | * |
180 | - * @param type $layout |
|
181 | 180 | * @return string |
182 | 181 | */ |
183 | 182 | protected function stringfyVersions($version, $length = 2) |
@@ -131,7 +131,7 @@ |
||
131 | 131 | //verifica se o evento pertence ao grupo indicado |
132 | 132 | if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
133 | 133 | throw new RuntimeException( |
134 | - 'O evento '. $evt->alias() . ' não pertence a este grupo [ ' |
|
134 | + 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
|
135 | 135 | . $this->eventGroup[$grupo] . ' ].' |
136 | 136 | ); |
137 | 137 | } |
@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use NFePHP\eSocial\Common\Factory; |
19 | 19 | use NFePHP\eSocial\Common\FactoryInterface; |
20 | -use NFePHP\eSocial\Common\FactoryId; |
|
21 | 20 | use NFePHP\Common\Certificate; |
22 | 21 | use stdClass; |
23 | 22 |