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.

SoapContextInitializer::initializeContext()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
/**
3
 * @author Sergii Bondarenko, <[email protected]>
4
 */
5
namespace Behat\SoapExtension\Context;
6
7
use Behat\Behat\Context\Context;
8
use Behat\Behat\Context\Initializer\ContextInitializer;
9
10
/**
11
 * Class SoapContextInitializer.
12
 *
13
 * @package Behat\SoapExtension\Context
14
 */
15
class SoapContextInitializer implements ContextInitializer
16
{
17
    /**
18
     * Parameters of SoapExtension.
19
     *
20
     * @var array
21
     */
22
    private $parameters = [];
23
24
    /**
25
     * @param array $parameters
26
     */
27
    public function __construct(array $parameters)
28
    {
29
        $this->parameters = $parameters;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function initializeContext(Context $context)
36
    {
37
        if ($context instanceof SoapContextInterface) {
38
            $context->setSoapParameters($this->parameters);
39
        }
40
    }
41
}
42