Test Failed
Push — master ( 78ef9f...88ea0f )
by Roberto
03:12 queued 11s
created
src/Common/JsonValidation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         if (!is_file($jsonschema) || !is_file($definitions)) {
19 19
             return [];
20 20
         }
21
-        $jsonSchemaObject = json_decode((string)file_get_contents($jsonschema));
21
+        $jsonSchemaObject = json_decode((string) file_get_contents($jsonschema));
22 22
         $schemaStorage = new SchemaStorage();
23 23
         $schemaStorage->addSchema("file:{$definitions}", $jsonSchemaObject);
24 24
         $jsonValidator = new Validator(new Factory($schemaStorage));
Please login to merge, or discard this patch.
src/Common/Factory.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         //set properties from config
125 125
         $stdConf    = json_decode($config);
126 126
         $this->date = new DateTime();
127
-        if (! empty($date)) {
127
+        if (!empty($date)) {
128 128
             $this->date = new DateTime($date);
129 129
         }
130 130
         $this->tpAmb = $stdConf->tpAmb;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $this->nmRazao = $stdConf->empregador->nmRazao;
136 136
         $this->layoutStr = $this->strLayoutVer($this->layout);
137 137
         $this->certificate = $certificate;
138
-        if (empty($std) || ! is_object($std)) {
138
+        if (empty($std) || !is_object($std)) {
139 139
             throw new \InvalidArgumentException(
140 140
                 'Você deve passar os parâmetros num stdClass.'
141 141
             );
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
         //v02_05_00
185 185
         if (substr($layout, 0, 1) == 'S') {
186 186
             $str  = 'v_S_';
187
-            $fils = explode('.', substr($layout, 2, strlen($layout)-1));
187
+            $fils = explode('.', substr($layout, 2, strlen($layout) - 1));
188 188
             foreach ($fils as $fil) {
189
-                $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_';
189
+                $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_';
190 190
             }
191 191
         } else {
192 192
             $fils = explode('.', $layout);
193 193
             $str  = 'v';
194 194
             foreach ($fils as $fil) {
195
-                $str .= str_pad($fil, 2, '0', STR_PAD_LEFT).'_';
195
+                $str .= str_pad($fil, 2, '0', STR_PAD_LEFT) . '_';
196 196
             }
197 197
         }
198 198
         return substr($str, 0, -1);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     protected function validInputData($data)
227 227
     {
228
-        if (! is_file($this->jsonschema)) {
228
+        if (!is_file($this->jsonschema)) {
229 229
             return true;
230 230
         }
231 231
         $errors = JsonValidation::validate($data, $this->jsonschema, $this->definitions);
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
         }
235 235
         $msg = '';
236 236
         foreach ($errors as $key => $error) {
237
-            $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']). ";";
237
+            $msg .= sprintf("[%s] %s\n", $error['property'], $error['message']) . ";";
238 238
         }
239
-        $msg = substr($msg, 0, strlen($msg)-2);
239
+        $msg = substr($msg, 0, strlen($msg) - 2);
240 240
         throw new \Exception($msg);
241 241
         /*
242 242
         $validator = new JsonValid();
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
      */
387 387
     public function standardizeProperties(stdClass $data)
388 388
     {
389
-        if (! is_file($this->jsonschema)) {
389
+        if (!is_file($this->jsonschema)) {
390 390
             return $data;
391 391
         }
392 392
         $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema));
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
     {
402 402
         $xml = $this->dom->saveXML($this->eSocial);
403 403
         $xml = Strings::clearXmlString($xml);
404
-        if (! empty($this->certificate)) {
404
+        if (!empty($this->certificate)) {
405 405
             $xml = Signer::sign(
406 406
                 $this->certificate,
407 407
                 $xml,
Please login to merge, or discard this patch.
src/Factories/EvtInfoEmpregador.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
                 );
282 282
                 $infoCadastro->appendChild($info);
283 283
             }
284
-            if (isset($this->std->infoop)  && !empty($infoCadastro)) {
285
-                $cad  = $this->std->infoop;
284
+            if (isset($this->std->infoop) && !empty($infoCadastro)) {
285
+                $cad = $this->std->infoop;
286 286
                 $infoOP = $this->dom->createElement("infoOP");
287 287
                 $this->dom->addChild(
288 288
                     $infoOP,
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                     true
292 292
                 );
293 293
                 if (isset($this->std->infoefr)) {
294
-                    $cad  = $this->std->infoefr;
294
+                    $cad = $this->std->infoefr;
295 295
                     $infoEFR = $this->dom->createElement("infoEFR");
296 296
                     $this->dom->addChild(
297 297
                         $infoEFR,
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
                     $infoOP->appendChild($infoEFR);
309 309
                 }
310 310
                 if (isset($this->std->infoente)) {
311
-                    $cad  = $this->std->infoente;
311
+                    $cad = $this->std->infoente;
312 312
                     $infoEnte = $this->dom->createElement("infoEnte");
313 313
                     $this->dom->addChild(
314 314
                         $infoEnte,
Please login to merge, or discard this patch.