Completed
Push — master ( d8d861...a71811 )
by Roberto
04:01 queued 14s
created
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.
src/NFe/Traits/TraitBlocoIX.php 2 patches
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
         $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
         }
34 34
         $this->pdf->textBox(
35 35
             $this->margem,
36
-            $y+3,
36
+            $y + 3,
37 37
             $this->wPrint,
38
-            $this->bloco9H-4,
38
+            $this->bloco9H - 4,
39 39
             str_replace(";", "\n", $this->infCpl),
40 40
             $aFont,
41 41
             'T',
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $aFont = ['font'=> $this->fontePadrao, 'size' => 5, 'style' => ''];
68 68
         }
69 69
         $linhas = str_replace(';', "\n", $this->infCpl);
70
-        $hfont = (imagefontheight($fsize)/72)*13;
70
+        $hfont = (imagefontheight($fsize) / 72) * 13;
71 71
         $numlinhas = $pdf->getNumLines($linhas, $wprint, $aFont);
72 72
         return (int) ($numlinhas * $hfont) + 2;
73 73
     }
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoX.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 TraitBlocoX
9 9
 {
10
+    /**
11
+     * @param double $y
12
+     */
10 13
     protected function blocoX($y)
11 14
     {
12 15
         //$this->bloco9H = 3;
Please login to merge, or discard this patch.
src/NFe/Traits/TraitBlocoVII.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
             $subSize = 1.5;
41 41
         }
42 42
         if ($this->tpEmis == 9) {
43
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
44
-            $y += 2*$yPlus;
43
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
44
+            $y += 2 * $yPlus;
45 45
             $y1 = $this->pdf->textBox(
46 46
                 $this->margem,
47 47
                 $y,
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 false
57 57
             );
58 58
         
59
-            $y1 += 2*$yPlus;
59
+            $y1 += 2 * $yPlus;
60 60
             $num = str_pad($this->getTagValue($this->ide, "nNF"), 9, '0', STR_PAD_LEFT);
61 61
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
62 62
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'B'];
65 65
             $y2 = $this->pdf->textBox(
66 66
                 $this->margem,
67
-                $y+$y1,
67
+                $y + $y1,
68 68
                 $this->wPrint,
69 69
                 4,
70 70
                 $texto,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $texto = $this->via;
80 80
             $y3 = $this->pdf->textBox(
81 81
                 $this->margem,
82
-                $y+$y1+$y2,
82
+                $y + $y1 + $y2,
83 83
                 $this->wPrint,
84 84
                 4,
85 85
                 $texto,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B'];
97 97
             $y4 = $this->pdf->textBox(
98 98
                 $this->margem,
99
-                $y+$y1+$y2+$y3,
99
+                $y + $y1 + $y2 + $y3,
100 100
                 $this->wPrint,
101 101
                 4,
102 102
                 $texto,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I'];
113 113
             $y5 = $this->pdf->textBox(
114 114
                 $this->margem,
115
-                $y+$y1+$y2+$y3+$y4,
115
+                $y + $y1 + $y2 + $y3 + $y4,
116 116
                 $this->wPrint,
117 117
                 3,
118 118
                 $texto,
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
129 129
             $y1 = $this->pdf->textBox(
130 130
                 $this->margem,
131
-                $y+1,
131
+                $y + 1,
132 132
                 $this->wPrint,
133 133
                 $this->bloco7H,
134 134
                 $texto,
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
145 145
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
146 146
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
147
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
147
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
148 148
             $y2 = $this->pdf->textBox(
149 149
                 $this->margem,
150
-                $y+1+$y1,
150
+                $y + 1 + $y1,
151 151
                 $this->wPrint,
152 152
                 4,
153 153
                 $texto,
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
                 true
160 160
             );
161 161
             $texto = "DANFE-NFC-e Impresso em contingência - EPEC";
162
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (10-$subSize), 'style' => 'B'];
162
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (10 - $subSize), 'style' => 'B'];
163 163
             $y2 = $this->pdf->textBox(
164 164
                 $this->margem,
165
-                $y+1+$y1+3,
165
+                $y + 1 + $y1 + 3,
166 166
                 $this->wPrint,
167 167
                 4,
168 168
                 $texto,
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
             );
176 176
             
177 177
             $texto = "Regularmente recebido pela administração tributária autorizadora";
178
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
178
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
179 179
             $y2 = $this->pdf->textBox(
180 180
                 $this->margem,
181
-                $y+1+$y1+$y2+3,
181
+                $y + 1 + $y1 + $y2 + 3,
182 182
                 $this->wPrint,
183 183
                 4,
184 184
                 $texto,
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
                 $dhCont = $this->dom->getElementsByTagName('dhCont')->item(0)->nodeValue;
194 194
                 $dt = \DateTime::createFromFormat('Y-m-d\TH:i:sP', $dhCont);
195 195
                 $texto = "Data de entrada em contingência : " . $dt->format('d/m/Y H:i:s'); 
196
-                $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
196
+                $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
197 197
                 $y2 = $this->pdf->textBox(
198 198
                     $this->margem,
199
-                    $y+1+$y1+$y2+6,
199
+                    $y + 1 + $y1 + $y2 + 6,
200 200
                     $this->wPrint,
201 201
                     4,
202 202
                     $texto,
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
215 215
             $y1 = $this->pdf->textBox(
216 216
                 $this->margem,
217
-                $y+1,
217
+                $y + 1,
218 218
                 $this->wPrint,
219 219
                 $this->bloco7H,
220 220
                 $texto,
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
231 231
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
232 232
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
233
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => 'B'];
233
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => 'B'];
234 234
             $y2 = $this->pdf->textBox(
235 235
                 $this->margem,
236
-                $y+1+$y1,
236
+                $y + 1 + $y1,
237 237
                 $this->wPrint,
238 238
                 4,
239 239
                 $texto,
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
             }
254 254
             
255 255
             $texto = "Protocolo de Autorização:  {$protocolo}";
256
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
256
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
257 257
             $y3 = $this->pdf->textBox(
258 258
                 $this->margem,
259
-                $y+1+$y1+$y2,
259
+                $y + 1 + $y1 + $y2,
260 260
                 $this->wPrint,
261 261
                 4,
262 262
                 $texto,
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
             );
270 270
             
271 271
             $texto = "Data de Autorização:  {$data}";
272
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
272
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
273 273
             $y4 = $this->pdf->textBox(
274 274
                 $this->margem,
275
-                $y+1+$y1+$y2+$y3,
275
+                $y + 1 + $y1 + $y2 + $y3,
276 276
                 $this->wPrint,
277 277
                 4,
278 278
                 $texto,
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 true
285 285
             );
286 286
         }
287
-        $this->pdf->dashedHLine($this->margem, $this->bloco7H+$y, $this->wPrint, 0.1, 30);
287
+        $this->pdf->dashedHLine($this->margem, $this->bloco7H + $y, $this->wPrint, 0.1, 30);
288 288
         return $this->bloco7H + $y;
289 289
     }
290 290
 }
Please login to merge, or discard this patch.