Completed
Push — master ( a0ced1...0c034e )
by Roberto
123:33 queued 74:20
created

Pdf::drawTextBox()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
cc 4
nc 8
nop 6
dl 0
loc 22
ccs 0
cts 18
cp 0
crap 20
rs 9.568
c 0
b 0
f 0
1
<?php
2
3
namespace NFePHP\DA\Legacy;
4
5
use NFePHP\DA\Legacy\FPDF\Fpdf as Fpdf;
6
7
class Pdf extends Fpdf
8
{
9
    private $t128;                                             // tabela de codigos 128
10
    private $abcSet="";                                        // conjunto de caracteres legiveis em 128
11
    private $aSet="";                                          // grupo A do conjunto de de caracteres legiveis
12
    private $bSet="";                                          // grupo B do conjunto de caracteres legiveis
13
    private $cSet="";                                          // grupo C do conjunto de caracteres legiveis
14
    private $setFrom;                                          // converter de
15
    private $setTo;                                            // converter para
16
    private $jStart = array("A"=>103, "B"=>104, "C"=>105);     // Caracteres de seleção do grupo 128
17
    private $jSwap = array("A"=>101, "B"=>100, "C"=>99);       // Caracteres de troca de grupo
18
19 1
    public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4')
20
    {
21
        //passar parametros para a classe principal
22 1
        parent::__construct($orientation, $unit, $format);
23
        // composição dos caracteres do barcode 128
24 1
        $this->t128[] = array(2, 1, 2, 2, 2, 2);           //0 : [ ]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
25 1
        $this->t128[] = array(2, 2, 2, 1, 2, 2);           //1 : [!]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
26 1
        $this->t128[] = array(2, 2, 2, 2, 2, 1);           //2 : ["]
27 1
        $this->t128[] = array(1, 2, 1, 2, 2, 3);           //3 : [#]
28 1
        $this->t128[] = array(1, 2, 1, 3, 2, 2);           //4 : [$]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
29 1
        $this->t128[] = array(1, 3, 1, 2, 2, 2);           //5 : [%]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
30 1
        $this->t128[] = array(1, 2, 2, 2, 1, 3);           //6 : [&]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
31 1
        $this->t128[] = array(1, 2, 2, 3, 1, 2);           //7 : [']
32 1
        $this->t128[] = array(1, 3, 2, 2, 1, 2);           //8 : [(]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
33 1
        $this->t128[] = array(2, 2, 1, 2, 1, 3);           //9 : [)]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
34 1
        $this->t128[] = array(2, 2, 1, 3, 1, 2);           //10 : [*]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
35 1
        $this->t128[] = array(2, 3, 1, 2, 1, 2);           //11 : [+]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
36 1
        $this->t128[] = array(1, 1, 2, 2, 3, 2);           //12 : [,]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
37 1
        $this->t128[] = array(1, 2, 2, 1, 3, 2);           //13 : [-]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
38 1
        $this->t128[] = array(1, 2, 2, 2, 3, 1);           //14 : [.]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
39 1
        $this->t128[] = array(1, 1, 3, 2, 2, 2);           //15 : [/]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
40 1
        $this->t128[] = array(1, 2, 3, 1, 2, 2);           //16 : [0]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
41 1
        $this->t128[] = array(1, 2, 3, 2, 2, 1);           //17 : [1]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
42 1
        $this->t128[] = array(2, 2, 3, 2, 1, 1);           //18 : [2]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
43 1
        $this->t128[] = array(2, 2, 1, 1, 3, 2);           //19 : [3]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
44 1
        $this->t128[] = array(2, 2, 1, 2, 3, 1);           //20 : [4]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
45 1
        $this->t128[] = array(2, 1, 3, 2, 1, 2);           //21 : [5]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
46 1
        $this->t128[] = array(2, 2, 3, 1, 1, 2);           //22 : [6]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
47 1
        $this->t128[] = array(3, 1, 2, 1, 3, 1);           //23 : [7]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
48 1
        $this->t128[] = array(3, 1, 1, 2, 2, 2);           //24 : [8]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
49 1
        $this->t128[] = array(3, 2, 1, 1, 2, 2);           //25 : [9]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
50 1
        $this->t128[] = array(3, 2, 1, 2, 2, 1);           //26 : [:]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
51 1
        $this->t128[] = array(3, 1, 2, 2, 1, 2);           //27 : [;]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
52 1
        $this->t128[] = array(3, 2, 2, 1, 1, 2);           //28 : [<]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
53 1
        $this->t128[] = array(3, 2, 2, 2, 1, 1);           //29 : [=]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
54 1
        $this->t128[] = array(2, 1, 2, 1, 2, 3);           //30 : [>]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
55 1
        $this->t128[] = array(2, 1, 2, 3, 2, 1);           //31 : [?]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
56 1
        $this->t128[] = array(2, 3, 2, 1, 2, 1);           //32 : [@]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
57 1
        $this->t128[] = array(1, 1, 1, 3, 2, 3);           //33 : [A]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
58 1
        $this->t128[] = array(1, 3, 1, 1, 2, 3);           //34 : [B]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
59 1
        $this->t128[] = array(1, 3, 1, 3, 2, 1);           //35 : [C]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
60 1
        $this->t128[] = array(1, 1, 2, 3, 1, 3);           //36 : [D]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
61 1
        $this->t128[] = array(1, 3, 2, 1, 1, 3);           //37 : [E]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
62 1
        $this->t128[] = array(1, 3, 2, 3, 1, 1);           //38 : [F]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
63 1
        $this->t128[] = array(2, 1, 1, 3, 1, 3);           //39 : [G]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
64 1
        $this->t128[] = array(2, 3, 1, 1, 1, 3);           //40 : [H]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
65 1
        $this->t128[] = array(2, 3, 1, 3, 1, 1);           //41 : [I]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
66 1
        $this->t128[] = array(1, 1, 2, 1, 3, 3);           //42 : [J]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
67 1
        $this->t128[] = array(1, 1, 2, 3, 3, 1);           //43 : [K]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
68 1
        $this->t128[] = array(1, 3, 2, 1, 3, 1);           //44 : [L]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
69 1
        $this->t128[] = array(1, 1, 3, 1, 2, 3);           //45 : [M]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
70 1
        $this->t128[] = array(1, 1, 3, 3, 2, 1);           //46 : [N]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
71 1
        $this->t128[] = array(1, 3, 3, 1, 2, 1);           //47 : [O]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
72 1
        $this->t128[] = array(3, 1, 3, 1, 2, 1);           //48 : [P]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
73 1
        $this->t128[] = array(2, 1, 1, 3, 3, 1);           //49 : [Q]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
74 1
        $this->t128[] = array(2, 3, 1, 1, 3, 1);           //50 : [R]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
75 1
        $this->t128[] = array(2, 1, 3, 1, 1, 3);           //51 : [S]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
76 1
        $this->t128[] = array(2, 1, 3, 3, 1, 1);           //52 : [T]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
77 1
        $this->t128[] = array(2, 1, 3, 1, 3, 1);           //53 : [U]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
78 1
        $this->t128[] = array(3, 1, 1, 1, 2, 3);           //54 : [V]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
79 1
        $this->t128[] = array(3, 1, 1, 3, 2, 1);           //55 : [W]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
80 1
        $this->t128[] = array(3, 3, 1, 1, 2, 1);           //56 : [X]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
81 1
        $this->t128[] = array(3, 1, 2, 1, 1, 3);           //57 : [Y]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
82 1
        $this->t128[] = array(3, 1, 2, 3, 1, 1);           //58 : [Z]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
83 1
        $this->t128[] = array(3, 3, 2, 1, 1, 1);           //59 : [[]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
84 1
        $this->t128[] = array(3, 1, 4, 1, 1, 1);           //60 : [\]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
85 1
        $this->t128[] = array(2, 2, 1, 4, 1, 1);           //61 : []]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
86 1
        $this->t128[] = array(4, 3, 1, 1, 1, 1);           //62 : [^]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
87 1
        $this->t128[] = array(1, 1, 1, 2, 2, 4);           //63 : [_]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
88 1
        $this->t128[] = array(1, 1, 1, 4, 2, 2);           //64 : [`]
89 1
        $this->t128[] = array(1, 2, 1, 1, 2, 4);           //65 : [a]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
90 1
        $this->t128[] = array(1, 2, 1, 4, 2, 1);           //66 : [b]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
91 1
        $this->t128[] = array(1, 4, 1, 1, 2, 2);           //67 : [c]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
92 1
        $this->t128[] = array(1, 4, 1, 2, 2, 1);           //68 : [d]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
93 1
        $this->t128[] = array(1, 1, 2, 2, 1, 4);           //69 : [e]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
94 1
        $this->t128[] = array(1, 1, 2, 4, 1, 2);           //70 : [f]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
95 1
        $this->t128[] = array(1, 2, 2, 1, 1, 4);           //71 : [g]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
96 1
        $this->t128[] = array(1, 2, 2, 4, 1, 1);           //72 : [h]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
97 1
        $this->t128[] = array(1, 4, 2, 1, 1, 2);           //73 : [i]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
98 1
        $this->t128[] = array(1, 4, 2, 2, 1, 1);           //74 : [j]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
99 1
        $this->t128[] = array(2, 4, 1, 2, 1, 1);           //75 : [k]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
100 1
        $this->t128[] = array(2, 2, 1, 1, 1, 4);           //76 : [l]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
101 1
        $this->t128[] = array(4, 1, 3, 1, 1, 1);           //77 : [m]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
102 1
        $this->t128[] = array(2, 4, 1, 1, 1, 2);           //78 : [n]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
103 1
        $this->t128[] = array(1, 3, 4, 1, 1, 1);           //79 : [o]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
104 1
        $this->t128[] = array(1, 1, 1, 2, 4, 2);           //80 : [p]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
105 1
        $this->t128[] = array(1, 2, 1, 1, 4, 2);           //81 : [q]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
106 1
        $this->t128[] = array(1, 2, 1, 2, 4, 1);           //82 : [r]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
107 1
        $this->t128[] = array(1, 1, 4, 2, 1, 2);           //83 : [s]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
108 1
        $this->t128[] = array(1, 2, 4, 1, 1, 2);           //84 : [t]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
109 1
        $this->t128[] = array(1, 2, 4, 2, 1, 1);           //85 : [u]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
110 1
        $this->t128[] = array(4, 1, 1, 2, 1, 2);           //86 : [v]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
111 1
        $this->t128[] = array(4, 2, 1, 1, 1, 2);           //87 : [w]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
112 1
        $this->t128[] = array(4, 2, 1, 2, 1, 1);           //88 : [x]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
113 1
        $this->t128[] = array(2, 1, 2, 1, 4, 1);           //89 : [y]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
114 1
        $this->t128[] = array(2, 1, 4, 1, 2, 1);           //90 : [z]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
115 1
        $this->t128[] = array(4, 1, 2, 1, 2, 1);           //91 : [{]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
116 1
        $this->t128[] = array(1, 1, 1, 1, 4, 3);           //92 : [|]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
117 1
        $this->t128[] = array(1, 1, 1, 3, 4, 1);           //93 : [}]
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
118 1
        $this->t128[] = array(1, 3, 1, 1, 4, 1);           //94 : [~]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
119 1
        $this->t128[] = array(1, 1, 4, 1, 1, 3);           //95 : [DEL]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
120 1
        $this->t128[] = array(1, 1, 4, 3, 1, 1);           //96 : [FNC3]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
121 1
        $this->t128[] = array(4, 1, 1, 1, 1, 3);           //97 : [FNC2]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
122 1
        $this->t128[] = array(4, 1, 1, 3, 1, 1);           //98 : [SHIFT]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
123 1
        $this->t128[] = array(1, 1, 3, 1, 4, 1);           //99 : [Cswap]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
124 1
        $this->t128[] = array(1, 1, 4, 1, 3, 1);           //100 : [Bswap]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
125 1
        $this->t128[] = array(3, 1, 1, 1, 4, 1);           //101 : [Aswap]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
126 1
        $this->t128[] = array(4, 1, 1, 1, 3, 1);           //102 : [FNC1]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
127 1
        $this->t128[] = array(2, 1, 1, 4, 1, 2);           //103 : [Astart]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
128 1
        $this->t128[] = array(2, 1, 1, 2, 1, 4);           //104 : [Bstart]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
129 1
        $this->t128[] = array(2, 1, 1, 2, 3, 2);           //105 : [Cstart]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
130 1
        $this->t128[] = array(2, 3, 3, 1, 1, 1);           //106 : [STOP]
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
131 1
        $this->t128[] = array(2, 1);                       //107 : [END BAR]
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
132 1
        for ($i = 32; $i <= 95; $i++) {   // conjunto de caracteres
133 1
            $this->abcSet .= chr($i);
134
        }
135 1
        $this->aSet = $this->abcSet;
136 1
        $this->bSet = $this->abcSet;
137 1
        for ($i = 0; $i <= 31; $i++) {
138 1
            $this->abcSet .= chr($i);
139 1
            $this->aSet .= chr($i);
140
        }
141 1
        for ($i = 96; $i <= 126; $i++) {
142 1
            $this->abcSet .= chr($i);
143 1
            $this->bSet .= chr($i);
144
        }
145 1
        $this->cSet="0123456789";
146 1
        for ($i = 0; $i < 96; $i++) {
147
            // convertendo grupos A & B
148 1
            if (isset($this->setFrom["A"])) {
149
                $this->setFrom["A"] .= chr($i);
150
            }
151 1
            if (isset($this->setFrom["B"])) {
152
                $this->setFrom["B"] .= chr($i + 32);
153
            }
154 1
            if (isset($this->setTo["A"])) {
155
                $this->setTo["A"] .= chr(($i < 32) ? $i+64 : $i-32);
156
            }
157 1
            if (isset($this->setTo["A"])) {
158
                $this->setTo["B"] .= chr($i);
159
            }
160
        }
161 1
    }
162
163
    /**
164
     * Imprime barcode 128
165
     */
166 1
    public function code128($x, $y, $code, $w, $h)
167
    {
168 1
        $Aguid="";
169 1
        $Bguid="";
170 1
        $Cguid="";
171 1
        for ($i=0; $i < strlen($code); $i++) {
172 1
            $needle=substr($code, $i, 1);
173 1
            $Aguid .= ((strpos($this->aSet, $needle)===false) ? "N" : "O");
174 1
            $Bguid .= ((strpos($this->bSet, $needle)===false) ? "N" : "O");
175 1
            $Cguid .= ((strpos($this->cSet, $needle)===false) ? "N" : "O");
176
        }
177 1
        $SminiC = "OOOO";
178 1
        $IminiC = 4;
179 1
        $crypt = "";
180 1
        while ($code > "") {
181 1
            $i = strpos($Cguid, $SminiC);
182 1
            if ($i!==false) {
183 1
                $Aguid [$i] = "N";
184 1
                $Bguid [$i] = "N";
185
            }
186 1
            if (substr($Cguid, 0, $IminiC) == $SminiC) {
187 1
                $crypt .= chr(($crypt > "") ? $this->jSwap["C"] : $this->jStart["C"]);
188 1
                $made = strpos($Cguid, "N");
189 1
                if ($made === false) {
190 1
                    $made = strlen($Cguid);
191
                }
192 1
                if (fmod($made, 2)==1) {
193
                    $made--;
194
                }
195 1
                for ($i=0; $i < $made;
196
                $i += 2) {
197 1
                    $crypt .= chr(strval(substr($code, $i, 2)));
198
                }
199 1
                    $jeu = "C";
0 ignored issues
show
Unused Code introduced by
$jeu is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
200
            } else {
201
                $madeA = strpos($Aguid, "N");
202
                if ($madeA === false) {
203
                    $madeA = strlen($Aguid);
204
                }
205
                $madeB = strpos($Bguid, "N");
206
                if ($madeB === false) {
207
                    $madeB = strlen($Bguid);
208
                }
209
                $made = (($madeA < $madeB) ? $madeB : $madeA );
210
                $jeu = (($madeA < $madeB) ? "B" : "A" );
211
                $jeuguid = $jeu . "guid";
0 ignored issues
show
Unused Code introduced by
$jeuguid is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
212
                $crypt .= chr(($crypt > "") ? $this->jSwap["$jeu"] : $this->jStart["$jeu"]);
213
                $crypt .= strtr(substr($code, 0, $made), $this->setFrom[$jeu], $this->setTo[$jeu]);
214
            }
215 1
            $code = substr($code, $made);
216 1
            $Aguid = substr($Aguid, $made);
217 1
            $Bguid = substr($Bguid, $made);
218 1
            $Cguid = substr($Cguid, $made);
219
        }
220 1
        $check = ord($crypt[0]);
221 1
        for ($i=0; $i<strlen($crypt); $i++) {
222 1
            $check += (ord($crypt[$i]) * $i);
223
        }
224 1
        $check %= 103;
225 1
        $crypt .= chr($check) . chr(106) . chr(107);
226 1
        $i = (strlen($crypt) * 11) - 8;
227 1
        $modul = $w/$i;
228 1
        for ($i=0; $i<strlen($crypt); $i++) {
229 1
            $c = $this->t128[ord($crypt[$i])];
230 1
            for ($j=0; $j<count($c); $j++) {
0 ignored issues
show
Performance Best Practice introduced by
It seems like you are calling the size function count() as part of the test condition. You might want to compute the size beforehand, and not on each iteration.

If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration:

for ($i=0; $i<count($array); $i++) { // calls count() on each iteration
}

// Better
for ($i=0, $c=count($array); $i<$c; $i++) { // calls count() just once
}
Loading history...
231 1
                $this->Rect($x, $y, $c[$j]*$modul, $h, "F");
232 1
                $x += ($c[$j++]+$c[$j])*$modul;
233
            }
234
        }
235 1
    }
236
237
    /**
238
     * Rotaciona para impressão paisagem (landscape)
239
     * @param   number $angle
240
     * @param   number $x
241
     * @param   number $y
242
     */
243
    public function rotate($angle, $x = -1, $y = -1)
244
    {
245
        if ($x == -1) {
246
            $x = $this->x;
247
        }
248
        if ($y == -1) {
249
            $y = $this->y;
250
        }
251
        if (isset($this->angle) && $this->angle != 0) {
0 ignored issues
show
Bug introduced by
The property angle does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
252
            $this->out('Q');
253
        }
254
        $this->angle = $angle;
255
        if ($angle != 0) {
256
            $angle *= M_PI/180;
257
            $c = cos($angle);
258
            $s = sin($angle);
259
            $cx =$x*$this->k;
260
            $cy = ($this->h-$y)*$this->k;
261
            $this->out(
262
                sprintf(
263
                    'q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',
264
                    $c,
265
                    $s,
266
                    -$s,
267
                    $c,
268
                    $cx,
269
                    $cy,
270
                    -$cx,
271
                    -$cy
272
                )
273
            );
274
        }
275
    }
276
277
    /**
278
     * Desenha um retangulo com cantos arredondados
279
     * @param   number $x
280
     * @param   number $y
281
     * @param   number $w
282
     * @param   number $h
283
     * @param   number $r
284
     * @param   string $corners
285
     * @param   string $style
286
     */
287 1
    public function roundedRect($x, $y, $w, $h, $r, $corners = '1234', $style = '')
288
    {
289 1
        $k = $this->k;
290 1
        $hp = $this->h;
291 1
        if ($style == 'F') {
292
            $op = 'f';
293 1
        } elseif ($style == 'FD' || $style == 'DF') {
294
            $op = 'B';
295
        } else {
296 1
            $op = 'S';
297
        }
298 1
        $MyArc = 4/3 * (sqrt(2) - 1);
299 1
        $this->out(sprintf('%.2F %.2F m', ($x+$r)*$k, ($hp-$y)*$k));
300 1
        $xc = $x+$w-$r;
301 1
        $yc = $y+$r;
302 1
        $this->out(sprintf('%.2F %.2F l', $xc*$k, ($hp-$y)*$k));
303 1
        if (strpos($corners, '2')===false) {
304
            $this->out(sprintf('%.2F %.2F l', ($x+$w)*$k, ($hp-$y)*$k));
305
        } else {
306 1
            $this->arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc);
307
        }
308 1
        $xc = $x+$w-$r;
309 1
        $yc = $y+$h-$r;
310 1
        $this->out(sprintf('%.2F %.2F l', ($x+$w)*$k, ($hp-$yc)*$k));
311 1
        if (strpos($corners, '3')===false) {
312
            $this->out(sprintf('%.2F %.2F l', ($x+$w)*$k, ($hp-($y+$h))*$k));
313
        } else {
314 1
            $this->arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r);
315
        }
