Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
33 | 28 | public function setData(array $data): parent |
|
34 | { |
||
35 | // process address |
||
36 | 28 | if (isset($data['address'])) { |
|
37 | 27 | $address = new AddressInternetType($this->namespacesPaths, $this->sanitizeEncoding, $this->normalizerFactory); |
|
38 | 27 | $address->setDirectionalVariable($this->useOneDirectionalVariables)->setResolveOptions($this->resolveOptions)->setData($data['address']); |
|
39 | 27 | $data['address'] = $address; |
|
40 | } |
||
41 | // process establishment |
||
42 | 28 | if (isset($data['establishment'])) { |
|
43 | 1 | $establishment = new EstablishmentType($this->namespacesPaths, $this->sanitizeEncoding, $this->normalizerFactory); |
|
44 | 1 | $establishment->setDirectionalVariable($this->useOneDirectionalVariables)->setResolveOptions($this->resolveOptions)->setData($data['establishment']); |
|
45 | 1 | $data['establishment'] = $establishment; |
|
46 | } |
||
47 | |||
48 | 28 | return parent::setData($data); |
|
|
|||
49 | } |
||
60 |