Total Complexity | 5 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractComponentFactory extends AbstractFactory |
||
10 | { |
||
11 | /** |
||
12 | * @param AbstractComponent $component |
||
13 | * @param array|null $ops |
||
14 | */ |
||
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 | } |
||
26 | 22 | } |
|
27 | |||
28 | 18 | protected static function getIgnoreOps(): array |
|
32 | ]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | 43 | protected static function defaultOps(): array |
|
44 | ]; |
||
45 | } |
||
47 |