Passed
Push — master ( a9ce0e...554b1f )
by Roberto
02:47 queued 01:20
created
src/NFe/DanfeSimples.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             $c1,
287 287
             5,
288 288
             "{$this->nfeArray['NFe']['infNFe']['ide']['tpNF']} - " .
289
-                                  ($this->nfeArray['NFe']['infNFe']['ide']['tpNF']==1 ? 'Saida':'Entrada'),
289
+                                  ($this->nfeArray['NFe']['infNFe']['ide']['tpNF'] == 1 ? 'Saida' : 'Entrada'),
290 290
             1,
291 291
             0,
292 292
             'C',
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             //que uma impressora de 203dpi consiga imprimir um código legível
338 338
             $this->pdf->code128($this->margesq * 2, $y, $chave, ($this->maxW - $this->margesq * 4), 15);
339 339
         } else {
340
-            $this->pdf->code128(($c1/2), $y, $chave, ($c1 * 3), 15);
340
+            $this->pdf->code128(($c1 / 2), $y, $chave, ($c1 * 3), 15);
341 341
         }
342 342
         $this->pdf->setFillColor(255, 255, 255);
343 343
         $this->pdf->ln();
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
             1
370 370
         );
371 371
 
372
-        $enderecoEmit  = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}"
372
+        $enderecoEmit = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}"
373 373
                        . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}"
374 374
                        . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}";
375 375
 
Please login to merge, or discard this patch.
src/NFe/Danfce.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     protected $descPercent = 0.38;
29 29
     protected $xml; // string XML NFe
30 30
     protected $dom;
31
-    protected $logomarca=''; // path para logomarca em jpg
32
-    protected $formatoChave="#### #### #### #### #### #### #### #### #### #### ####";
31
+    protected $logomarca = ''; // path para logomarca em jpg
32
+    protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
33 33
     protected $nfeProc;
34 34
     protected $nfe;
35 35
     protected $infNFe;
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
         //total inicial de paginas
223 223
         $totPag = 1;
224 224
         //largura imprimivel em mm: largura da folha menos as margens esq/direita
225
-        $this->wPrint = $maxW-($margEsq*2);
225
+        $this->wPrint = $maxW - ($margEsq * 2);
226 226
         //comprimento (altura) imprimivel em mm: altura da folha menos as margens
227 227
         //superior e inferior
228
-        $this->hPrint = $maxH-$margSup-$margInf;
228
+        $this->hPrint = $maxH - $margSup - $margInf;
229 229
         // estabelece contagem de paginas
230 230
         $this->pdf->aliasNbPages();
231 231
         $this->pdf->setMargins($margEsq, $margSup); // fixa as margens
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $y = $this->blocoIX($y); //informações complementares e sobre tributos
250 250
         $y = $this->blocoX($y); //creditos
251 251
         
