| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 6.5971 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 22 | protected function init($component, ?array $ops = null): void |
|
| 24 | { |
||
| 25 | 22 | parent::init($component, $ops); |
|
| 26 | if ( |
||
| 27 | 22 | $this->ops['parentContent'] && |
|
| 28 | 22 | !$component->hasParentContent($this->ops['parentContent']) |
|
| 29 | ) { |
||
| 30 | $location = new ComponentLocation($this->ops['parentContent'], $component); |
||
| 31 | $component->addLocation($location); |
||
| 32 | $this->manager->persist($location); |
||
| 33 | } |
||
| 34 | if ( |
||
| 35 | 22 | $this->ops['dynamicPage'] |
|
| 36 | ) { |
||
| 37 | $location = new ComponentLocation(null, $component); |
||
| 38 | $location->setDynamicPageClass($this->ops['dynamicPage']); |
||
| 39 | $this->manager->persist($location); |
||
| 40 | } |
||
| 59 |