LayoutPagSeguro   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeader() 0 3 1
A getTrailer() 0 5 1
1
<?php
2
3
namespace Claudsonm\Pedi\Standards\PagSeguro\Layouts;
4
5
use Claudsonm\Pedi\Standards\PagSeguro\Records\Header;
6
use Claudsonm\Pedi\Standards\PagSeguro\Records\Trailer;
7
use Claudsonm\Pedi\Structure\Layout;
8
9
abstract class LayoutPagSeguro extends Layout
10
{
11 44
    public function getHeader(): Header
12
    {
13 44
        return $this->getContents()[0];
14
    }
15
16 44
    public function getTrailer(): Trailer
17
    {
18 44
        $lastIndex = $this->getTotalOfRecords() - 1;
19
20 44
        return $this->getContents()[$lastIndex];
21
    }
22
23
    abstract public function getDetalhes(): array;
24
}
25