| Conditions | 4 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 2 | public function process(array $config, Definition $definition) |
|
| 19 | { |
||
| 20 | 2 | if (isset($config['type'])) { |
|
| 21 | 1 | $definition->setType($config['type']); |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | if (! isset($config['links'])) { |
|
| 25 | 1 | return; |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | foreach ($config['links'] as $linkName => $linkData) |
|
| 29 | { |
||
| 30 | 1 | $link = $this->createLink($linkName, $linkData); |
|
| 31 | |||
| 32 | 1 | $definition->addLink($link); |
|
| 33 | } |
||
| 34 | } |
||
| 35 | } |