| Total Complexity | 8 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class IntParam extends AbstractAgenda |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * {@inheritdoc} |
||
| 14 | */ |
||
| 15 | 3 | public function setData(Common\Dtos\AbstractDto $data): parent |
|
| 16 | { |
||
| 17 | // process settings |
||
| 18 | 3 | if (isset($data->parameterSettings)) { |
|
| 19 | // prepare empty parameter list for list |
||
| 20 | 3 | if (!empty($data->parameterType) && (Common\Enums\ParamTypeEnum::ListValue->value == $data->parameterType)) { |
|
| 21 | 1 | if (!isset($data->parameterSettings->parameterList)) { |
|
| 22 | 1 | $data->parameterSettings->parameterList = []; |
|
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | 3 | $parameterSettings = new IntParam\Settings($this->dependenciesFactory); |
|
| 27 | 3 | $parameterSettings |
|
| 28 | 3 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 29 | 3 | ->setResolveOptions($this->resolveOptions) |
|
| 30 | 3 | ->setData($data->parameterSettings); |
|
| 31 | 3 | $data->parameterSettings = $parameterSettings; |
|
| 32 | } |
||
| 33 | |||
| 34 | 3 | return parent::setData($data); |
|
|
|
|||
| 35 | } |
||
| 36 | |||
| 37 | 1 | public function getImportRoot(): string |
|
| 38 | { |
||
| 39 | 1 | return 'lst:intParamDetail'; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | 2 | public function getXML(): \SimpleXMLElement |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | 3 | protected function getDefaultDto(): Common\Dtos\AbstractDto |
|
| 62 | } |
||
| 63 | } |
||
| 64 |