Antecipacao::getDetalhes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
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