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