Rejected::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
rs 10
c 1
b 0
f 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