@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class eSocial EvtTSVTermino Event S-2399 constructor |
7 | - |
|
8 | 7 | * Read for 2.5.0 layout |
9 | 8 | * |
10 | 9 | * @category library |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class eSocial EvtIrrfBenef Event S-5002 constructor |
7 | - |
|
8 | 7 | * Read for 2.5.0 layout |
9 | 8 | * |
10 | 9 | * @category library |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Class eSocial EvtTSVAltContr Event S-2306 constructor |
7 | - |
|
8 | 7 | * Read for 2.5.0 layout |
9 | 8 | * |
10 | 9 | * @category library |
@@ -107,9 +107,9 @@ |
||
107 | 107 | * @var Certificate | null |
108 | 108 | */ |
109 | 109 | protected $certificate; |
110 | - /** |
|
111 | - * @var string |
|
112 | - */ |
|
110 | + /** |
|
111 | + * @var string |
|
112 | + */ |
|
113 | 113 | protected $method_name; |
114 | 114 | |
115 | 115 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | //set properties from config |
129 | 129 | $stdConf = json_decode($config); |
130 | 130 | $this->date = new DateTime(); |
131 | - if (! empty($date)) { |
|
131 | + if (!empty($date)) { |
|
132 | 132 | $this->date = new DateTime($date); |
133 | 133 | } |
134 | 134 | $this->tpAmb = $stdConf->tpAmb; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $this->nmRazao = $stdConf->empregador->nmRazao; |
140 | 140 | $this->layoutStr = $this->strLayoutVer($this->layout); |
141 | 141 | $this->certificate = $certificate; |
142 | - if (empty($std) || ! is_object($std)) { |
|
142 | + if (empty($std) || !is_object($std)) { |
|
143 | 143 | throw new \InvalidArgumentException( |
144 | 144 | 'Você deve passar os parâmetros num stdClass.' |
145 | 145 | ); |
@@ -191,15 +191,15 @@ discard block |
||
191 | 191 | //v02_05_00 |
192 | 192 | if (substr($layout, 0, 1) == 'S') { |
193 | 193 | $str = 'v_S_'; |
194 | - $fils = explode('.', substr($layout, 2, strlen($layout)-1)); |
|
194 | + $fils = explode('.', substr($layout, 2, strlen($layout) - 1)); |
|
195 | 195 | foreach ($fils as $fil) { |
196 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
196 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
197 | 197 | } |
198 | 198 | } else { |
199 | 199 | $fils = explode('.', $layout); |
200 | 200 | $str = 'v'; |
201 | 201 | foreach ($fils as $fil) { |
202 | - $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_'; |
|
202 | + $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_'; |
|
203 | 203 | } |
204 | 204 | } |
205 | 205 | return substr($str, 0, -1); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | protected function validInputData($data) |
234 | 234 | { |
235 | - if (! is_file($this->jsonschema)) { |
|
235 | + if (!is_file($this->jsonschema)) { |
|
236 | 236 | return true; |
237 | 237 | } |
238 | 238 | $errors = JsonValidation::validate($data, $this->jsonschema, $this->definitions); |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | } |
242 | 242 | $msg = ''; |
243 | 243 | foreach ($errors as $key => $error) { |
244 | - $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']). ";"; |
|
244 | + $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']) . ";"; |
|
245 | 245 | } |
246 | - $msg = substr($msg, 0, strlen($msg)-2); |
|
246 | + $msg = substr($msg, 0, strlen($msg) - 2); |
|
247 | 247 | throw new \Exception($msg); |
248 | 248 | } |
249 | 249 | |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | */ |
392 | 392 | public function standardizeProperties(stdClass $data) |
393 | 393 | { |
394 | - if (! is_file($this->jsonschema)) { |
|
394 | + if (!is_file($this->jsonschema)) { |
|
395 | 395 | return $data; |
396 | 396 | } |
397 | 397 | $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema)); |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | { |
407 | 407 | $xml = $this->dom->saveXML($this->eSocial); |
408 | 408 | $xml = Strings::clearXmlString($xml); |
409 | - if (! empty($this->certificate)) { |
|
409 | + if (!empty($this->certificate)) { |
|
410 | 410 | $xml = Signer::sign( |
411 | 411 | $this->certificate, |
412 | 412 | $xml, |