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 (#192)
by joseph
40:19
created

setProjectRootNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
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\Process;
4
5
use EdmondsCommerce\DoctrineStaticMeta\CodeGeneration\Filesystem\File;
6
7
class ReplaceProjectRootNamespaceProcess implements ProcessInterface
8
{
9
    public const FIND_NAMESPACE = 'TemplateNamespace\\';
10
    /**
11
     * @var string
12
     */
13
    protected $projectRootNamespace;
14
15
    public function run(File\FindReplace $findReplace): void
16
    {
17
        if (null === $this->projectRootNamespace) {
18
            throw new \RuntimeException('You must set the project root namespace in ' . __CLASS__);
19
        }
20
        $findReplace->findReplace(self::FIND_NAMESPACE, $this->projectRootNamespace);
21
    }
22
23
    /**
24
     * @param string $projectRootNamespace
25
     *
26
     * @return ReplaceProjectRootNamespaceProcess
27
     */
28
    public function setProjectRootNamespace(string $projectRootNamespace): ReplaceProjectRootNamespaceProcess
29
    {
30
        $this->projectRootNamespace = trim($projectRootNamespace, '\\') . '\\';
31
32
        return $this;
33
    }
34
}
35