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.
Completed
Push — master ( 75bdf9...8faa57 )
by joseph
83:56 queued 81:04
created

EntityRepositoryCreator   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 34
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A configurePipeline() 0 5 1
A getEntityFqn() 0 3 1
A setNewObjectFqnFromEntityFqn() 0 6 1
A registerReplaceEntitiesNamespaceProcess() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Src\Entity\Repositories;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\AbstractCreator;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceEntitiesSubNamespaceProcess;
7
8
class EntityRepositoryCreator extends AbstractCreator
9
{
10
    public const FIND_NAME     = 'TemplateEntityRepository';
11
    public const TEMPLATE_PATH = self::ROOT_TEMPLATE_PATH . '/src/Entity/Repositories/' . self::FIND_NAME . '.php';
12
    /**
13
     * @var string
14
     */
15
    private $entityFqn;
16
17 4
    public function configurePipeline(): void
18
    {
19 4
        parent::configurePipeline();
20 4
        $this->registerReplaceEntitiesNamespaceProcess();
21 4
        $this->registerEntityReplaceName($this->getEntityFqn());
22 4
    }
23
24 4
    protected function registerReplaceEntitiesNamespaceProcess(): void
25
    {
26 4
        $process = new ReplaceEntitiesSubNamespaceProcess();
27 4
        $process->setEntityFqn($this->getEntityFqn());
28 4
        $this->pipeline->register($process);
29 4
    }
30
31 4
    private function getEntityFqn(): string
32
    {
33 4
        return $this->entityFqn ?? $this->namespaceHelper->getEntityFqnFromEntityRepositoryFqn($this->newObjectFqn);
34
    }
35
36 2
    public function setNewObjectFqnFromEntityFqn(string $entityFqn): self
37
    {
38 2
        $this->entityFqn    = $entityFqn;
39 2
        $this->newObjectFqn = $this->namespaceHelper->getRepositoryqnFromEntityFqn($entityFqn);
40
41 2
        return $this;
42
    }
43
}
44