316 1
        $xc = $x+$r;
317 1
        $yc = $y+$h-$r;
318 1
        $this->out(sprintf('%.2F %.2F l', $xc*$k, ($hp-($y+$h))*$k));
319 1
        if (strpos($corners, '4')===false) {
320
            $this->out(sprintf('%.2F %.2F l', ($x)*$k, ($hp-($y+$h))*$k));
321
        } else {
322 1
            $this->arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc);
323
        }
324 1
        $xc = $x+$r ;
325 1
        $yc = $y+$r;
326 1
        $this->out(sprintf('%.2F %.2F l', ($x)*$k, ($hp-$yc)*$k));
327 1
        if (strpos($corners, '1')===false) {
328
            $this->out(sprintf('%.2F %.2F l', ($x)*$k, ($hp-$y)*$k));
329
            $this->out(sprintf('%.2F %.2F l', ($x+$r)*$k, ($hp-$y)*$k));
330
        } else {
331 1
            $this->arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r);
332
        }
333 1
        $this->out($op);
334 1
    }
335
    
336
    /**
337
     * Desenha o arco para arredondar o canto do retangulo
338
     * @param   number $x1
339
     * @param   number $y1
340
     * @param   number $x2
341
     * @param   number $y2
342
     * @param   number $x3
343
     * @param   number $y3
344
     */
