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.

PlaceholderBagAwareInitializer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 25
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A initializeContext() 0 6 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