Passed
Push — main ( b480f2...a8d709 )
by Carlos C
02:53 queued 12s
created

GetPendingResult::uuids()   A

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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpCfdi\Finkok\Services\Cancel;
6
7
use PhpCfdi\Finkok\Services\AbstractResult;
8
use stdClass;
9
10
class GetPendingResult extends AbstractResult
11
{
12
    /** @var string[] */
13
    private $uuids;
14
15 4
    public function __construct(stdClass $data)
16
    {
17 4
        parent::__construct($data, 'get_pendingResult');
18 4
        $items = $this->findInDescendent($data, 'get_pendingResult', 'uuids', 'string') ?? [];
19 4
        if (! is_array($items)) {
20
            $items = [];
21
        }
22 4
        $this->uuids = $items;
23
    }
24
25
    /** @return string[] */
26 3
    public function uuids(): array
27
    {
28 3
        return $this->uuids;
29
    }
30
31 3
    public function error(): string
32
    {
33 3
        return $this->get('error');
34
    }
35
}
36