GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#152)
by joseph
15:36
created

EntityDtoFactoryCreator::configurePipeline()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Src\Entity\Factories;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\AbstractCreator;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceEntitiesSubNamespaceProcess;
7
8
class EntityDtoFactoryCreator extends AbstractCreator
9
{
10
    public const FIND_NAME = 'TemplateEntityDtoFactory';
11
12
    public const TEMPLATE_PATH = self::ROOT_TEMPLATE_PATH . '/src/Entity/Factories/' . self::FIND_NAME . '.php';
13
    /**
14
     * @var string
15
     */
16
    private $entityFqn;
17
18
    public function configurePipeline(): void
19
    {
20
        parent::configurePipeline();
21
        $this->registerReplaceEntitiesNamespaceProcess();
22
        $this->registerEntityReplaceName($this->getEntityFqn());
23
    }
24
25
    protected function registerReplaceEntitiesNamespaceProcess(): void
26
    {
27
        $process = new ReplaceEntitiesSubNamespaceProcess();
28
        $process->setEntityFqn($this->getEntityFqn());
29
        $process->setProjectRootNamespace($this->projectRootNamespace);
30
        $this->pipeline->register($process);
31
    }
32
33
    private function getEntityFqn(): string
34
    {
35
        return $this->entityFqn ?? $this->namespaceHelper->getEntityFqnFromEntityDtoFactoryFqn($this->newObjectFqn);
36
    }
37
38
    public function setNewObjectFqnFromEntityFqn(string $entityFqn): self
39
    {
40
        $this->entityFqn    = $entityFqn;
41
        $this->newObjectFqn = $this->namespaceHelper->getDtoFactoryFqnFromEntityFqn($entityFqn);
42
43
        return $this;
44
    }
45
}
46