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.

BeforeScenarioSubscriber   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 26
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 7 1
A onBeforeScenarioTested() 0 5 1
A getScenarioTags() 0 4 1
1
<?php
2
/*
3
 * To change this license header, choose License Headers in Project Properties.
4
 * To change this template file, choose Tools | Templates
5
 * and open the template in the editor.
6
 */
7
8
namespace Ciandt\Behat\PlaceholdersExtension\Subscriber;
9
10
use Behat\Behat\EventDispatcher\Event\BeforeOutlineTested;
11
use Behat\Behat\EventDispatcher\Event\BeforeScenarioTested;
12
use Behat\Behat\EventDispatcher\Event\OutlineTested;
13
use Behat\Behat\EventDispatcher\Event\ScenarioTested;
14
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15
16
/**
17
 * Description of BeforeScenarioSubscriber
18
 *
19
 * @author bwowk
20
 */
21
class BeforeScenarioSubscriber implements EventSubscriberInterface
22
{
23
    
24
    private $scenarioTags;
25
    
26
    public static function getSubscribedEvents()
27
    {
28
        return array(
29
            ScenarioTested::BEFORE => 'onBeforeScenarioTested',
30
            OutlineTested::BEFORE => 'onBeforeScenarioTested'
31
            );
32
    }
33
    
34
    public function onBeforeScenarioTested($beforeScenario){
35
        $featureTags = $beforeScenario->getFeature()->getTags();
36
        $scenarioTags = $beforeScenario->getNode()->getTags();
37
        $this->scenarioTags = array_merge($featureTags, $scenarioTags);
38
    }
39
    
40
    public function getScenarioTags()
41
    {
42
        return $this->scenarioTags;
43
    }
44
45
46
}
47