345 1
    private function arc($x1, $y1, $x2, $y2, $x3, $y3)
346
    {
347 1
        $h = $this->h;
348 1
        $this->out(
349 1
            sprintf(
350 1
                '%.2F %.2F %.2F %.2F %.2F %.2F c ',
351 1
                $x1*$this->k,
352 1
                ($h-$y1)*$this->k,
353 1
                $x2*$this->k,
354 1
                ($h-$y2)*$this->k,
355 1
                $x3*$this->k,
356 1
                ($h-$y3)*$this->k
357
            )
358
        );
359 1
    }
360
    
361
    /**
362
     * Desenha um retangulo com linhas tracejadas
363
     * @param   number $x1
364
     * @param   number $y1
365
     * @param   number $x2
366
     * @param   number $y2
367
     * @param   number $width
368
     * @param   number $nb
369
     */
370
    public function dashedRect($x1, $y1, $x2, $y2, $width = 1, $nb = 15)
371
    {
372
        $this->setLineWidth($width);
373
        $longueur = abs($x1-$x2);
374
        $hauteur = abs($y1-$y2);
375
        if ($longueur > $hauteur) {
376
            $Pointilles = ($longueur/$nb)/2;
377
        } else {
378
            $Pointilles = ($hauteur/$nb)/2;
379
        }
380
        for ($i=$x1; $i<=$x2; $i+=$Pointilles+$Pointilles) {
381
            for ($j=$i; $j<=($i+$Pointilles); $j++) {
382
                if ($j<=($x2-1)) {
383
                    $this->line($j, $y1, $j+1, $y1);
384
                    $this->line($j, $y2, $j+1, $y2);
385
                }
386
            }
387
        }
388
        for ($i=$y1; $i<=$y2; $i+=$Pointilles+$Pointilles) {
389
            for ($j=$i; $j<=($i+$Pointilles); $j++) {
390
                if ($j<=($y2-1)) {
391
                    $this->line($x1, $j, $x1, $j+1);
392
                    $this->line($x2, $j, $x2, $j+1);
393
                }
394
            }
395
        }
396
    }
