@@ -80,7 +80,7 @@ |
||
80 | 80 | * @param string $action |
81 | 81 | * @param string $envelope |
82 | 82 | * @param array $parameters |
83 | - */ |
|
83 | + */ |
|
84 | 84 | public function send( |
85 | 85 | $operation, |
86 | 86 | $url, |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | public static function prettyPrint($response, $save = '') |
14 | 14 | { |
15 | 15 | $std = json_decode($response); |
16 | - if (! empty($save)) { |
|
16 | + if (!empty($save)) { |
|
17 | 17 | file_put_contents( |
18 | 18 | "$save.xml", |
19 | 19 | $std->body |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $html .= $std->header; |
47 | 47 | $html .= "<br>"; |
48 | 48 | $html .= '<h2>namespaces</h2>'; |
49 | - $an = json_decode(json_encode($std->namespaces), true); |
|
49 | + $an = json_decode(json_encode($std->namespaces), true); |
|
50 | 50 | foreach ($an as $key => $nam) { |
51 | 51 | $html .= "[$key] => $nam <br>"; |
52 | 52 | } |
@@ -194,7 +194,7 @@ |
||
194 | 194 | } |
195 | 195 | foreach ($eventos as $evt) { |
196 | 196 | //verifica se o evento pertence ao grupo indicado |
197 | - if (! in_array($evt->alias(), $this->grupos[$grupo])) { |
|
197 | + if (!in_array($evt->alias(), $this->grupos[$grupo])) { |
|
198 | 198 | throw new RuntimeException( |
199 | 199 | 'O evento ' . $evt->alias() . ' não pertence a este grupo [ ' |
200 | 200 | . $this->eventGroup[$grupo] . ' ].' |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $this->dom->addChild( |
77 | 77 | $ideEvento, |
78 | 78 | "nrRecibo", |
79 | - ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
79 | + !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null, |
|
80 | 80 | false |
81 | 81 | ); |
82 | 82 | $this->dom->addChild( |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | //set properties from config |
121 | 121 | $stdConf = json_decode($config); |
122 | 122 | $this->date = new DateTime(); |
123 | - if (! empty($date)) { |
|
123 | + if (!empty($date)) { |
|
124 | 124 | $this->date = new DateTime($date); |
125 | 125 | } |
126 | 126 | $this->tpAmb = $stdConf->tpAmb; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->nmRazao = $stdConf->empregador->nmRazao; |
132 | 132 | $this->layoutStr = $this->strLayoutVer($this->layout); |
133 | 133 | $this->certificate = $certificate; |
134 | - if (empty($std) || ! is_object($std)) { |
|
134 | + if (empty($std) || !is_object($std)) { |
|
135 | 135 | throw new \InvalidArgumentException( |
136 | 136 | 'Você deve passar os parâmetros num stdClass.' |
137 | 137 | ); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $fils = explode('.', $layout); |
170 | 170 | $str = 'v'; |
171 | 171 | foreach ($fils as $fil) { |
172 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
172 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
173 | 173 | } |
174 | 174 | return substr($str, 0, -1); |
175 | 175 | } |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | */ |
202 | 202 | protected function validInputData($data) |
203 | 203 | { |
204 | - if (! is_file($this->jsonschema)) { |
|
204 | + if (!is_file($this->jsonschema)) { |
|
205 | 205 | return true; |
206 | 206 | } |
207 | 207 | $validator = new JsonValid(); |
208 | - $validator->check($data, (object) ['$ref' => 'file://'.$this->jsonschema]); |
|
209 | - if (! $validator->isValid()) { |
|
208 | + $validator->check($data, (object) ['$ref' => 'file://' . $this->jsonschema]); |
|
209 | + if (!$validator->isValid()) { |
|
210 | 210 | $msg = "JSON does not validate. Violations:\n"; |
211 | 211 | foreach ($validator->getErrors() as $error) { |
212 | 212 | $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | */ |
364 | 364 | public function standardizeProperties(stdClass $data) |
365 | 365 | { |
366 | - if (! is_file($this->jsonschema)) { |
|
366 | + if (!is_file($this->jsonschema)) { |
|
367 | 367 | return $data; |
368 | 368 | } |
369 | 369 | $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema)); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | { |
379 | 379 | $xml = $this->dom->saveXML($this->eSocial); |
380 | 380 | $xml = Strings::clearXmlString($xml); |
381 | - if (! empty($this->certificate)) { |
|
381 | + if (!empty($this->certificate)) { |
|
382 | 382 | $xml = Signer::sign( |
383 | 383 | $this->certificate, |
384 | 384 | $xml, |