Passed
Push — master ( 927f67...9bd000 )
by Claudson
06:56
created

Antecipacao::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Claudsonm\Pedi\Standards\PagSeguro\Layouts;
4
5
use Claudsonm\Pedi\Standards\PagSeguro\Records\DetalheAntecipacao;
6
use Claudsonm\Pedi\Standards\PagSeguro\Records\Header;
7
use Claudsonm\Pedi\Standards\PagSeguro\Records\Trailer;
8
9
class Antecipacao extends LayoutPagSeguro
10
{
11 2
    public function __construct()
12
    {
13 2
        $this->append(new Header())
14 2
            ->append(new DetalheAntecipacao(), '*')
15 2
            ->append(new Trailer());
16 2
    }
17
18
    /**
19
     * @return array|DetalheAntecipacao[]
20
     */
21 2
    public function getDetalhes(): array
22
    {
23 2
        return array_filter($this->getContents(), fn ($record) => $record instanceof DetalheAntecipacao);
24
    }
25
}
26