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

EntityCreator::configurePipeline()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Src\Entities;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\AbstractCreator;
6
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\CreatorInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceEntitiesSubNamespaceProcess;
8
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Creation\Process\ReplaceEntityIdFieldProcess;
9
10
class EntityCreator extends AbstractCreator
11
{
12
    public const FIND_NAME = 'TemplateEntity';
13
14
    public const TEMPLATE_PATH = self::ROOT_TEMPLATE_PATH . '/' . CreatorInterface::SRC_FOLDER . '/Entities/'
15
                                 . self::FIND_NAME . '.php';
16
17
    /**
18
     * @var ReplaceEntityIdFieldProcess|null
19
     */
20
    private $replaceIdFieldProcess;
21
22 3
    public function configurePipeline(): void
23
    {
24 3
        parent::configurePipeline();
25 3
        $this->registerReplaceEntitiesNamespaceProcess();
26 3
        if (null !== $this->replaceIdFieldProcess) {
27 1
            $this->pipeline->register($this->replaceIdFieldProcess);
28
        }
29 3
    }
30
31 3
    private function registerReplaceEntitiesNamespaceProcess(): void
32
    {
33 3
        $process = new ReplaceEntitiesSubNamespaceProcess();
34 3
        $process->setEntityFqn($this->newObjectFqn);
35 3
        $this->pipeline->register($process);
36 3
    }
37
38
    /**
39
     * If you want to replace the ID field, you must set a preconfigured replace process object using this method
40
     *
41
     * @param ReplaceEntityIdFieldProcess $replaceIdFieldProcess
42
     *
43
     * @return EntityCreator
44
     */
45 1
    public function setReplaceIdFieldProcess(ReplaceEntityIdFieldProcess $replaceIdFieldProcess): EntityCreator
46
    {
47 1
        $this->replaceIdFieldProcess = $replaceIdFieldProcess;
48
49 1
        return $this;
50
    }
51
}
52