Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class GetSatStatusExtractor |
||
12 | { |
||
13 | /** @var string[] */ |
||
14 | private $expressionData; |
||
15 | |||
16 | /** |
||
17 | * GetSatStatusExtractor constructor. |
||
18 | * |
||
19 | * @param array $expressionData |
||
20 | */ |
||
21 | 2 | public function __construct(array $expressionData) |
|
22 | { |
||
23 | 2 | $this->expressionData = [ |
|
24 | 2 | 're' => strval($expressionData['re'] ?? ''), |
|
25 | 2 | 'rr' => strval($expressionData['rr'] ?? ''), |
|
26 | 2 | 'tt' => strval($expressionData['tt'] ?? ''), |
|
27 | 2 | 'id' => strval($expressionData['id'] ?? ''), |
|
28 | ]; |
||
29 | 2 | } |
|
30 | |||
31 | 1 | public static function fromXmlDocument(DOMDocument $document) |
|
35 | } |
||
36 | |||
37 | 1 | public static function fromXmlString(string $xmlCfdi): self |
|
38 | { |
||
39 | 1 | $document = new DOMDocument(); |
|
40 | 1 | $document->loadXML($xmlCfdi); |
|
41 | 1 | return static::fromXmlDocument($document); |
|
42 | } |
||
43 | |||
44 | 2 | public function buildCommand(): GetSatStatusCommand |
|
48 | } |
||
49 | } |
||
50 |