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.

createFilename()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
ccs 8
cts 8
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 3
crap 1
1
<?php
2
3
namespace BVCR\Behat\Cassette;
4
5
use Behat\Gherkin\Node\FeatureNode;
6
use Behat\Gherkin\Node\OutlineNode;
7
use Behat\Gherkin\Node\ScenarioInterface;
8
9
class ExtensionDecoratorFileNamingStrategy implements FileNamingStrategy
10
{
11
    private $fileNamingStrategy;
12
    private $extension;
13
14 2
    public function __construct(FileNamingStrategy $fileNamingStrategy, $extension = '')
15
    {
16 2
        $this->fileNamingStrategy = $fileNamingStrategy;
17 2
        $this->extension = $extension;
18 2
    }
19
20 1
    public function createFilename(FeatureNode $feature, ScenarioInterface $scenario, OutlineNode $outline = null)
21
    {
22 1
        return rtrim(
23 1
            sprintf(
24 1
                '%s.%s',
25 1
                $this->fileNamingStrategy->createFilename($feature, $scenario, $outline),
26 1
                $this->extension
27 1
            ),
28
            '.'
29 1
        );
30
    }
31
}
32