Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
25 | 3 | public function setData(array $data): parent |
|
26 | { |
||
27 | 3 | $factory = new ParameterFactory($this->namespacesPaths, $this->sanitizeEncoding, $this->normalizerFactory); |
|
28 | |||
29 | 3 | foreach ($factory->getKeys() as $key) { |
|
30 | // fill elements from factory |
||
31 | 3 | $this->elements[] = $key; |
|
32 | // add instance to data |
||
33 | 3 | if (isset($data[$key])) { |
|
34 | 3 | $data[$key] = $factory->getByKey($key)->setDirectionalVariable($this->useOneDirectionalVariables)->setResolveOptions($this->resolveOptions)->setData($data[$key]); |
|
35 | } |
||
36 | } |
||
37 | |||
38 | 3 | return parent::setData($data); |
|
|
|||
39 | } |
||
65 |