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.
Completed
Pull Request — master (#24)
by Vincent
04:48
created

ScenarioStateCall   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getScope() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ScenarioStateBehatExtension project.
5
 *
6
 * (c) Rodrigue Villetard <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gorghoa\ScenarioStateBehatExtension;
13
14
use Behat\Testwork\Environment\Call\EnvironmentCall;
15
use Behat\Testwork\Hook\Hook;
16
use Behat\Testwork\Hook\Scope\HookScope;
17
18
/**
19
 * @author Vincent Chalamon <[email protected]>
20
 */
21
final class ScenarioStateCall extends EnvironmentCall
22
{
23
    /**
24
     * @var HookScope
25
     */
26
    private $scope;
27
28
    /**
29
     * Initializes scenario state call.
30
     *
31
     * @param HookScope    $scope
32
     * @param Hook         $hook
33
     * @param null|integer $errorReportingLevel
34
     */
35
    public function __construct(HookScope $scope, Hook $hook, $arguments, $errorReportingLevel = null)
36
    {
37
        $environment;
0 ignored issues
show
Bug introduced by
The variable $environment does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
38
        $hook;
39
        $arguments;
40
        $errorReportingLevel;
41
        parent::__construct($scope->getEnvironment(), $hook, array($scope, $arguments), $errorReportingLevel);
42
43
        $this->scope = $scope;
44
    }
45
46
    /**
47
     * Returns hook scope.
48
     *
49
     * @return HookScope
50
     */
51
    public function getScope()
52
    {
53
        return $this->scope;
54
    }
55
}
56