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 ( 8b1591...71dda7 )
by Kevin
03:16
created

CashOnDelivery::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Magium\Magento\Actions\Checkout\PaymentMethods;
4
5
use Magium\Magento\AbstractMagentoTestCase;
6
use Magium\WebDriver\WebDriver;
7
8
class CashOnDelivery implements PaymentMethodInterface
9
{
10
11
    const ACTION = 'Checkout\PaymentMethods\CashOnDelivery';
12
13
    protected $webDriver;
14
    protected $testCase;
15
16
    public function __construct(
17
        WebDriver                   $webDriver,
18
        AbstractMagentoTestCase     $testCase
19
    ) {
20
        $this->webDriver    = $webDriver;
21
        $this->testCase     = $testCase;
22
    }
23
24
    public function getId()
25
    {
26
        return 'p_method_cashondelivery';
27
    }
28
29
    /**
30
     * Fills in the payment form, selecting it, if necessary
31
     *
32
     * @param $requirePayment
33
     */
34
35
    public function pay($requirePayment)
36
    {
37
        if ($requirePayment) {
38
            $this->testCase->assertElementExists($this->getId());
39
        }
40
41
        if ($this->webDriver->elementDisplayed($this->getId())) {
42
            $this->webDriver->byId($this->getId())->click();
43
        }
44
    }
45
}