@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | //set properties from config |
148 | 148 | $stdConf = json_decode($config); |
149 | 149 | $this->date = new DateTime(); |
150 | - if (! empty($date)) { |
|
150 | + if (!empty($date)) { |
|
151 | 151 | $this->date = new DateTime($date); |
152 | 152 | } |
153 | 153 | $this->tpAmb = $stdConf->tpAmb; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $this->nmRazao = $stdConf->empregador->nmRazao; |
159 | 159 | $this->layoutStr = $this->strLayoutVer($this->layout); |
160 | 160 | $this->certificate = $certificate; |
161 | - if (empty($std) || ! is_object($std)) { |
|
161 | + if (empty($std) || !is_object($std)) { |
|
162 | 162 | throw new \InvalidArgumentException( |
163 | 163 | 'Você deve passar os parâmetros num stdClass.' |
164 | 164 | ); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | .$this->evtName |
170 | 170 | .".schema" |
171 | 171 | ); |
172 | - $this->schema = realpath( |
|
172 | + $this->schema = realpath( |
|
173 | 173 | __DIR__ |
174 | 174 | ."/../../schemes/$this->layoutStr/" |
175 | 175 | .$this->evtName |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $fils = explode('.', $layout); |
199 | 199 | $str = 'v'; |
200 | 200 | foreach ($fils as $fil) { |
201 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
201 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | return substr($str, 0, -1); |
@@ -236,12 +236,12 @@ discard block |
||
236 | 236 | */ |
237 | 237 | protected function validInputData($data) |
238 | 238 | { |
239 | - if (! is_file($this->jsonschema)) { |
|
239 | + if (!is_file($this->jsonschema)) { |
|
240 | 240 | return true; |
241 | 241 | } |
242 | 242 | $validator = new JsonValid(); |
243 | - $validator->check($data, (object) ['$ref' => 'file://'.$this->jsonschema]); |
|
244 | - if (! $validator->isValid()) { |
|
243 | + $validator->check($data, (object) ['$ref' => 'file://' . $this->jsonschema]); |
|
244 | + if (!$validator->isValid()) { |
|
245 | 245 | $msg = "JSON does not validate. Violations:\n"; |
246 | 246 | foreach ($validator->getErrors() as $error) { |
247 | 247 | $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | */ |
399 | 399 | public function standardizeProperties(stdClass $data) |
400 | 400 | { |
401 | - if (! is_file($this->jsonschema)) { |
|
401 | + if (!is_file($this->jsonschema)) { |
|
402 | 402 | return $data; |
403 | 403 | } |
404 | 404 | $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema)); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | { |
415 | 415 | $xml = $this->dom->saveXML($this->eSocial); |
416 | 416 | $xml = Strings::clearXmlString($xml); |
417 | - if (! empty($this->certificate)) { |
|
417 | + if (!empty($this->certificate)) { |
|
418 | 418 | $xml = Signer::sign( |
419 | 419 | $this->certificate, |
420 | 420 | $xml, |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | public static function prettyPrint($response, $save = '') |
8 | 8 | { |
9 | 9 | $std = json_decode($response); |
10 | - if (! empty($save)) { |
|
10 | + if (!empty($save)) { |
|
11 | 11 | file_put_contents( |
12 | 12 | "/var/www/sped/sped-nfe/tests/fixtures/xml/$save.xml", |
13 | 13 | $std->body |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $html .= $std->header; |
43 | 43 | $html .= "<br>"; |
44 | 44 | $html .= '<h2>namespaces</h2>'; |
45 | - $an = json_decode(json_encode($std->namespaces), true); |
|
45 | + $an = json_decode(json_encode($std->namespaces), true); |
|
46 | 46 | foreach ($an as $key => $nam) { |
47 | 47 | $html .= "[$key] => $nam <br>"; |
48 | 48 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | protected function toNode() |
67 | 67 | { |
68 | - $evtid = FactoryId::build( |
|
68 | + $evtid = FactoryId::build( |
|
69 | 69 | $this->tpInsc, |
70 | 70 | $this->nrInsc, |
71 | 71 | $this->date, |