| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class TaxDocument extends AbstractAgenda |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | */ |
||
| 18 | 1 | public function setData(Common\Dtos\AbstractDto $data): parent |
|
| 19 | { |
||
| 20 | // process source liquidation |
||
| 21 | 1 | if (isset($data->sourceLiquidation)) { |
|
| 22 | 1 | $sourceLiquidation = new SourceLiquidation($this->dependenciesFactory); |
|
| 23 | 1 | $sourceLiquidation |
|
| 24 | 1 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 25 | 1 | ->setResolveOptions($this->resolveOptions) |
|
| 26 | 1 | ->setData($data->sourceLiquidation); |
|
| 27 | 1 | $data->sourceLiquidation = $sourceLiquidation; |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | return parent::setData($data); |
|
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | 1 | public function getXML(): \SimpleXMLElement |
|
| 37 | { |
||
| 38 | 1 | $xml = $this->createXML()->addChild('int:taxDocument', '', $this->namespace('int')); |
|
| 39 | |||
| 40 | 1 | $this->addElements($xml, $this->getDataElements(), 'int'); |
|
| 41 | |||
| 42 | 1 | return $xml; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritDoc} |
||
| 47 | */ |
||
| 48 | 1 | protected function getDefaultDto(): Common\Dtos\AbstractDto |
|
| 51 | } |
||
| 52 | } |
||
| 53 |