|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Posprint; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Esta classe foi colocada aqui apneas para facilitar o desenvolvimento, seu local correto |
|
7
|
|
|
* é no repositório sped-da |
|
8
|
|
|
* |
|
9
|
|
|
* em caso de contingência criar duas vias consumidor e estabelecimento |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
use Posprint\Printers\PrinterInterface; |
|
13
|
|
|
use InvalidArgumentException; |
|
14
|
|
|
|
|
15
|
|
|
class DanfcePos |
|
16
|
|
|
{ |
|
17
|
|
|
/** |
|
18
|
|
|
* NFCe |
|
19
|
|
|
* @var SimpleXMLElement |
|
20
|
|
|
*/ |
|
21
|
|
|
protected $nfce = ''; |
|
22
|
|
|
/** |
|
23
|
|
|
* protNFe |
|
24
|
|
|
* @var SimpleXMLElement |
|
25
|
|
|
*/ |
|
26
|
|
|
protected $protNFe = ''; |
|
27
|
|
|
/** |
|
28
|
|
|
* Printer |
|
29
|
|
|
* @var PrinterInterface |
|
30
|
|
|
*/ |
|
31
|
|
|
protected $printer; |
|
32
|
|
|
/** |
|
33
|
|
|
* Documento montado |
|
34
|
|
|
* @var array |
|
35
|
|
|
*/ |
|
36
|
|
|
protected $da = array(); |
|
37
|
|
|
/** |
|
38
|
|
|
* Total de itens da NFCe |
|
39
|
|
|
* @var integer |
|
40
|
|
|
*/ |
|
41
|
|
|
protected $totItens = 0; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* URI referente a pagina de consulta da NFCe pela chave de acesso |
|
45
|
|
|
* @var string |
|
46
|
|
|
*/ |
|
47
|
|
|
protected $uri = ''; |
|
48
|
|
|
|
|
49
|
|
|
protected $aURI = [ |
|
50
|
|
|
'AC' => 'http://sefaznet.ac.gov.br/nfce/consulta.xhtml', |
|
51
|
|
|
'AM' => 'http://sistemas.sefaz.am.gov.br/nfceweb/formConsulta.do', |
|
52
|
|
|
'BA' => 'http://nfe.sefaz.ba.gov.br/servicos/nfce/Modulos/Geral/NFCEC_consulta_chave_acesso.aspx', |
|
53
|
|
|
'MT' => 'https://www.sefaz.mt.gov.br/nfce/consultanfce', |
|
54
|
|
|
'MA' => 'http://www.nfce.sefaz.ma.gov.br/portal/consultaNFe.do?method=preFilterCupom&', |
|
55
|
|
|
'PA' => 'https://appnfc.sefa.pa.gov.br/portal/view/consultas/nfce/consultanfce.seam', |
|
56
|
|
|
'PB' => 'https://www.receita.pb.gov.br/ser/servirtual/documentos-fiscais/nfc-e/consultar-nfc-e', |
|
57
|
|
|
'PR' => 'http://www.sped.fazenda.pr.gov.br/modules/conteudo/conteudo.php?conteudo=100', |
|
58
|
|
|
'RJ' => 'http://www4.fazenda.rj.gov.br/consultaDFe/paginas/consultaChaveAcesso.faces', |
|
59
|
|
|
'RS' => 'https://www.sefaz.rs.gov.br/NFE/NFE-COM.aspx', |
|
60
|
|
|
'RO' => 'http://www.nfce.sefin.ro.gov.br/home.jsp', |
|
61
|
|
|
'RR' => 'https://www.sefaz.rr.gov.br/nfce/servlet/wp_consulta_nfce', |
|
62
|
|
|
'SE' => 'http://www.nfce.se.gov.br/portal/portalNoticias.jsp?jsp=barra-menu/servicos/consultaDANFENFCe.htm', |
|
63
|
|
|
'SP' => 'https://www.nfce.fazenda.sp.gov.br/NFCeConsultaPublica/Paginas/ConsultaPublica.aspx' |
|
64
|
|
|
]; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* Carrega a impressora a ser usada |
|
68
|
|
|
* a mesma deverá já ter sido pré definida inclusive seu |
|
69
|
|
|
* conector |
|
70
|
|
|
* |
|
71
|
|
|
* @param PrinterInterface $this->printer |
|
|
|
|
|
|
72
|
|
|
*/ |
|
73
|
|
|
public function __construct(PrinterInterface $printer) |
|
74
|
|
|
{ |
|
75
|
|
|
$this->printer = $printer; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* Carrega a NFCe |
|
80
|
|
|
* @param string $nfcexml |
|
81
|
|
|
*/ |
|
82
|
|
|
public function loadNFCe($nfcexml) |
|
83
|
|
|
{ |
|
84
|
|
|
$xml = $nfcexml; |
|
85
|
|
|
if (is_file($nfcexml)) { |
|
86
|
|
|
$xml = @file_get_contents($nfcexml); |
|
87
|
|
|
} |
|
88
|
|
|
if (empty($xml)) { |
|
89
|
|
|
throw new InvalidArgumentException('Não foi possivel ler o documento.'); |
|
90
|
|
|
} |
|
91
|
|
|
$nfe = simplexml_load_string($xml, null, LIBXML_NOCDATA); |
|
92
|
|
|
$this->protNFe = $nfe->protNFe; |
|
|
|
|
|
|
93
|
|
|
$this->nfce = $nfe->NFe; |
|
|
|
|
|
|
94
|
|
|
if (empty($this->protNFe)) { |
|
95
|
|
|
//NFe sem protocolo |
|
96
|
|
|
$this->nfce = $nfe; |
|
|
|
|
|
|
97
|
|
|
} |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* Monta a DANFCE para uso de impressoras POS |
|
102
|
|
|
*/ |
|
103
|
|
|
public function monta() |
|
104
|
|
|
{ |
|
105
|
|
|
$this->parteI(); |
|
106
|
|
|
$this->parteII(); |
|
107
|
|
|
$this->parteIII(); |
|
108
|
|
|
$this->parteIV(); |
|
109
|
|
|
$this->parteV(); |
|
110
|
|
|
$this->parteVI(); |
|
111
|
|
|
$this->parteVII(); |
|
112
|
|
|
$this->parteVIII(); |
|
113
|
|
|
$this->parteIX(); |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* Manda os dados para a impressora ou |
|
118
|
|
|
* retorna os comandos em ordem e legiveis |
|
119
|
|
|
* para a tela |
|
120
|
|
|
*/ |
|
121
|
|
|
public function printDanfe() |
|
122
|
|
|
{ |
|
123
|
|
|
$resp = $this->printer->send(); |
|
124
|
|
|
if (!empty($resp)) { |
|
125
|
|
|
echo str_replace("\n", "<br>", $resp); |
|
126
|
|
|
} |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* Recupera a sequiencia de comandos para envio |
|
131
|
|
|
* posterior para a impressora por outro |
|
132
|
|
|
* meio como o QZ.io (tray) |
|
133
|
|
|
* |
|
134
|
|
|
* @return string |
|
135
|
|
|
*/ |
|
136
|
|
|
public function getCommands() |
|
137
|
|
|
{ |
|
138
|
|
|
$aCmds = $this->printer->getBuffer('binA'); |
|
139
|
|
|
return implode("\n", $aCmds); |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* Parte I - Emitente |
|
144
|
|
|
* Dados do emitente |
|
145
|
|
|
* Campo Obrigatório |
|
146
|
|
|
*/ |
|
147
|
|
|
protected function parteI() |
|
148
|
|
|
{ |
|
149
|
|
|
$razao = (string) $this->nfce->infNFe->emit->xNome; |
|
150
|
|
|
$cnpj = (string) $this->nfce->infNFe->emit->CNPJ; |
|
151
|
|
|
$ie = (string) $this->nfce->infNFe->emit->IE; |
|
152
|
|
|
$im = (string) $this->nfce->infNFe->emit->IM; |
|
153
|
|
|
$log = (string) $this->nfce->infNFe->emit->enderEmit->xLgr; |
|
154
|
|
|
$nro = (string) $this->nfce->infNFe->emit->enderEmit->nro; |
|
155
|
|
|
$bairro = (string) $this->nfce->infNFe->emit->enderEmit->xBairro; |
|
156
|
|
|
$mun = (string) $this->nfce->infNFe->emit->enderEmit->xMun; |
|
157
|
|
|
$uf = (string) $this->nfce->infNFe->emit->enderEmit->UF; |
|
158
|
|
|
if (array_key_exists($uf, $this->aURI)) { |
|
159
|
|
|
$this->uri = $this->aURI[$uf]; |
|
160
|
|
|
} |
|
161
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
162
|
|
|
$this->printer->text($razao); |
|
|
|
|
|
|
163
|
|
|
$this->printer->text('CNPJ: '.$cnpj.' '.'IE: ' . $ie); |
|
|
|
|
|
|
164
|
|
|
$this->printer->text('IM: '.$im); |
|
|
|
|
|
|
165
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
166
|
|
|
//o que acontece quando o texto é maior que o numero de carecteres da linha ?? |
|
167
|
|
|
$this->printer->text($log . ', ' . $nro . ' ' . $bairro . ' ' . $mun . ' ' . $uf); |
|
|
|
|
|
|
168
|
|
|
//linha divisória ?? |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* Parte II - Informações Gerais |
|
173
|
|
|
* Campo Obrigatório |
|
174
|
|
|
*/ |
|
175
|
|
|
protected function parteII() |
|
176
|
|
|
{ |
|
177
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
178
|
|
|
$this->printer->text('DANFE NFC-e Documento Auxiliar'); |
|
|
|
|
|
|
179
|
|
|
$this->printer->text('da Nota Fiscal eletrônica para consumidor final'); |
|
|
|
|
|
|
180
|
|
|
$this->printer->setBold(); |
|
181
|
|
|
$this->printer->text('Não permite aproveitamento de crédito de ICMS'); |
|
|
|
|
|
|
182
|
|
|
$this->printer->setBold(); |
|
183
|
|
|
//linha divisória ?? |
|
184
|
|
|
} |
|
185
|
|
|
|
|
186
|
|
|
/** |
|
187
|
|
|
* Parte III - Detalhes da Venda |
|
188
|
|
|
* Campo Opcional |
|
189
|
|
|
*/ |
|
190
|
|
|
protected function parteIII() |
|
191
|
|
|
{ |
|
192
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
193
|
|
|
$this->printer->text('Item Cod Desc Qtd V.Unit V.Total'); |
|
|
|
|
|
|
194
|
|
|
//obter dados dos itens da NFCe |
|
195
|
|
|
$det = $this->nfce->infNFe->det; |
|
196
|
|
|
$this->totItens = $det->count(); |
|
197
|
|
|
for ($x=0; $x<=$this->totItens-1; $x++) { |
|
198
|
|
|
$nItem = (int) $det[$x]->attributes()->{'nItem'}; |
|
199
|
|
|
$cProd = (string) $det[$x]->prod->cProd; |
|
200
|
|
|
$xProd = (string) $det[$x]->prod->xProd; |
|
201
|
|
|
$qCom = (float) $det[$x]->prod->qCom; |
|
202
|
|
|
$uCom = (string) $det[$x]->prod->uCom; |
|
203
|
|
|
$vUnCom = (float) $det[$x]->prod->vUnCom; |
|
204
|
|
|
$vProd = (float) $det[$x]->prod->vProd; |
|
205
|
|
|
//falta formatar os campos e o espaçamento entre eles |
|
206
|
|
|
$this->printer->text($nItem . $cProd. $xProd . $qCom . $uCom . $vUnCom . $vProd); |
|
|
|
|
|
|
207
|
|
|
} |
|
208
|
|
|
//linha divisória ?? |
|
209
|
|
|
} |
|
210
|
|
|
|
|
211
|
|
|
/** |
|
212
|
|
|
* Parte V - Informação de tributos |
|
213
|
|
|
* Campo Obrigatório |
|
214
|
|
|
*/ |
|
215
|
|
|
protected function parteIV() |
|
216
|
|
|
{ |
|
217
|
|
|
$vTotTrib = (float) $this->nfce->infNFe->total->ICMSTot->vTotTrib; |
|
218
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
219
|
|
|
$this->printer->text('Informação dos Tributos Totais:' . '' . 'R$ ' . $vTotTrib); |
|
|
|
|
|
|
220
|
|
|
$this->printer->text('Incidentes (Lei Federal 12.741 /2012) - Fonte IBPT'); |
|
|
|
|
|
|
221
|
|
|
//linha divisória ?? |
|
222
|
|
|
} |
|
223
|
|
|
|
|
224
|
|
|
/** |
|
225
|
|
|
* Parte IV - Totais da Venda |
|
226
|
|
|
* Campo Obrigatório |
|
227
|
|
|
*/ |
|
228
|
|
|
protected function parteV() |
|
229
|
|
|
{ |
|
230
|
|
|
$vNF = (float) $this->nfce->infNFe->total->ICMSTot->vNF; |
|
231
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
232
|
|
|
$this->printer->text('QTD. TOTAL DE ITENS' . ' ' . $this->totItens); |
|
|
|
|
|
|
233
|
|
|
$this->printer->text('VALOR TOTAL R$ ' . $vNF); |
|
|
|
|
|
|
234
|
|
|
$this->printer->text('FORMA PAGAMENTO VALOR PAGO'); |
|
|
|
|
|
|
235
|
|
|
$pag = $this->nfce->infNFe->pag; |
|
236
|
|
|
$tot = $pag->count(); |
|
237
|
|
|
for ($x=0; $x<=$tot-1; $x++) { |
|
238
|
|
|
$tPag = (string) $this->tipoPag($pag[0]->tPag); |
|
239
|
|
|
$vPag = (float) $pag[0]->vPag; |
|
240
|
|
|
$this->printer->text($tPag . ' R$ '. $vPag); |
|
|
|
|
|
|
241
|
|
|
} |
|
242
|
|
|
//linha divisória ?? |
|
243
|
|
|
} |
|
244
|
|
|
|
|
245
|
|
|
/** |
|
246
|
|
|
* Parte VI - Mensagem de Interesse do Contribuinte |
|
247
|
|
|
* conteudo de infCpl |
|
248
|
|
|
* Campo Opcional |
|
249
|
|
|
*/ |
|
250
|
|
|
protected function parteVI() |
|
251
|
|
|
{ |
|
252
|
|
|
$infCpl = (string) $this->nfce->infNFe->infAdic->infCpl; |
|
253
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
254
|
|
|
$this->printer->text($infCpl); |
|
|
|
|
|
|
255
|
|
|
$this->printer->lineFeed(); |
|
256
|
|
|
//linha divisória ?? |
|
257
|
|
|
} |
|
258
|
|
|
|
|
259
|
|
|
/** |
|
260
|
|
|
* Parte VII - Mensagem Fiscal e Informações da Consulta via Chave de Acesso |
|
261
|
|
|
* Campo Obrigatório |
|
262
|
|
|
*/ |
|
263
|
|
|
protected function parteVII() |
|
264
|
|
|
{ |
|
265
|
|
|
$tpAmb = (int) $this->nfce->infNFe->ide->tpAmb; |
|
266
|
|
|
if ($tpAmb == 2) { |
|
267
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
268
|
|
|
$this->printer->text('EMITIDA EM AMBIENTE DE HOMOLOGAÇÃO - SEM VALOR FISCAL'); |
|
|
|
|
|
|
269
|
|
|
} |
|
270
|
|
|
$tpEmis = (int) $this->nfce->infNFe->ide->tpEmis; |
|
271
|
|
|
if ($tpEmis != 1) { |
|
272
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
273
|
|
|
$this->printer->text('EMITIDA EM AMBIENTE DE CONTINGẼNCIA'); |
|
|
|
|
|
|
274
|
|
|
} |
|
275
|
|
|
$nNF = (float) $this->nfce->infNFe->ide->nNF; |
|
276
|
|
|
$serie = (int) $this->nfce->infNFe->ide->serie; |
|
277
|
|
|
$dhEmi = (string) $this->nfce->infNFe->ide->dhEmi; |
|
278
|
|
|
$Id = (string) $this->nfce->infNFe->attributes()->{'Id'}; |
|
279
|
|
|
$chave = substr($Id, 3, strlen($Id)-3); |
|
280
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
281
|
|
|
$this->printer->text('Nr. ' . $nNF. ' Serie ' .$serie . ' Emissão ' .$dhEmi . ' via Consumidor'); |
|
|
|
|
|
|
282
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
283
|
|
|
$this->printer->text('Consulte pela chave de acesso em'); |
|
|
|
|
|
|
284
|
|
|
$this->printer->text($this->uri); |
|
|
|
|
|
|
285
|
|
|
$this->printer->text('CHAVE DE ACESSO'); |
|
|
|
|
|
|
286
|
|
|
$this->printer->text($chave); |
|
|
|
|
|
|
287
|
|
|
//linha divisória ?? |
|
288
|
|
|
} |
|
289
|
|
|
|
|
290
|
|
|
/** |
|
291
|
|
|
* Parte VIII - Informações sobre o Consumidor |
|
292
|
|
|
* Campo Opcional |
|
293
|
|
|
*/ |
|
294
|
|
|
protected function parteVIII() |
|
295
|
|
|
{ |
|
296
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
297
|
|
|
$dest = $this->nfce->infNFe->dest; |
|
298
|
|
|
if (empty($dest)) { |
|
299
|
|
|
$this->printer->text('CONSUMIDOR NÃO IDENTIFICADO'); |
|
|
|
|
|
|
300
|
|
|
return; |
|
301
|
|
|
} |
|
302
|
|
|
$xNome = (string) $this->nfce->infNFe->dest->xNome; |
|
303
|
|
|
$this->printer->text($xNome); |
|
|
|
|
|
|
304
|
|
|
$cnpj = (string) $this->nfce->infNFe->dest->CNPJ; |
|
305
|
|
|
$cpf = (string) $this->nfce->infNFe->dest->CPF; |
|
306
|
|
|
$idEstrangeiro = (string) $this->nfce->infNFe->dest->idEstrangeiro; |
|
307
|
|
|
$this->printer->setAlign('L'); |
|
|
|
|
|
|
308
|
|
|
if (!empty($cnpj)) { |
|
309
|
|
|
$this->printer->text('CNPJ ' . $cnpj); |
|
|
|
|
|
|
310
|
|
|
} |
|
311
|
|
|
if (!empty($cpf)) { |
|
312
|
|
|
$this->printer->text('CPF ' . $cpf); |
|
|
|
|
|
|
313
|
|
|
} |
|
314
|
|
|
if (!empty($idEstrangeiro)) { |
|
315
|
|
|
$this->printer->text('Extrangeiro ' . $idEstrangeiro); |
|
|
|
|
|
|
316
|
|
|
} |
|
317
|
|
|
$xLgr = (string) $this->nfce->infNFe->dest->enderDest->xLgr; |
|
318
|
|
|
$nro = (string) $this->nfce->infNFe->dest->enderDest->nro; |
|
319
|
|
|
$xCpl = (string) $this->nfce->infNFe->dest->enderDest->xCpl; |
|
320
|
|
|
$xBairro = (string) $this->nfce->infNFe->dest->enderDest->xBairro; |
|
321
|
|
|
$xMun = (string) $this->nfce->infNFe->dest->enderDest->xMun; |
|
322
|
|
|
$uf = (string) $this->nfce->infNFe->dest->enderDest->UF; |
|
323
|
|
|
$cep = (string) $this->nfce->infNFe->dest->enderDest->CEP; |
|
|
|
|
|
|
324
|
|
|
$this->printer->text($xLgr . '' . $nro . '' . $xCpl . '' . $xBairro . '' . $xMun . '' . $uf); |
|
|
|
|
|
|
325
|
|
|
//linha divisória ?? |
|
326
|
|
|
} |
|
327
|
|
|
|
|
328
|
|
|
/** |
|
329
|
|
|
* Parte IX - QRCode |
|
330
|
|
|
* Consulte via Leitor de QRCode |
|
331
|
|
|
* Protocolo de autorização 1234567891234567 22/06/2016 14:43:51 |
|
332
|
|
|
* Campo Obrigatório |
|
333
|
|
|
*/ |
|
334
|
|
|
protected function parteIX() |
|
335
|
|
|
{ |
|
336
|
|
|
$this->printer->setAlign('C'); |
|
|
|
|
|
|
337
|
|
|
$this->printer->text('Consulte via Leitor de QRCode'); |
|
|
|
|
|
|
338
|
|
|
$qr = (string) $this->nfce->infNFeSupl->qrCode; |
|
339
|
|
|
$this->printer->barcodeQRCode($qr); |
|
|
|
|
|
|
340
|
|
|
if (!empty($this->protNFe)) { |
|
341
|
|
|
$nProt = (string) $this->protNFe->infProt->nProt; |
|
342
|
|
|
$dhRecbto = (string) $this->protNFe->infProt->dhRecbto; |
|
343
|
|
|
$this->printer->text('Protocolo de autorização ' . $nProt . $dhRecbto); |
|
|
|
|
|
|
344
|
|
|
} else { |
|
345
|
|
|
$this->printer->setBold(); |
|
346
|
|
|
$this->printer->text('NOTA FISCAL INVÁLIDA - SEM PROTOCOLO DE AUTORIZAÇÃO'); |
|
|
|
|
|
|
347
|
|
|
$this->printer->lineFeed(); |
|
348
|
|
|
} |
|
349
|
|
|
} |
|
350
|
|
|
|
|
351
|
|
|
/** |
|
352
|
|
|
* Retorna o texto referente ao tipo de pagamento efetuado |
|
353
|
|
|
* @param int $tPag |
|
354
|
|
|
* @return string |
|
355
|
|
|
*/ |
|
356
|
|
|
private function tipoPag($tPag) |
|
357
|
|
|
{ |
|
358
|
|
|
$tPagNome = ""; |
|
359
|
|
|
switch ($tPag) { |
|
360
|
|
|
case '01': |
|
361
|
|
|
$tPagNome = 'Dinheiro'; |
|
362
|
|
|
break; |
|
363
|
|
|
case '02': |
|
364
|
|
|
$tPagNome = 'Cheque'; |
|
365
|
|
|
break; |
|
366
|
|
|
case '03': |
|
367
|
|
|
$tPagNome = 'Cartao de Credito'; |
|
368
|
|
|
break; |
|
369
|
|
|
case '04': |
|
370
|
|
|
$tPagNome = 'Cartao de Debito'; |
|
371
|
|
|
break; |
|
372
|
|
|
case '05': |
|
373
|
|
|
$tPagNome = 'Credito Loja'; |
|
374
|
|
|
break; |
|
375
|
|
|
case '10': |
|
376
|
|
|
$tPagNome = 'Vale Alimentacao'; |
|
377
|
|
|
break; |
|
378
|
|
|
case '11': |
|
379
|
|
|
$tPagNome = 'Vale Refeicao'; |
|
380
|
|
|
break; |
|
381
|
|
|
case '12': |
|
382
|
|
|
$tPagNome = 'Vale Presente'; |
|
383
|
|
|
break; |
|
384
|
|
|
case '13': |
|
385
|
|
|
$tPagNome = 'Vale Combustivel'; |
|
386
|
|
|
break; |
|
387
|
|
|
case '99': |
|
388
|
|
|
$tPagNome = 'Outros'; |
|
389
|
|
|
} |
|
390
|
|
|
return $tPagNome; |
|
391
|
|
|
} |
|
392
|
|
|
} |
|
393
|
|
|
|
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$irelandis not defined by the methodfinale(...).The most likely cause is that the parameter was changed, but the annotation was not.