397
398
    /**
399
     * Monta uma caixa de texto
400
     * @param   string  $strText
401
     * @param   number  $w
402
     * @param   number  $h
403
     * @param   string  $align
404
     * @param   string  $valign
405
     * @param   boolean $border
406
     */
407
    public function drawTextBox($strText, $w, $h, $align = 'L', $valign = 'T', $border = true)
408
    {
409
        $xi = $this->getX();
410
        $yi = $this->getY();
411
        $hrow = $this->fontSize;
412
        $textrows = $this->drawRows($w, $hrow, $strText, 0, $align, 0, 0, 0);
0 ignored issues
show
Documentation introduced by
0 is of type integer, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
413
        $maxrows = floor($h/$this->fontSize);
414
        $rows = min($textrows, $maxrows);
415
        $dy = 0;
416
        if (strtoupper($valign) == 'M') {
417
            $dy = ($h-$rows*$this->fontSize)/2;
418
        }
419
        if (strtoupper($valign) == 'B') {
420
            $dy = $h-$rows*$this->fontSize;
421
        }
422
        $this->setY($yi+$dy);
423
        $this->setX($xi);
424
        $this->drawRows($w, $hrow, $strText, 0, $align, false, $rows, 1);
425
        if ($border) {
426
            $this->rect($xi, $yi, $w, $h);
427
        }
428
    }
