Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2.003 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
12 | 1 | public function createTargetFileObject(?string $newObjectFqn = null): AbstractCreator |
|
13 | { |
||
14 | 1 | if (null !== $newObjectFqn) { |
|
15 | throw new \RuntimeException('You should not pass a new object FQN to this creator'); |
||
16 | } |
||
17 | 1 | $this->templateFile = $this->fileFactory->createFromExistingPath(static::TEMPLATE_PATH); |
|
18 | 1 | $this->targetFile = new File( |
|
19 | 1 | \str_replace( |
|
20 | 1 | self::ROOT_TEMPLATE_PATH, |
|
21 | 1 | $this->projectRootDirectory, |
|
22 | 1 | static::TEMPLATE_PATH |
|
23 | ) |
||
24 | ); |
||
25 | 1 | $this->setTargetContentsWithTemplateContents(); |
|
26 | |||
27 | 1 | return $this; |
|
28 | } |
||
30 |