252
-        $ymark = $maxH/4;
252
+        $ymark = $maxH / 4;
253 253
         if ($this->tpAmb == 2) {
254 254
             $this->pdf->setTextColor(120, 120, 120);
255 255
             $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 $this->margem,
259 259
                 $ymark,
260 260
                 $this->wPrint,
261
-                $maxH/2,
261
+                $maxH / 2,
262 262
                 $texto,
263 263
                 $aFont,
264 264
                 'T',
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
             $aFont = ['font' => $this->fontePadrao, 'size' => 24, 'style' => 'B'];
276 276
             $this->pdf->textBox(
277 277
                 $this->margem,
278
-                $ymark+4,
278
+                $ymark + 4,
279 279
                 $this->wPrint,
280
-                $maxH/2,
280
+                $maxH / 2,
281 281
                 $texto,
282 282
                 $aFont,
283 283
                 'T',
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
             $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => 'B'];
290 290
             $this->pdf->textBox(
291 291
                 $this->margem,
292
-                $ymark+14,
292
+                $ymark + 14,
293 293
                 $this->wPrint,
294
-                $maxH/2,
294
+                $maxH / 2,
295 295
                 $this->submessage,
296 296
                 $aFont,
297 297
                 'T',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             $y = $this->blocoVIII($y); //QRCODE
320 320
             $y = $this->blocoIX($y); //informações sobre tributos
321 321
             $y = $this->blocoX($y); //creditos
322
-            $ymark = $maxH/4;
322
+            $ymark = $maxH / 4;
323 323
             if ($this->tpAmb == 2) {
324 324
                 $this->pdf->setTextColor(120, 120, 120);
325 325
                 $texto = "SEM VALOR FISCAL\nEmitida em ambiente de homologacao";
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                     $this->margem,
329 329
                     $ymark,
330 330
                     $this->wPrint,
331
-                    $maxH/2,
331
+                    $maxH / 2,
332 332
                     $texto,
333 333
                     $aFont,
334 334
                     'T',
@@ -414,12 +414,12 @@  discard block
 block discarded – undo
414 414
             ? $this->dom->getElementsByTagName('urlChave')->item(0)->nodeValue : null;
415 415
         if (!empty($this->infProt)) {
416 416
             $cStat = $this->getTagValue($this->infProt, 'cStat');
417
-            if (!in_array($cStat, [100,150])) {
417
+            if (!in_array($cStat, [100, 150])) {
418 418
                 $this->canceled = true;
419 419
             } elseif (!empty($retEvento = $this->nfeProc->getElementsByTagName('retEvento')->item(0))) {
420 420
                 $infEvento = $retEvento->getElementsByTagName('infEvento')->item(0);
421 421
                 $cStat = $this->getTagValue($infEvento, "cStat");
422
-                $tpEvento= $this->getTagValue($infEvento, "tpEvento");
422
+                $tpEvento = $this->getTagValue($infEvento, "tpEvento");
423 423
                 $dhEvento = date(
424 424
                     "d/m/Y H:i:s",
425 425
                     $this->toTimestamp(
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoI.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $emitUF = $this->getTagValue($this->enderEmit, "UF");
25 25
         
26 26
         $emitFone = $this->getTagValue($this->enderEmit, "fone");
27
-        if (strlen($emitFone)>0) {
27
+        if (strlen($emitFone) > 0) {
28 28
             if (strlen($emitFone) == 11) {
29 29
                 $emitFone = $this->formatField($emitFone, "(##)#####-####");
30 30
             } else {
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
             $xImg = $this->margem;
39 39
             $yImg = $this->margem + 1;
40 40
             $logoInfo = getimagesize($this->logomarca);
41
-            $logoWmm = ($logoInfo[0]/72)*25.4;
42
-            $logoHmm = ($logoInfo[1]/72)*25.4;
43
-            $nImgW = $this->wPrint/4;
44
-            $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0);
41
+            $logoWmm = ($logoInfo[0] / 72) * 25.4;
42
+            $logoHmm = ($logoInfo[1] / 72) * 25.4;
43
+            $nImgW = $this->wPrint / 4;
44
+            $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0);
45 45
             if ($nImgH > $maxHimg) {
46 46
                 $nImgH = $maxHimg;
47
-                $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0);
47
+                $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0);
48 48
             }
49 49
             $xRs = ($nImgW) + $this->margem;
50 50
             $wRs = ($this->wPrint - $nImgW);
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
         $aFont = ['font'=>$this->fontePadrao, 'size' => 8, 'style' => ''];
60 60
         $texto = "{$emitRazao}";
61 61
         $y += $this->pdf->textBox(
62
-            $xRs+2,
62
+            $xRs + 2,
63 63
             $this->margem,
64
-            $wRs-2,
65
-            $this->bloco1H-$this->margem-1,
64
+            $wRs - 2,
65
+            $this->bloco1H - $this->margem - 1,
66 66
             $texto,
67 67
             $aFont,
68 68
             'T',
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
             $aFont = ['font'=>$this->fontePadrao, 'size' => $this->pdf->fontSizePt, 'style' => ''];
76 76
         }
77 77
         $texto = "CNPJ: {$emitCnpj} IE: {$emitIE}";
78
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
78
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
79 79
         $texto = $emitLgr . ", " . $emitNro;
80
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
80
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
81 81
         $texto = $emitBairro;
82
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
83
-        $texto = $emitMun . "-" . $emitUF . ($emitFone ? "  Fone: ".$emitFone : "");
84
-        $y += $this->pdf->textBox($xRs+2, $y, $wRs-2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
82
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
83
+        $texto = $emitMun . "-" . $emitUF . ($emitFone ? "  Fone: " . $emitFone : "");
84
+        $y += $this->pdf->textBox($xRs + 2, $y, $wRs - 2, 3, $texto, $aFont, 'T', $alignH, false, '', true);
85 85
         $this->pdf->dashedHLine($this->margem, $this->bloco1H, $this->wPrint, 0.1, 30);
86 86
         return $this->bloco1H;
87 87
     }
Please login to merge, or discard this patch.