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