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.

initializeContext()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace espend\Behat\PlaceholderExtension\Context\Initializer;
5
6
use Behat\Behat\Context\Context;
7
use Behat\Behat\Context\Initializer\ContextInitializer;
8
use espend\Behat\PlaceholderExtension\Context\PlaceholderBagAwareContextInterface;
9
use espend\Behat\PlaceholderExtension\PlaceholderBagInterface;
10
11
/**
12
 * @author Daniel Espendiller <[email protected]>
13
 */
14
class PlaceholderBagAwareInitializer implements ContextInitializer
15
{
16
    /**
17
     * @var PlaceholderBagInterface
18
     */
19
    private $placeholderBag;
20
21
    /**
22
     * @param PlaceholderBagInterface $placeholderBag
23
     */
24 1
    public function __construct(PlaceholderBagInterface $placeholderBag)
25
    {
26 1
        $this->placeholderBag = $placeholderBag;
27 1
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 1
    public function initializeContext(Context $context)
33
    {
34 1
        if ($context instanceof PlaceholderBagAwareContextInterface) {
35 1
            $context->setPlaceholderBag($this->placeholderBag);
36
        }
37 1
    }
38
}
39