429
    
430
    /**
431
     * Insere linhas de texto na caixa
432
     * @param   number  $w
433
     * @param   number  $h
434
     * @param   string  $txt
435
     * @param   string  $border
436
     * @param   string  $align
437
     * @param   boolean $fill
438
     * @param   number  $maxline
439
     * @param   number  $prn
440
     * @return  int
441
     */
442
    private function drawRows($w, $h, $txt, $border = 0, $align = 'J', $fill = false, $maxline = 0, $prn = 0)
443
    {
444
        $cw =& $this->currentFont['cw'];
445
        if ($w == 0) {
446
            $w = $this->w-$this->rMargin-$this->x;
447
        }
448
        $wmax = ($w-2*$this->cMargin)*1000/$this->fontSize;
449
        $s = str_replace("\r", '', $txt);
450
        $nb = strlen($s);
451
        if ($nb > 0 && $s[$nb-1] == "\n") {
452
            $nb--;
453
        }
454
        $b=0;
455
        if ($border) {
456
            if ($border == 1) {
457
                $border = 'LTRB';
458
                $b = 'LRT';
459
                $b2 = 'LR';
460
            } else {
461
                $b2 = '';
462
                if (is_int(strpos($border, 'L'))) {
463
                    $b2 .= 'L';
464
                }
465
                if (is_int(strpos($border, 'R'))) {
466
                    $b2 .= 'R';
467
                }
468
                $b = is_int(strpos($border, 'T')) ? $b2.'T' : $b2;
469
            }
470
        }
471
        $sep = -1;
472
        $i = 0;
473
        $j = 0;
474
        $l = 0;
475
        $ns = 0;
476
        $nl = 1;
477
        while ($i < $nb) {
478
            $c = $s[$i];
479
            if ($c == "\n") {
480
                if ($this->ws > 0) {
481
                    $this->ws = 0;
482
                    if ($prn == 1) {
483
                        $this->out('0 Tw');
484
                    }
485
                }
486
                if ($prn == 1) {
487
                    $this->cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
488
                }
489
                $i++;
490
                $sep = -1;
491
                $j = $i;
492
                $l = 0;
493
                $ns = 0;
494
                $nl++;
495
                if ($border && $nl == 2) {
496
                    $b = $b2;
0 ignored issues
show
Bug introduced by
The variable $b2 does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
497
                }
498
                if ($maxline && $nl > $maxline) {
499
                    return substr($s, $i);
500
                }
501
                continue;
502
            }
503
            if ($c == ' ') {
504
                $sep = $i;
505
                $ls = $l;
506
                $ns++;
507
            }
508
            $l += $cw[$c];
509
            if ($l > $wmax) {
510
                if ($sep == -1) {
511
                    if ($i == $j) {
512
                        $i++;
513
                    }
514
                    if ($this->ws > 0) {
515
                        $this->ws = 0;
516
                        if ($prn == 1) {
517
                            $this->out('0 Tw');
518
                        }
519
                    }
520
                    if ($prn == 1) {
521
                        $this->cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
522
                    }
523
                } else {
524
                    if ($align == 'J') {
525
                        $this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
0 ignored issues
show
Bug introduced by
The property FontSize does not seem to exist. Did you mean fontSizePt?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
Bug introduced by
The variable $ls does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
526
                        if ($prn == 1) {
527
                            $this->out(sprintf('%.3F Tw', $this->ws*$this->k));
528
                        }
529
                    }
530
                    if ($prn == 1) {
531
                        $this->cell($w, $h, substr($s, $j, $sep-$j), $b, 2, $align, $fill);
532
                    }
533
                    $i = $sep+1;
534
                }
535
                $sep = -1;
536
                $j = $i;
537
                $l = 0;
538
                $ns = 0;
539
                $nl++;
540
                if ($border && $nl == 2) {
541
                    $b = $b2;
542
                }
543
                if ($maxline && $nl > $maxline) {
544
                    return substr($s, $i);
545
                }
546
            } else {
547
                $i++;
548
            }
549
        }
550
        if ($this->ws > 0) {
551
            $this->ws = 0;
552
            if ($prn == 1) {
553
                $this->out('0 Tw');
554
            }
555
        }
556
        if ($border && is_int(strpos($border, 'B'))) {
557
            $b .= 'B';
558
        }
559
        if ($prn == 1) {
560
            $this->cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
561
        }
562
        $this->x = $this->lMargin;
563
        return $nl;
564
    }
