| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class MyAddress extends AbstractAgenda |
||
| 14 | { |
||
| 15 | use Common\SetNamespaceTrait; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | 28 | public function setData(Common\Dtos\AbstractDto $data): parent |
|
| 21 | { |
||
| 22 | // process address |
||
| 23 | 28 | if (isset($data->address)) { |
|
| 24 | 27 | $address = new AddressInternetType($this->dependenciesFactory); |
|
| 25 | 27 | $address |
|
| 26 | 27 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 27 | 27 | ->setResolveOptions($this->resolveOptions) |
|
| 28 | 27 | ->setData($data->address); |
|
| 29 | 27 | $data->address = $address; |
|
| 30 | } |
||
| 31 | // process establishment |
||
| 32 | 28 | if (isset($data->establishment)) { |
|
| 33 | 1 | $establishment = new EstablishmentType($this->dependenciesFactory); |
|
| 34 | 1 | $establishment |
|
| 35 | 1 | ->setDirectionalVariable($this->useOneDirectionalVariables) |
|
| 36 | 1 | ->setResolveOptions($this->resolveOptions) |
|
| 37 | 1 | ->setData($data->establishment); |
|
| 38 | 1 | $data->establishment = $establishment; |
|
| 39 | } |
||
| 40 | |||
| 41 | 28 | return parent::setData($data); |
|
|
|
|||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritDoc} |
||
| 46 | */ |
||
| 47 | 28 | protected function getDefaultDto(): Common\Dtos\AbstractDto |
|
| 50 | } |
||
| 51 | } |
||
| 52 |