@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $this->dom->addChild( |
| 107 | 107 | $ide, |
| 108 | 108 | "fimValid", |
| 109 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
| 109 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
| 110 | 110 | false |
| 111 | 111 | ); |
| 112 | 112 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $this->dom->addChild( |
| 182 | 182 | $nova, |
| 183 | 183 | "fimValid", |
| 184 | - ! empty($this->std->novavalidade->fimvalid) |
|
| 184 | + !empty($this->std->novavalidade->fimvalid) |
|
| 185 | 185 | ? $this->std->novavalidade->fimvalid |
| 186 | 186 | : null, |
| 187 | 187 | false |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | } elseif ($this->std->modo == 'ALT') { |
| 198 | 198 | $node = $this->dom->createElement("alteracao"); |
| 199 | 199 | $node->appendChild($ide); |
| 200 | - isset($dados) ? $node->appendChild($dados): null; |
|
| 201 | - isset($nova) ? $node->appendChild($nova): null; |
|
| 200 | + isset($dados) ? $node->appendChild($dados) : null; |
|
| 201 | + isset($nova) ? $node->appendChild($nova) : null; |
|
| 202 | 202 | } else { |
| 203 | 203 | $node = $this->dom->createElement("exclusao"); |
| 204 | 204 | $node->appendChild($ide); |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | $this->dom->addChild( |
| 124 | 124 | $ide, |
| 125 | 125 | "email", |
| 126 | - ! empty($this->std->email) ? $this->std->email : null, |
|
| 126 | + !empty($this->std->email) ? $this->std->email : null, |
|
| 127 | 127 | false |
| 128 | 128 | ); |
| 129 | 129 | $this->node->appendChild($ide); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $this->dom->addChild( |
| 106 | 106 | $ide, |
| 107 | 107 | "fimValid", |
| 108 | - ! empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
| 108 | + !empty($this->std->fimvalid) ? $this->std->fimvalid : null, |
|
| 109 | 109 | false |
| 110 | 110 | ); |
| 111 | 111 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $this->dom->addChild( |
| 172 | 172 | $nova, |
| 173 | 173 | "fimValid", |
| 174 | - ! empty($this->std->novavalidade->fimvalid) |
|
| 174 | + !empty($this->std->novavalidade->fimvalid) |
|
| 175 | 175 | ? $this->std->novavalidade->fimvalid |
| 176 | 176 | : null, |
| 177 | 177 | false |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $this->dom->addChild( |
| 122 | 122 | $ideRespInf, |
| 123 | 123 | "email", |
| 124 | - ! empty($this->std->iderespinf->email) ? $this->std->iderespinf->email : null, |
|
| 124 | + !empty($this->std->iderespinf->email) ? $this->std->iderespinf->email : null, |
|
| 125 | 125 | false |
| 126 | 126 | ); |
| 127 | 127 | $this->node->appendChild($ideRespInf); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $this->dom->addChild( |
| 167 | 167 | $infoFech, |
| 168 | 168 | "compSemMovto", |
| 169 | - ! empty($this->std->infofech->compsemmovto) ? $this->std->infofech->compsemmovto : null, |
|
| 169 | + !empty($this->std->infofech->compsemmovto) ? $this->std->infofech->compsemmovto : null, |
|
| 170 | 170 | false |
| 171 | 171 | ); |
| 172 | 172 | $this->node->appendChild($infoFech); |
@@ -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, |