Completed
Pull Request — master (#89)
by
unknown
30:41 queued 15:40
created

testaMakeMdfe.php ➔ timezone_offset_string()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**@category  Teste
3
 * @package   Spedmdfeexamples
4
 * @copyright 2009-2016 NFePHP
5
 * @name      testaMakeMDFe.php
6
 * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL v.3
7
 * @link      http://github.com/nfephp-org/sped-cte for the canonical source repository
8
 * @author    Maison K. Sakamoto <[email protected]> 
9
 * 
10
 * TESTE PARA A VERSÃO 3.0 do MDFe
11
 **/
12
error_reporting(E_ALL);
13
ini_set('display_errors', 'On');
14
15
require_once '../bootstrap.php';
16
17
use NFePHP\MDFe\Make;
18
use NFePHP\MDFe\Tools;
19
20
function timezone_offset_string()
21
{
22
    $offset = timezone_offset_get(new DateTimeZone('America/Sao_Paulo'), new DateTime());
23
    return sprintf("%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs($offset / 3600), abs($offset % 3600));
24
}
25
26
$make= new Make();
27
$tools = new Tools('../config/config.json');
0 ignored issues
show
Bug introduced by
The call to Tools::__construct() misses a required argument $certificate.

This check looks for function calls that miss required arguments.

Loading history...
28
$dhEmi = date("Y-m-d\TH:i:s".timezone_offset_string());
29
30
//$cteTools->aConfig['siglaUF'] = $obj->emitenteUFNome;                       // SIGLA DA UF
31
//$cteTools->aConfig['cnpj']= Formatador::somenteNumeros($obj->emitenteCNPJ); // CNPJ do emitente
32
//$cteTools->aConfig['ie']= Formatador::somenteNumeros($obj->emitenteIE);     // Inscricao estadual
33
//$cteTools->aConfig['razaosocial']=$obj->emitenteRazao;                      // Razao social
34
$tools->aConfig['nomefantasia']="BARTHOLO TRANSPORTES RODOVIARIOS LTDA"; // Nome fantasia
0 ignored issues
show
Bug introduced by
The property aConfig does not seem to exist. Did you mean config?

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...
35
$tools->aConfig['schemesCTe']="PL_CTe_300"; // Versao do XML
0 ignored issues
show
Bug introduced by
The property aConfig does not seem to exist. Did you mean config?

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...
36
$tools->aConfig['pathXmlUrlFileCTe']="cte_ws3.xml";
0 ignored issues
show
Bug introduced by
The property aConfig does not seem to exist. Did you mean config?

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...
37
38
$cUF = '41';        // 41-PR, 42-SC
39
$tpAmb = '2';       // 1-Producao(versao fiscal), 2-Homologacao(versao de teste)
40
$mod = '58';        // Modelo do documento fiscal: 58 para identificação do MDF-e
41
$serie = '1';       // Serie do MDFe
42
$tpEmis = '1';      // Forma de emissao do MDFe: 1-Normal; 2- Contingencia
43
$numeroMDFe = '104';
44
$cMDF = '00000010';
45
46
47
$chave = $make->montaChave(
0 ignored issues
show
Bug introduced by
The method montaChave() does not seem to exist on object<NFePHP\MDFe\Make>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
48
    $cUF,                // Codigo da UF da tabela do IBGE: 41-PR
49
    $ano = date('y', strtotime($dhEmi)),
50
    $mes = date('m', strtotime($dhEmi)),
51
    $cnpj = $tools->aConfig['cnpj'],
0 ignored issues
show
Bug introduced by
The property aConfig does not seem to exist. Did you mean config?

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...
52
    $mod,                   // Modelo do documento fiscal: 58 para identificação do MDF-e
53
    $serie,                 // Serie do MDFe
54
    $numero = $numeroMDFe,  // Numero do MDFe
55
    $tpEmis,                // Forma de emissao do MDFe: 1-Normal; 2- Contingencia
56
    $cCT = $cMDF            // Código aleatório gerado pelo emitente
57
);
58
59
$make->taginfMDFe($chave, $versao = '3.00');
0 ignored issues
show
Bug introduced by
The method taginfMDFe() does not exist on NFePHP\MDFe\Make. Did you maybe mean taginfMDFeTransp()?

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...
60
61
$cDV = substr($chave, -1);      //Digito Verificador
62
$make->tagide(
63
    $cUF,                   // Codigo da UF da tabela do IBGE: 41-PR
0 ignored issues
show
Documentation introduced by
$cUF is of type string, but the function expects a object<stdClass>.

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...
64
    $tpAmb,                 // 1-Producao(versao fiscal), 2-Homologacao(versao de teste)
0 ignored issues
show
Unused Code introduced by
The call to Make::tagide() has too many arguments starting with $tpAmb.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
65
    $tpEmit = '1',          // 1-Prestador de serviço de transporte 2-Transportador de Carga Própria
66
    $tpTransp = '',         // 1-ETC 2-TAC 3-CTC (facultativo)
67
    $mod,                   // Modelo do documento fiscal: 58 para identificação do MDF-e
68
    $serie,                 // Serie do MDFe
69
    $nMDF = $numeroMDFe,    // Numero do Manifesto
70
    $cMDF = $cMDF,          // Código aleatório gerado pelo emitente
71
    $cDV,                   // Digito Verificador
72
    $modal = '1',           // 1-Rodoviário; 2-Aéreo; 3-Aquaviário; 4-Ferroviário.
73
    $dhEmi,                 // Data e hora de emissão do Manifesto (Formato AAAA-MM-DDTHH:MM:DD TZD)
74
    $tpEmis,                // 1-Normal; 2-Contingência
75
    $procEmi = '0',         // 0-Aplicativo do Contribuinte; 3-Aplicativo fornecido pelo Fisco
76
    $verProc = '3',         // Informar a versão do aplicativo emissor de MDF-e.
77
    $UFIni = 'PR',          // Sigla da UF do Carregamento
78
    $UFFim = 'SC',          // Sigla da UF do Descarregamento
79
    $dhIniViagem = ''
80
);
81
82
$make->tagInfMunCarrega(
83
    $cMunCarrega = '4108304',           // Código do Município de Carregamento (IBEGE)
0 ignored issues
show
Documentation introduced by
$cMunCarrega = '4108304' is of type string, but the function expects a object<stdClass>.

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...
84
    $xMunCarrega = 'Foz do Iguacu'      // Nome do Municipio de CArregamento
0 ignored issues
show
Unused Code introduced by
The call to Make::taginfMunCarrega() has too many arguments starting with $xMunCarrega = 'Foz do Iguacu'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
85
);
86
87
$make->tagemit(
88
    $CNPJ = '81450900000132',
0 ignored issues
show
Documentation introduced by
$CNPJ = '81450900000132' is of type string, but the function expects a object<stdClass>.

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...
89
    $IE = '4220816074',
0 ignored issues
show
Unused Code introduced by
The call to Make::tagemit() has too many arguments starting with $IE = '4220816074'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
90
    $xNome = 'BARTHOLO TRANSPORTES RODOVIARIOS LTDA',
91
    $xFant = 'BARTHOLO TRANSPORTES RODOVIARIOS LTDA'
92
);
93
94
$make->tagenderEmit(
95
    $xLgr = 'RUA CARLOS LUZ',
0 ignored issues
show
Documentation introduced by
$xLgr = 'RUA CARLOS LUZ' is of type string, but the function expects a object<stdClass>.

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...
96
    $nro = '1',
0 ignored issues
show
Unused Code introduced by
The call to Make::tagenderEmit() has too many arguments starting with $nro = '1'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
97
    $xCpl = '',
98
    $xBairro = 'PARQUE PRESIDENTE',
99
    $cMun = '4108304',
100
    $xMun = 'Foz do Iguacu',
101
    $CEP = '85863150',
102
    $UF = 'PR',                       // Sigla da UF, , informar EX para operações com o exterior
103
    $fone = '35221216',
104
    $email = '[email protected]'
105
);
106
107
$make->tagInfModal($versaoModal = '3.00');
0 ignored issues
show
Bug introduced by
The method tagInfModal() does not seem to exist on object<NFePHP\MDFe\Make>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
108
109
$make->tagInfANTT(
110
    $RNTRC = '00739357'
0 ignored issues
show
Documentation introduced by
$RNTRC = '00739357' is of type string, but the function expects a object<stdClass>.

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...
111
);
112
113
$make->tagInfcontratante(
114
    $cpf = '',
0 ignored issues
show
Documentation introduced by
$cpf = '' is of type string, but the function expects a object<stdClass>.

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...
115
    $cnpj = '79525242000159'
0 ignored issues
show
Unused Code introduced by
The call to Make::taginfContratante() has too many arguments starting with $cnpj = '79525242000159'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
116
);
117
118
$make->tagCondutor(
119
    $xNome = 'VALDIR NUNES GOMES',
0 ignored issues
show
Documentation introduced by
$xNome = 'VALDIR NUNES GOMES' is of type string, but the function expects a object<stdClass>.

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...
120
    $propCPF = '01754762921'
0 ignored issues
show
Unused Code introduced by
The call to Make::tagcondutor() has too many arguments starting with $propCPF = '01754762921'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
121
);
122
123
$make->tagVeicTracao(
124
    $cInt = '123',     // Código interno do veículo
0 ignored issues
show
Documentation introduced by
$cInt = '123' is of type string, but the function expects a object<stdClass>.

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...
125
    $placa = 'BEH6886',
0 ignored issues
show
Unused Code introduced by
The call to Make::tagveicTracao() has too many arguments starting with $placa = 'BEH6886'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
126
    $tara = '16500',
127
    $capKG = '25500',
128
    $capM3 = '100',
129
    $tpRod = '03',      // 01 - Truck; 02 - Toco; 03 - Cavalo Mecânico; 04 - VAN; 05 - Utilitário; 06 - Outros.
130
    $tpCar = '02',      // 00-não aplicável; 01-Aberta; 02-Fechada/Baú; 03-Granelera; 04-Porta Container; 05-Sider
131
    $UF = 'PR',
132
    $propRNTRC = '',
133
    $RENAVAM = '00588892793'
134
);
135
136
$make->tagInfMunDescarga(
137
    $nItem = 0,               // index do array ( podem ser varios )
0 ignored issues
show
Documentation introduced by
$nItem = 0 is of type integer, but the function expects a object<stdClass>.

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...
138
    $cMunDescarga = '4202404',
0 ignored issues
show
Unused Code introduced by
The call to Make::taginfMunDescarga() has too many arguments starting with $cMunDescarga = '4202404'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
139
    $xMunDescarga = 'Blumenau'
140
);
141
142
$make->tagInfCTe(
143
    $nItem = 0,             // index do array ( podem ser varios )
0 ignored issues
show
Documentation introduced by
$nItem = 0 is of type integer, but the function expects a object<stdClass>.

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...
144
    $chCTe = '42171081450900000566570010000001571000000100',
0 ignored issues
show
Unused Code introduced by
The call to Make::taginfCTe() has too many arguments starting with $chCTe = '42171081450900...0010000001571000000100'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
145
    $segCodBarra = '',
146
    $indReentrega = ''
147
);
148
149
150
$make->tagInfResp(
0 ignored issues
show
Bug introduced by
The method tagInfResp() does not seem to exist on object<NFePHP\MDFe\Make>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
151
    $respSeg = '1', // Responsável pelo seguro [1-Emitente; 2-Resp. pela contratação do serviço de transporte]
152
    $CNPJ = '81450900000566',
153
    $CPF = ''
154
);
155
$make->tagInfSeg(
0 ignored issues
show
Bug introduced by
The method tagInfSeg() does not seem to exist on object<NFePHP\MDFe\Make>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
156
    $xSeg = 'CHUBB SEGUROS',  // Nome da Seguradora
157
    $CNPJ = '07476410000124'  // CNPJ da seguradora
158
);
159
$make->tagSeg(
160
    $nApol = '13128-001',     // Número da Apólice
0 ignored issues
show
Documentation introduced by
$nApol = '13128-001' is of type string, but the function expects a object<stdClass>.

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...
161
    $nAver = '1089'           // Número da Averbação
0 ignored issues
show
Unused Code introduced by
The call to Make::tagseg() has too many arguments starting with $nAver = '1089'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
162
);
163
$make->tagTot(
164
    $qCTe = '1',            // Quantidade total de CT-e relacionados no Manifesto
0 ignored issues
show
Documentation introduced by
$qCTe = '1' is of type string, but the function expects a object<stdClass>.

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...
165
    $qNFe = '',             // Quantidade total de NF-e relacionadas no Manifesto
0 ignored issues
show
Unused Code introduced by
The call to Make::tagtot() has too many arguments starting with $qNFe = ''.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
166
    $qMDFe = '',            // Quantidade total de MDF-e relacionados no Manifesto Aquaviário
167
    $vCarga = '21627.26',   // Valor total da carga / mercadorias transportadas
168
    $cUnid = '01',          // Codigo da unidade de medida do Peso Bruto da Carga / Mercadorias transportadas
169
    $qCarga = '55.8200'    // Peso Bruto Total da Carga / Mercadorias transportadas
170
);
171
172
$make->tagautXML(
173
    $cnpj = '04898488000177'  // CNPJ do autorizado
0 ignored issues
show
Documentation introduced by
$cnpj = '04898488000177' is of type string, but the function expects a object<stdClass>.

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...
174
);
175
176
$resp = $make->montaMDFe();
177
$filename = "../xml/{$chave}-mdfe.xml";
178
if ($resp) {
179
    //header('Content-type: text/xml; charset=UTF-8');
180
    $xml = $make->getXML();
181
    file_put_contents($filename, $xml);
182
    //chmod($filename, 0777);
183
    //echo $xml;
184
} else {
185
    //header('Content-type: text/html; charset=UTF-8');
186
    foreach ($make->erros as $err) {
0 ignored issues
show
Bug introduced by
The property erros does not seem to exist. Did you mean errors?

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...
187
        echo 'tag: &lt;'.$err['tag'].'&gt; ---- '.$err['desc'].'<br>';
188
    }
189
}
190
191
$xmlAssinado = $tools->assina($xml);
0 ignored issues
show
Bug introduced by
The method assina() does not seem to exist on object<NFePHP\MDFe\Tools>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
192
file_put_contents($filename, $xmlAssinado);
193
194
$aRetorno = array();
195
$tools->sefazEnviaLote($xmlAssinado, $tpAmb, $idLote = '', $aRetorno);
0 ignored issues
show
Unused Code introduced by
The call to Tools::sefazEnviaLote() has too many arguments starting with $idLote = ''.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
196
197
echo "<pre>";
198
echo htmlspecialchars($tools->soapDebug);
0 ignored issues
show
Bug introduced by
The property soapDebug does not seem to exist in NFePHP\MDFe\Tools.

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...
199
echo print_r($aRetorno);
200
echo "</pre>";
201