565
    
566
    /**
567
     * Quebra o texto para caber na caixa
568
     * @param   type $text
569
     * @param   type $maxwidth
570
     * @return  int
571
     */
572 1
    public function wordWrap(&$text, $maxwidth)
573
    {
574 1
        $text = trim($text);
575 1
        if ($text === '') {
576
            return 0;
577
        }
578 1
        $space = $this->getStringWidth(' ');
579 1
        $lines = explode("\n", $text);
580 1
        $text = '';
581 1
        $count = 0;
582 1
        foreach ($lines as $line) {
583 1
            $words = preg_split('/ +/', $line);
584 1
            $width = 0;
585 1
            foreach ($words as $word) {
586 1
                $wordwidth = $this->getStringWidth($word);
587 1
                if ($wordwidth > $maxwidth) {
588
                    // Word is too long, we cut it
589
                    for ($i=0; $i<strlen($word); $i++) {
590
                        $wordwidth = $this->getStringWidth(substr($word, $i, 1));
591
                        if ($width + $wordwidth <= $maxwidth) {
592
                            $width += $wordwidth;
593
                            $text .= substr($word, $i, 1);
594
                        } else {
595
                            $width = $wordwidth;
596
                            $text = rtrim($text)."\n".substr($word, $i, 1);
597
                            $count++;
598
                        }
599
                    }
600 1
                } elseif ($width + $wordwidth <= $maxwidth) {
601 1
                    $width += $wordwidth + $space;
602 1
                    $text .= $word.' ';
603
                } else {
604
                    $width = $wordwidth + $space;
605
                    $text = rtrim($text)."\n".$word.' ';
606 1
                    $count++;
607
                }
608
            }
609 1
            $text = rtrim($text)."\n";
610 1
            $count++;
611
        }
612 1
        $text = rtrim($text);
613 1
        return $count;
614
    }
