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.

AbstractExtendingClassGenerator::getFilename()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 10
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 10
loc 10
ccs 6
cts 6
cp 1
crap 1
rs 9.9332
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Tools\ResourceGenerator\FileGenerators;
4
5
use ApiClients\Tools\ResourceGenerator\FileGeneratorInterface;
6
7
abstract class AbstractExtendingClassGenerator implements FileGeneratorInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $yaml;
13
14
    /**
15
     * InterfaceGenerator constructor.
16
     * @param array $yaml
17
     */
18 1
    public function __construct(array $yaml)
19
    {
20 1
        $this->yaml = $yaml;
21 1
    }
22
23
    /**
24
     * @return string
25
     */
26 1 View Code Duplication
    public function getFilename(): string
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
    {
28 1
        return $this->yaml['src']['path'] .
29 1
            DIRECTORY_SEPARATOR .
30
            static::NAMESPACE .
31 1
            DIRECTORY_SEPARATOR .
32 1
            str_replace('\\', DIRECTORY_SEPARATOR, $this->yaml['class']) .
33 1
            '.php'
34
        ;
35
    }
36
}
37