Passed
Pull Request — master (#134)
by Roberto
03:15
created
src/Factories/EvtCAT.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 
18 18
 use NFePHP\Common\Certificate;
19 19
 use NFePHP\eSocial\Common\Factory;
20
-use NFePHP\eSocial\Common\FactoryId;
21 20
 use NFePHP\eSocial\Common\FactoryInterface;
22 21
 use stdClass;
23 22
 
Please login to merge, or discard this patch.
src/Factories/EvtPgtos.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 
18 18
 use NFePHP\Common\Certificate;
19 19
 use NFePHP\eSocial\Common\Factory;
20
-use NFePHP\eSocial\Common\FactoryId;
21 20
 use NFePHP\eSocial\Common\FactoryInterface;
22 21
 use stdClass;
23 22
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -537,8 +537,8 @@
 block discarded – undo
537 537
                         true
538 538
                     );
539 539
                     foreach ($pgant->infopgtoant as $ipa) {
540
-                       //echo "<pre>";
541
-                       //print_r($ipa);
540
+                        //echo "<pre>";
541
+                        //print_r($ipa);
542 542
                     //echo "</pre>";
543 543
                     //die;
544 544
                         $infoPgtoAnt = $this->dom->createElement("infoPgtoAnt");
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->dom->addChild(
79 79
             $ideEvento,
80 80
             "nrRecibo",
81
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
81
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
82 82
             false
83 83
         );
84 84
         $this->dom->addChild(
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                     );
189 189
                     if (!empty($pgtofl->retpgtotot)) {
190 190
                         foreach ($pgtofl->retpgtotot as $pg) {
191
-                            $retPgtoTot  = $this->dom->createElement("retPgtoTot");
191
+                            $retPgtoTot = $this->dom->createElement("retPgtoTot");
192 192
                             $this->dom->addChild(
193 193
                                 $retPgtoTot,
194 194
                                 "codRubr",
Please login to merge, or discard this patch.
src/Common/Factory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             );
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             .$this->evtName
143 143
             .".schema"
144 144
         );
145
-        $this->schema     = realpath(
145
+        $this->schema = realpath(
146 146
             __DIR__
147 147
             ."/../../schemes/$this->layoutStr/"
148 148
             .$this->evtName
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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']);
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function standardizeProperties(stdClass $data)
366 366
     {
367
-        if (! is_file($this->jsonschema)) {
367
+        if (!is_file($this->jsonschema)) {
368 368
             return $data;
369 369
         }
370 370
         $jsonSchemaObj = json_decode(file_get_contents($this->jsonschema));
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     {
381 381
         $xml = $this->dom->saveXML($this->eSocial);
382 382
         $xml = Strings::clearXmlString($xml);
383
-        if (! empty($this->certificate)) {
383
+        if (!empty($this->certificate)) {
384 384
             $xml = Signer::sign(
385 385
                 $this->certificate,
386 386
                 $xml,
Please login to merge, or discard this patch.