615
    
616
    /**
617
     * Celula com escala horizontal caso o texto seja muito largo
618
     * @param   number  $w
619
     * @param   number  $h
620
     * @param   string  $txt
621
     * @param   number  $border
622
     * @param   number  $ln
623
     * @param   string  $align
624
     * @param   boolean $fill
625
     * @param   string  $link
626
     * @param   boolean $scale
627
     * @param   boolean $force
628
     */
629
    public function cellFit(
630
        $w,
631
        $h = 0,
632
        $txt = '',
633
        $border = 0,
634
        $ln = 0,
635
        $align = '',
636
        $fill = false,
637
        $link = '',
638
        $scale = false,
639
        $force = true
640
    ) {
641
        $str_width=$this->getStringWidth($txt);
642
        if ($w == 0) {
643
            $w = $this->w-$this->rMargin-$this->x;
644
        }
645
        $ratio = ($w-$this->cMargin*2)/$str_width;
646
        $fit = ($ratio < 1 || ($ratio > 1 && $force));
647
        if ($fit) {
648
            if ($scale) {
649
                //Calcula a escala horizontal
650
                $horiz_scale = $ratio*100.0;
651
                //Ajusta a escala horizontal
652
                $this->out(sprintf('BT %.2F Tz ET', $horiz_scale));
653
            } else {
654
                //Calcula o espaçamento de caracteres em pontos
655
                $char_space = ($w-$this->cMargin*2-$str_width)/max($this->_MBGetStringLength($txt)-1, 1)*$this->k;
0 ignored issues
show
Bug introduced by
The method _MBGetStringLength() does not exist on NFePHP\DA\Legacy\Pdf. Did you maybe mean mbGetStringLength()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
656
                //Ajusta o espaçamento de caracteres
657
                $this->out(sprintf('BT %.2F Tc ET', $char_space));
658
            }
659
            //Sobrescreve o alinhamento informado (desde que o texto caiba na celula)
660
            $align = '';
661
        }
662
        //Passa para o método cell
663
        $this->cell($w, $h, $txt, $border, $ln, $align, $fill, $link);
664
        //Reseta o espaçamento de caracteres e a escala horizontal
665
        if ($fit) {
666
            $this->out('BT '.($scale ? '100 Tz' : '0 Tc').' ET');
667
        }
668
    }
