Completed
Push — master ( cc47ff...c36dee )
by Roberto
11:19 queued 07:30
created
src/NFe/Traits/TraitBlocoIX.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
  */
8 8
 trait TraitBlocoIX
9 9
 {
10
+    /**
11
+     * @param integer $y
12
+     */
10 13
     protected function blocoIX($y)
11 14
     {
12 15
         //$this->bloco9H = 4;
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoVII.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
             $subSize = 1.5;
44 44
         }
45 45
         if ($this->tpEmis == 9) {
46
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
47
-            $y += 2*$yPlus;
46
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
47
+            $y += 2 * $yPlus;
48 48
             $y1 = $this->pdf->textBox(
49 49
                 $this->margem,
50 50
                 $y,
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 false
60 60
             );
61 61
         
62
-            $y1 += 2*$yPlus;
62
+            $y1 += 2 * $yPlus;
63 63
             $num = str_pad($this->getTagValue($this->ide, "nNF"), 9, '0', STR_PAD_LEFT);
64 64
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
65 65
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'B'];
68 68
             $y2 = $this->pdf->textBox(
69 69
                 $this->margem,
70
-                $y+$y1,
70
+                $y + $y1,
71 71
                 $this->wPrint,
72 72
                 4,
73 73
                 $texto,
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $texto = $this->via;
83 83
             $y3 = $this->pdf->textBox(
84 84
                 $this->margem,
85
-                $y+$y1+$y2,
85
+                $y + $y1 + $y2,
86 86
                 $this->wPrint,
87 87
                 4,
88 88
                 $texto,
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B'];
100 100
             $y4 = $this->pdf->textBox(
101 101
                 $this->margem,
102
-                $y+$y1+$y2+$y3,
102
+                $y + $y1 + $y2 + $y3,
103 103
                 $this->wPrint,
104 104
                 4,
105 105
                 $texto,
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I'];
116 116
             $y5 = $this->pdf->textBox(
117 117
                 $this->margem,
118
-                $y+$y1+$y2+$y3+$y4,
118
+                $y + $y1 + $y2 + $y3 + $y4,
119 119
                 $this->wPrint,
120 120
                 3,
121 121
                 $texto,
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
131 131
             $y1 = $this->pdf->textBox(
132 132
                 $this->margem,
133
-                $y+1,
133
+                $y + 1,
134 134
                 $this->wPrint,
135 135
                 $this->bloco7H,
136 136
                 $texto,
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
147 147
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
148 148
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
149
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => 'B'];
149
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => 'B'];
150 150
             $y2 = $this->pdf->textBox(
151 151
                 $this->margem,
152
-                $y+1+$y1,
152
+                $y + 1 + $y1,
153 153
                 $this->wPrint,
154 154
                 4,
155 155
                 $texto,
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
             }
170 170
             
171 171
             $texto = "Protocolo de Autorização:  {$protocolo}";
172
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
172
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
173 173
             $y3 = $this->pdf->textBox(
174 174
                 $this->margem,
175
-                $y+1+$y1+$y2,
175
+                $y + 1 + $y1 + $y2,
176 176
                 $this->wPrint,
177 177
                 4,
178 178
                 $texto,
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
             );
186 186
             
187 187
             $texto = "Data de Autorização:  {$data}";
188
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
188
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
189 189
             $y4 = $this->pdf->textBox(
190 190
                 $this->margem,
191
-                $y+1+$y1+$y2+$y3,
191
+                $y + 1 + $y1 + $y2 + $y3,
192 192
                 $this->wPrint,
193 193
                 4,
194 194
                 $texto,
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                 true
201 201
             );
202 202
         }
203
-        $this->pdf->dashedHLine($this->margem, $this->bloco7H+$y, $this->wPrint, 0.1, 30);
203
+        $this->pdf->dashedHLine($this->margem, $this->bloco7H + $y, $this->wPrint, 0.1, 30);
204 204
         return $this->bloco7H + $y;
205 205
     }
206 206
 }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoIII.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $y2 += $it->height;
132 132
             }
133 133
         }
134
-        $this->pdf->dashedHLine($this->margem, $this->bloco3H+$y, $this->wPrint, 0.1, 30);
134
+        $this->pdf->dashedHLine($this->margem, $this->bloco3H + $y, $this->wPrint, 0.1, 30);
135 135
         return $this->bloco3H + $y;
136 136
     }
137 137
     
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         if ($this->paperwidth < 70) {
145 145
             $fsize = 5;
146 146
         }
147
-        $hfont = (imagefontheight($fsize)/72)*15;
147
+        $hfont = (imagefontheight($fsize) / 72) * 15;
148 148
         $aFont = ['font'=> $this->fontePadrao, 'size' => $fsize, 'style' => ''];
149 149
         $htot = 0;
150 150
         if ($this->det->length == 0) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     $p = $xProd;
170 170
                     $n = $tempPDF->wordWrap($p, $descriptionWidth);
171 171
                 }
172
-                $h = ($hfont * $n)+0.5;
172
+                $h = ($hfont * $n) + 0.5;
173 173
                 $this->itens[] = [
174 174
                     "codigo" => $cProd,
175 175
                     "desc" => $xProd,
@@ -182,6 +182,6 @@  discard block
 block discarded – undo
182 182
                 $htot += $h;
183 183
             }
184 184
         }
185
-        return $htot+2;
185
+        return $htot + 2;
186 186
     }
187 187
 }
Please login to merge, or discard this patch.
src/NFe/DanfeSimples.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -193,6 +193,9 @@
 block discarded – undo
193 193
         $this->orientacao = $orientacao;
194 194
     }
195 195
 
196
+    /**
197
+     * @param string $xml
198
+     */
196 199
     private function loadDoc($xml)
197 200
     {
198 201
         $this->xml = $xml;
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 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',
@@ -370,8 +370,8 @@  discard block
 block discarded – undo
370 370
         );
371 371
 
372 372
         $enderecoEmit  = "{$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['xMun']}"
373
-                       . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}"
374
-                       . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}";
373
+                        . " / {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['UF']}"
374
+                        . " - CEP {$this->nfeArray['NFe']['infNFe']['emit']['enderEmit']['CEP']}";
375 375
 
376 376
         // LINHA 9
377 377
         $this->pdf->setFont('Arial', '', $pequeno ? 9 : 10);
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
                 $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['entrega']['xCpl']} - ";
418 418
             }
419 419
             $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['entrega']['xMun']}"
420
-                             . " / {$this->nfeArray['NFe']['infNFe']['entrega']['UF']}"
421
-                             . " - CEP {$this->nfeArray['NFe']['infNFe']['entrega']['CEP']}";
420
+                                . " / {$this->nfeArray['NFe']['infNFe']['entrega']['UF']}"
421
+                                . " - CEP {$this->nfeArray['NFe']['infNFe']['entrega']['CEP']}";
422 422
         } else {
423 423
             $enderecoLinha1 = "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xLgr']}";
424 424
             if (!empty($this->nfeArray['NFe']['infNFe']['dest']['enderDest']['nro'])) {
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
                 $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xCpl']} - ";
430 430
             }
431 431
             $enderecoLinha2 .= "{$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['xMun']}"
432
-                             . " / {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['UF']}"
433
-                             . " - CEP {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['CEP']}";
432
+                                . " / {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['UF']}"
433
+                                . " - CEP {$this->nfeArray['NFe']['infNFe']['dest']['enderDest']['CEP']}";
434 434
         }
435 435
 
436 436
         // LINHA 13
Please login to merge, or discard this 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.