Passed
Push — master ( 8e3ace...4fe72c )
by Roberto
57s queued 11s
created
src/MDFe/Damdfe.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     protected $yDados = 0;
27 27
     protected $xml; // string XML NFe
28 28
     protected $errMsg = ''; // mesagens de erro
29
-    protected $errStatus = false;// status de erro TRUE um erro ocorreu false sem erros
29
+    protected $errStatus = false; // status de erro TRUE um erro ocorreu false sem erros
30 30
     protected $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####";
31 31
     protected $margemInterna = 2;
32 32
     protected $id;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $UF = 'UF: ' . $this->UF;
315 315
         $mun = 'Municipio: ' . $this->xMun;
316 316
 
317
-        $texto = $cpfcnpj . ' - ' . $ie . $rntrc ."\n";
317
+        $texto = $cpfcnpj . ' - ' . $ie . $rntrc . "\n";
318 318
         $texto .= $lgr . ' - ' . $nro . "\n";
319 319
         $texto .= $bairro . "\n";
320 320
         $texto .= $UF . ' - ' . $mun . ' - ' . $CEP;
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
             $n = count($resp['message']);
569 569
             $alttot = $n * 15;
570 570
             $x = 10;
571
-            $y = $this->hPrint/2 - $alttot/2;
571
+            $y = $this->hPrint / 2 - $alttot / 2;
572 572
             $h = 15;
573 573
             $w = $maxW - (2 * $x);
574 574
             $this->pdf->settextcolor(90, 90, 90);
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
         $aFont = array('font' => $this->fontePadrao, 'size' => 8, 'style' => '');
1243 1243
         $this->pdf->textBox($x, $y, $x2, 8, $texto, $aFont, 'T', 'L', 0, '', false);
1244 1244
         //$y = $this->hPrint - 4;
1245
-        $y = $this->hPrint+8;
1245
+        $y = $this->hPrint + 8;
1246 1246
         $texto = "Impresso em  " . date('d/m/Y H:i:s') . ' ' . $this->creditos;
1247 1247
         $w = $this->wPrint - 4;
