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
Push — master ( 0e8d57...0cb85b )
by Kevin
06:52 queued 03:23
created

TermsAndConditions::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 7
nc 1
nop 3
1
<?php
2
3
namespace Magium\Magento\Actions\Checkout\Steps;
4
5
use Magium\Magento\AbstractMagentoTestCase;
6
use Magium\Magento\Actions\Checkout\AbstractCheckout;
7
use Magium\Magento\Themes\OnePageCheckout\AbstractThemeConfiguration;
8
use Magium\WebDriver\WebDriver;
9
10
class TermsAndConditions implements StepInterface
11
{
12
    const ACTION = 'Checkout\Steps\TermsAndConditions';
13
14
    protected $webdriver;
15
    protected $theme;
16
    protected $testCase;
17
18
    protected $checkboxText;
19
    
20
    public function __construct(
21
        WebDriver                   $webdriver,
22
        AbstractThemeConfiguration  $theme,
23
        AbstractMagentoTestCase     $testCase
24
    ) {
25
        $this->webdriver        = $webdriver;
26
        $this->theme            = $theme;
27
        $this->testCase         = $testCase;
28
    }
29
30
    public function setCheckboxText($text)
31
    {
32
        $this->checkboxText = $text;
33
    }
34
35
    public function configureCheckout(AbstractCheckout $checkout, $before = 'Magium\Magento\Actions\Checkout\Steps\PlaceOrder')
36
    {
37
        if ($before) {
38
            $before = $this->testCase->get($before);
39
        }
40
        $checkout->addStep($this, $before);
41
    }
42
43
    public function execute()
44
    {
45
        if ($this->checkboxText) {
46
            $xpath = $this->theme->getTermsAndConditionsSelectorXpath($this->checkboxText);
47
            $element = $this->webdriver->byXpath($xpath);
48
            $element->click();
49
        }
50
51
        return true;
52
    }
53
54
    public function nextAction()
55
    {
56
        return true;
57
    }
58
}