Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.7085 |
Changes | 0 |
1 | <?php |
||
15 | 22 | protected function init($component, ?array $ops = null): void |
|
16 | { |
||
17 | 22 | parent::init($component, $ops); |
|
18 | if ( |
||
19 | 22 | $this->ops['parentContent'] && |
|
20 | 22 | !$component->isContentComponent($this->ops['parentContent']) |
|
21 | ) { |
||
22 | $location = new ComponentLocation($this->ops['parentContent'], $component); |
||
23 | $component->addLocation($location); |
||
24 | $this->manager->persist($location); |
||
25 | } |
||
47 |