|
6 | 6 | use Fontebasso\Correios\DeclaracaoConteudo\Interfaces\ItemBagInterface; |
7 | 7 | use Fontebasso\Correios\DeclaracaoConteudo\Interfaces\PessoaInterface; |
8 | 8 |
|
9 | | -/** |
10 | | - * Class DeclaracaoConteudo |
11 | | - * |
12 | | - * Declaração de Conteúdo para encomendas enviadas via Correios |
13 | | - * |
14 | | - * @package Fontebasso\Correios\DeclaracaoConteudo |
15 | | - * @author fontebasso <[email protected]> |
16 | | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
17 | | - */ |
18 | 9 | class DeclaracaoConteudo extends Controller |
19 | 10 | { |
20 | | - private $remetente; |
21 | | - private $destinatario; |
22 | | - private $itens; |
23 | | - private $valorTotal; |
| 11 | + private PessoaInterface $remetente; |
| 12 | + private PessoaInterface $destinatario; |
| 13 | + private ItemBagInterface $items; |
| 14 | + private float $valorTotal; |
24 | 15 |
|
25 | | - /** |
26 | | - * DeclaracaoConteudo constructor. |
27 | | - * |
28 | | - * @param PessoaInterface $remetente |
29 | | - * @param PessoaInterface $destinatario |
30 | | - * @param ItemBagInterface $itens |
31 | | - * @param string|int $valorTotal |
32 | | - */ |
33 | 16 | public function __construct( |
34 | 17 | PessoaInterface $remetente, |
35 | 18 | PessoaInterface $destinatario, |
36 | | - ItemBagInterface $itens, |
37 | | - $valorTotal = 0.00 |
| 19 | + ItemBagInterface $items, |
| 20 | + float $valorTotal = 0.00 |
38 | 21 | ) { |
39 | 22 | $this->remetente = $remetente; |
40 | 23 | $this->destinatario = $destinatario; |
41 | | - $this->itens = $itens; |
| 24 | + $this->items = $items; |
42 | 25 | $this->valorTotal = $valorTotal; |
43 | 26 | } |
44 | 27 |
|
45 | | - /** |
46 | | - * Imprimir Declaração de Conteúdo em HTML |
47 | | - */ |
48 | | - public function imprimirHtml() |
| 28 | + public function imprimirHtml(): bool|string |
49 | 29 | { |
50 | 30 | return $this->view('declaracao-conteudo-bootstrap', [ |
51 | 31 | 'remetente' => $this->remetente, |
52 | 32 | 'destinatario' => $this->destinatario, |
53 | | - 'itens' => $this->itens, |
| 33 | + 'items' => $this->items, |
54 | 34 | 'valorTotal' => $this->valorTotal |
55 | 35 | ]); |
56 | 36 | } |
|
0 commit comments