669
670
    /**
671
     * Celula com escalamento horizontal somente se necessário
672
     * @param   number  $w
673
     * @param   number  $h
674
     * @param   string  $txt
675
     * @param   number  $border
676
     * @param   number  $ln
677
     * @param   string  $align
678
     * @param   boolean $fill
679
     * @param   string  $link
680
     */
681
    public function cellFitScale($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '')
682
    {
683
        $this->cellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, false);
684
    }
685
686
    /**
687
     * Celula com escalamento forçado
688
     * @param   number  $w
689
     * @param   number  $h
690
     * @param   string  $txt
691
     * @param   number  $border
692
     * @param   number  $ln
693
     * @param   string  $align
694
     * @param   boolean $fill
695
     * @param   string  $link
696
     */
697
    public function cellFitScaleForce(
698
        $w,
699
        $h = 0,
700
        $txt = '',
701
        $border = 0,
702
        $ln = 0,
703
        $align = '',
704
        $fill = false,
705
        $link = ''
706
    ) {
707
        $this->cellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, true, true);
708
    }
709
710
    /**
711
     * Celula com espaçamento de caracteres somente se necessário
712
     * @param   number  $w
713
     * @param   number  $h
714
     * @param   string  $txt
715
     * @param   number  $border
716
     * @param   number  $ln
717
     * @param   string  $align
718
     * @param   boolean $fill
719
     * @param   string  $link
720
     */
721
    public function cellFitSpace($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '')
722
    {
723
        $this->cellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, false);
724
    }
725
    
726
    /**
727
     * Celula com espaçamento de caracteres forçado
728
     * @param   number  $w
729
     * @param   number  $h
730
     * @param   string  $txt
731
     * @param   number  $border
732
     * @param   number  $ln
733
     * @param   string  $align
734
     * @param   boolean $fill
735
     * @param   string  $link
736
     */
737
    public function cellFitSpaceForce(
738
        $w,
739
        $h = 0,
740
        $txt = '',
741
        $border = 0,
742
        $ln = 0,
743
        $align = '',
744
        $fill = false,
745
        $link = ''
746
    ) {
747
        $this->cellFit($w, $h, $txt, $border, $ln, $align, $fill, $link, false, true);
748
    }
749
    
750
    /**
751
     * Patch para trabalhar com textos de duplo byte CJK
752
     * @param   string $s
753
     * @return  int
754
     */
755
    private function mbGetStringLength($s)
756
    {
757
        if ($this->currentFont['type'] == 'Type0') {
758
            $len = 0;
759
            $nbbytes = strlen($s);
760
            for ($i = 0; $i < $nbbytes; $i++) {
761
                if (ord($s[$i])<128) {
762
                    $len++;
763
                } else {
764
                    $len++;
765
                    $i++;
766
                }
767
            }
768
            return $len;
769
        } else {
770
            return strlen($s);
771
        }
772
    }
773
774
    /**
775
     * Desenha uma linha horizontal tracejada com o FPDF
776
     * @param   number $x Posição horizontal inicial, em mm
777
     * @param   number $y Posição vertical inicial, em mm
778
     * @param   number $w Comprimento da linha, em mm
779
     * @param   number $h Espessura da linha, em mm
780
     * @param   number $n Numero de traços na seção da linha com o comprimento $w
781
     * @return  none
782
     */
783
    public function dashedHLine($x, $y, $w, $h, $n)
784
    {
785
        $this->setDrawColor(110);
786
        $this->setLineWidth($h);
787
        $wDash = ($w/$n)/2;
788
        for ($i=$x; $i<=$x+$w; $i += $wDash+$wDash) {
789
            for ($j=$i; $j<= ($i+$wDash); $j++) {
790
                if ($j <= ($x+$w-1)) {
791
                    $this->line($j, $y, $j+1, $y);
792
                }
793
            }
794
        }
795
        $this->setDrawColor(0);
796
    }
797
798
   /**
799
    * Desenha uma linha vertical tracejada com o FPDF
800
    * @param   number $x      Posição horizontal inicial, em mm
801
    * @param   number $y      Posição vertical inicial, em mm
802
    * @param   number $w      Comprimento da linha, em mm
803
    * @param   number $yfinal Espessura da linha, em mm
804
    * @param   number $n      Numero de traços na seção da linha com o comprimento $w
805
    * @return  none
806
    */
807
    public function dashedVLine($x, $y, $w, $yfinal, $n)
808
    {
809
        $this->setLineWidth($w);
810
        if ($y > $yfinal) {
811
            $aux = $yfinal;
812
            $yfinal = $y;
813
            $y = $aux;
814
        }
815
        while ($y < $yfinal && $n > 0) {
816
            $this->line($x, $y, $x, $y+1);
817
            $y += 3;
818
            $n--;
819
        }
820
    }
821
}
822