Completed
Pull Request — master (#449)
by Roberto
03:51
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/Legacy/Common.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -222,6 +222,9 @@
 block discarded – undo
222 222
         }
223 223
     }
224 224
 
225
+    /**
226
+     * @param string $tPag
227
+     */
225 228
     protected function tipoPag($tPag)
226 229
     {
227 230
         switch ($tPag) {
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,
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
128 128
             $y1 = $this->pdf->textBox(
129 129
                 $this->margem,
130
-                $y+1,
130
+                $y + 1,
131 131
                 $this->wPrint,
132 132
                 $this->bloco7H,
133 133
                 $texto,
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
144 144
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
145 145
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
146
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
146
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
147 147
             $y2 = $this->pdf->textBox(
148 148
                 $this->margem,
149
-                $y+1+$y1,
149
+                $y + 1 + $y1,
150 150
                 $this->wPrint,
151 151
                 4,
152 152
                 $texto,
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
                 true
159 159
             );
160 160
             $texto = "DANFE-NFC-e Impresso em contingência - EPEC";
161
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (10-$subSize), 'style' => 'B'];
161
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (10 - $subSize), 'style' => 'B'];
162 162
             $y2 = $this->pdf->textBox(
163 163
                 $this->margem,
164
-                $y+1+$y1+3,
164
+                $y + 1 + $y1 + 3,
165 165
                 $this->wPrint,
166 166
                 4,
167 167
                 $texto,
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
             );
175 175
             
176 176
             $texto = "Regularmente recebido pela administração tributária autorizadora";
177
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
177
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
178 178
             $y2 = $this->pdf->textBox(
179 179
                 $this->margem,
180
-                $y+1+$y1+$y2+3,
180
+                $y + 1 + $y1 + $y2 + 3,
181 181
                 $this->wPrint,
182 182
                 4,
183 183
                 $texto,
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
                 $dhCont = $this->dom->getElementsByTagName('dhCont')->item(0)->nodeValue;
193 193
                 $dt = \DateTime::createFromFormat('Y-m-d\TH:i:sP', $dhCont);
194 194
                 $texto = "Data de entrada em contingência : " . $dt->format('d/m/Y H:i:s');
195
-                $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
195
+                $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
196 196
                 $y2 = $this->pdf->textBox(
197 197
                     $this->margem,
198
-                    $y+1+$y1+$y2+6,
198
+                    $y + 1 + $y1 + $y2 + 6,
199 199
                     $this->wPrint,
200 200
                     4,
201 201
                     $texto,
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
212 212
             $y1 = $this->pdf->textBox(
213 213
                 $this->margem,
214
-                $y+1,
214
+                $y + 1,
215 215
                 $this->wPrint,
216 216
                 $this->bloco7H,
217 217
                 $texto,
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
228 228
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
229 229
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
230
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => 'B'];
230
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => 'B'];
231 231
             $y2 = $this->pdf->textBox(
232 232
                 $this->margem,
233
-                $y+1+$y1,
233
+                $y + 1 + $y1,
234 234
                 $this->wPrint,
235 235
                 4,
236 236
                 $texto,
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
             }
251 251
             
252 252
             $texto = "Protocolo de Autorização:  {$protocolo}";
253
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
253
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
254 254
             $y3 = $this->pdf->textBox(
255 255
                 $this->margem,
256
-                $y+1+$y1+$y2,
256
+                $y + 1 + $y1 + $y2,
257 257
                 $this->wPrint,
258 258
                 4,
259 259
                 $texto,
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
             );
267 267
             
268 268
             $texto = "Data de Autorização:  {$data}";
269
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
269
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
270 270
             $y4 = $this->pdf->textBox(
271 271
                 $this->margem,
272
-                $y+1+$y1+$y2+$y3,
272
+                $y + 1 + $y1 + $y2 + $y3,
273 273
                 $this->wPrint,
274 274
                 4,
275 275
                 $texto,
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                 true
282 282
             );
283 283
         }
284
-        $this->pdf->dashedHLine($this->margem, $this->bloco7H+$y, $this->wPrint, 0.1, 30);
284
+        $this->pdf->dashedHLine($this->margem, $this->bloco7H + $y, $this->wPrint, 0.1, 30);
285 285
         return $this->bloco7H + $y;
286 286
     }
287 287
 }
Please login to merge, or discard this patch.