GetPendingResult   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 90%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 24
ccs 9
cts 10
cp 0.9
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A uuids() 0 3 1
A __construct() 0 8 2
A error() 0 3 1
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