Rejected   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
dl 0
loc 21
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 1
1
<?php
2
3
namespace Pagantis\SeleniumFormUtils\Step;
4
5
use Facebook\WebDriver\WebDriverBy;
6
7
/**
8
 * Class Returning
9
 *
10
 * @package Pagantis\SeleniumFormUtils\Step
11
 */
12
class Rejected extends AbstractStep
13
{
14
    /**
15
     * Handler step
16
     */
17
    const STEP = 'Rejected';
18
19
    /**
20
     * Forth step reject an order and return tu shop
21
     *
22
     * @param bool $rejected
23
     * @return bool
24
     * @throws \Exception
25
     */
26
    public function run($rejected = false)
27
    {
28
        $this->validateStep(self::STEP);
29
        $formContinue = $this->webDriver->findElement(WebDriverBy::name('back_to_store_button'));
30
        $formContinue->click();
31
32
        return false;
33
    }
34
}
35