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.
Passed
Push — master ( 8846c9...67b391 )
by 12345
39s
created

ScenarioClearListener::getSubscribedEvents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace espend\Behat\PlaceholderExtension\Subscriber;
5
6
use Behat\Behat\EventDispatcher\Event\ScenarioTested;
7
use espend\Behat\PlaceholderExtension\PlaceholderBagInterface;
8
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
9
10
/**
11
 * @author Daniel Espendiller <[email protected]>
12
 */
13
class ScenarioClearListener implements EventSubscriberInterface
14
{
15
    /**
16
     * @var PlaceholderBagInterface
17
     */
18
    private $parameterBag;
19
20
    /**
21
     * @param PlaceholderBagInterface $parameterBag
22
     */
23
    public function __construct(PlaceholderBagInterface $parameterBag)
24
    {
25
        $this->parameterBag = $parameterBag;
26
    }
27
28
    /**
29
     * Placeholder are only valid per scenario scope.
30
     */
31
    public function onBeforeAfterScenario()
32
    {
33
        $this->parameterBag->clear();
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public static function getSubscribedEvents()
40
    {
41
        return array(
42
            ScenarioTested::BEFORE => 'onBeforeAfterScenario',
43
            ScenarioTested::AFTER => 'onBeforeAfterScenario'
44
        );
45
    }
46
}