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.

VCRAwareInitializer::initializeContext()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
3
namespace BVCR\Behat\Context\Initializer;
4
5
use Behat\Behat\Context\Context;
6
use Behat\Behat\Context\Initializer\ContextInitializer;
7
use BVCR\Behat\Context\VCRAwareContext;
8
use VCR\Videorecorder;
9
10
class VCRAwareInitializer implements ContextInitializer
11
{
12
    private $videorecorder;
13
14 2
    public function __construct(Videorecorder $videorecorder)
15
    {
16 2
        $this->videorecorder = $videorecorder;
17 2
    }
18
19 2
    public function initializeContext(Context $context)
20
    {
21 2
        if ($context instanceof VCRAwareContext) {
22 1
            $context->setVideorecorder($this->videorecorder);
23 1
        }
24 2
    }
25
}
26