| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Contract extends AbstractAgenda |
||
| 17 | { |
||
| 18 | use Common\AddParameterToHeaderTrait; |
||
| 19 | |||
| 20 | |||
| 21 | 1 | public function getImportRoot(): string |
|
| 22 | { |
||
| 23 | 1 | return 'lCon:contract'; |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | 4 | public function setData(array $data): parent |
|
| 30 | { |
||
| 31 | // pass to header |
||
| 32 | 4 | $desc = new Desc($this->namespacesPaths, $this->sanitizeEncoding, $this->companyRegistrationNumber, $this->resolveOptions, $this->normalizerFactory); |
|
| 33 | 4 | $data = ['header' => $desc->setDirectionalVariable($this->useOneDirectionalVariables)->setData($data)]; |
|
| 34 | |||
| 35 | 4 | return parent::setData($data); |
|
|
|
|||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 3 | public function getXML(): \SimpleXMLElement |
|
| 42 | { |
||
| 43 | 3 | $xml = $this->createXML()->addChild('con:contract', '', $this->namespace('con')); |
|
| 44 | 3 | $xml->addAttribute('version', '2.0'); |
|
| 45 | |||
| 46 | 3 | $this->addElements($xml, ['header'], 'con'); |
|
| 47 | |||
| 48 | 3 | return $xml; |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | 1 | protected function configureOptions(Common\OptionsResolver $resolver): void |
|
| 58 | } |
||
| 59 | } |
||
| 60 |