1248 1248
         $aFont = array('font' => $this->fontePadrao, 'size' => 6, 'style' => 'I');
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.
src/NFe/Traits/TraitBlocoVII.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         if ($this->tpEmis == 9) {
52
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
53
-            $y += 2*$yPlus;
52
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
53
+            $y += 2 * $yPlus;
54 54
             $y1 = $this->pdf->textBox(
55 55
                 $this->margem,
56 56
                 $y,
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 false
66 66
             );
67 67
         
68
-            $y1 += 2*$yPlus;
68
+            $y1 += 2 * $yPlus;
69 69
             $num = str_pad($this->getTagValue($this->ide, "nNF"), 9, '0', STR_PAD_LEFT);
70 70
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
71 71
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'B'];
74 74
             $y2 = $this->pdf->textBox(
75 75
                 $this->margem,
76
-                $y+$y1,
76
+                $y + $y1,
77 77
                 $this->wPrint,
78 78
                 4,
79 79
                 $texto,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $texto = $this->via;
89 89
             $y3 = $this->pdf->textBox(
90 90
                 $this->margem,
91
-                $y+$y1+$y2,
91
+                $y + $y1 + $y2,
92 92
                 $this->wPrint,
93 93
                 4,
94 94
                 $texto,
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $aFont = ['font'=> $this->fontePadrao, 'size' => 10, 'style' => 'B'];
106 106
             $y4 = $this->pdf->textBox(
107 107
                 $this->margem,
108
-                $y+$y1+$y2+$y3,
108
+                $y + $y1 + $y2 + $y3,
109 109
                 $this->wPrint,
110 110
                 4,
111 111
                 $texto,
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
                 true
118 118
             );
119 119
 
120
-            if( empty($protocolo) ) {
120
+            if (empty($protocolo)) {
121 121
                 $texto = "Pendente de autorização";
122 122
                 $aFont = ['font'=> $this->fontePadrao, 'size' => 8, 'style' => 'I'];
123 123
                 $y5 = $this->pdf->textBox(
124 124
                     $this->margem,
125
-                    $y+$y1+$y2+$y3+$y4,
125
+                    $y + $y1 + $y2 + $y3 + $y4,
126 126
                     $this->wPrint,
127 127
                     3,
128 128
                     $texto,
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 );
136 136
             } else {
137 137
                 $this->blocoVII_prot(
138
-                    $y+$y1+$y2+$y3+$y4,
138
+                    $y + $y1 + $y2 + $y3 + $y4,
139 139
                     $subSize,
140 140
                     $protocolo, 
141 141
                     $dhRecbto
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
146 146
             $y1 = $this->pdf->textBox(
147 147
                 $this->margem,
148
-                $y+1,
148
+                $y + 1,
149 149
                 $this->wPrint,
150 150
                 $this->bloco7H,
151 151
                 $texto,
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
162 162
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
163 163
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
164
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
164
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
165 165
             $y2 = $this->pdf->textBox(
166 166
                 $this->margem,
167
-                $y+1+$y1,
167
+                $y + 1 + $y1,
168 168
                 $this->wPrint,
169 169
                 4,
170 170
                 $texto,
@@ -176,10 +176,10 @@  discard block
 block discarded – undo
176 176
                 true
177 177
             );
178 178
             $texto = "DANFE-NFC-e Impresso em contingência - EPEC";
179
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (10-$subSize), 'style' => 'B'];
179
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (10 - $subSize), 'style' => 'B'];
180 180
             $y2 = $this->pdf->textBox(
181 181
                 $this->margem,
182
-                $y+1+$y1+3,
182
+                $y + 1 + $y1 + 3,
183 183
                 $this->wPrint,
184 184
                 4,
185 185
                 $texto,
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
             );
193 193
             
194 194
             $texto = "Regularmente recebido pela administração tributária autorizadora";
195
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
195
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
196 196
             $y2 = $this->pdf->textBox(
197 197
                 $this->margem,
198
-                $y+1+$y1+$y2+3,
198
+                $y + 1 + $y1 + $y2 + 3,
199 199
                 $this->wPrint,
200 200
                 4,
201 201
                 $texto,
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
                 $dhCont = $this->dom->getElementsByTagName('dhCont')->item(0)->nodeValue;
211 211
                 $dt = \DateTime::createFromFormat('Y-m-d\TH:i:sP', $dhCont);
212 212
                 $texto = "Data de entrada em contingência : " . $dt->format('d/m/Y H:i:s');
213
-                $aFont = ['font'=> $this->fontePadrao, 'size' => (7-$subSize), 'style' => ''];
213
+                $aFont = ['font'=> $this->fontePadrao, 'size' => (7 - $subSize), 'style' => ''];
214 214
                 $y2 = $this->pdf->textBox(
215 215
                     $this->margem,
216
-                    $y+1+$y1+$y2+6,
216
+                    $y + 1 + $y1 + $y2 + 6,
217 217
                     $this->wPrint,
218 218
                     4,
219 219
                     $texto,
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             $aFont = ['font'=> $this->fontePadrao, 'size' => 7, 'style' => ''];
230 230
             $y1 = $this->pdf->textBox(
231 231
                 $this->margem,
232
-                $y+1,
232
+                $y + 1,
233 233
                 $this->wPrint,
234 234
                 $this->bloco7H,
235 235
                 $texto,
@@ -245,10 +245,10 @@  discard block
 block discarded – undo
245 245
             $serie = str_pad($this->getTagValue($this->ide, "serie"), 3, '0', STR_PAD_LEFT);
246 246
             $data = (new \DateTime($this->getTagValue($this->ide, "dhEmi")))->format('d/m/Y H:i:s');
247 247
             $texto = "NFCe n. {$num} Série {$serie} {$data}";
248
-            $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => 'B'];
248
+            $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => 'B'];
249 249
             $y2 = $this->pdf->textBox(
250 250
                 $this->margem,
251
-                $y+1+$y1,
251
+                $y + 1 + $y1,
252 252
                 $this->wPrint,
253 253
                 4,
254 254
                 $texto,
@@ -261,19 +261,19 @@  discard block
 block discarded – undo
261 261
             );
262 262
 
263 263
             $this->blocoVII_prot(
264
-                $y+1+$y1+$y2,
264
+                $y + 1 + $y1 + $y2,
265 265
                 $subSize,
266 266
                 $protocolo, 
267 267
                 $dhRecbto
268 268
             );
269 269
         }
270
-        $this->pdf->dashedHLine($this->margem, $this->bloco7H+$y, $this->wPrint, 0.1, 30);
270
+        $this->pdf->dashedHLine($this->margem, $this->bloco7H + $y, $this->wPrint, 0.1, 30);
271 271
         return $this->bloco7H + $y;
272 272
     }
273 273
 
274 274
     protected function blocoVII_prot($y, $subSize, $protocolo, $dhRecbto) {
275 275
         $texto = "Protocolo de Autorização:  {$protocolo}";
276
-        $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
276
+        $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
277 277
         $y1 = $this->pdf->textBox(
278 278
             $this->margem,
279 279
             $y,
@@ -289,10 +289,10 @@  discard block
 block discarded – undo
289 289
         );
290 290
         
291 291
         $texto = "Data de Autorização:  {$dhRecbto}";
292
-        $aFont = ['font'=> $this->fontePadrao, 'size' => (8-$subSize), 'style' => ''];
292
+        $aFont = ['font'=> $this->fontePadrao, 'size' => (8 - $subSize), 'style' => ''];
293 293
         return $this->pdf->textBox(
294 294
             $this->margem,
295
-            $y+$y1,
295
+            $y + $y1,
296 296
             $this->wPrint,
297 297
             4,
298 298
             $texto,
Please login to merge, or discard this patch.