Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | class EntityInterfaceCreator extends AbstractCreator |
||
9 | { |
||
10 | public const FIND_NAME = 'TemplateEntityInterface'; |
||
11 | |||
12 | public const TEMPLATE_PATH = self::ROOT_TEMPLATE_PATH . '/src/Entity/Interfaces/' . self::FIND_NAME . '.php'; |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $entityFqn; |
||
17 | |||
18 | 4 | public function configurePipeline(): void |
|
19 | { |
||
20 | 4 | parent::configurePipeline(); |
|
21 | 4 | $this->registerReplaceEntitiesNamespaceProcess(); |
|
22 | 4 | } |
|
23 | |||
24 | 4 | protected function registerReplaceEntitiesNamespaceProcess(): void |
|
25 | { |
||
26 | 4 | $process = new ReplaceEntitiesSubNamespaceProcess(); |
|
27 | 4 | $process->setEntityFqn( |
|
28 | 4 | $this->entityFqn ?? $this->namespaceHelper->getEntityFqnFromEntityInterfaceFqn($this->newObjectFqn) |
|
29 | ); |
||
30 | 4 | $this->pipeline->register($process); |
|
31 | 4 | } |
|
32 | |||
33 | 2 | public function setNewObjectFqnFromEntityFqn(string $entityFqn): self |
|
39 | } |
||
40 | } |
||
41 |