Passed
Pull Request — develop (#28)
by Carlo
04:53
created

DriverCurrentUrl::getCurrentUrl()   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
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Magefix\Plugin;
4
5
/**
6
 * Class DriverCurrentUrl
7
 * 
8
 * @package Magefix\Plugin
9
 * @author  Carlo Tasca <[email protected]>
10
 */
11
trait DriverCurrentUrl
12
{
13
    abstract public function getDriver();
14
15
    /**
16
     * Magefix version backward compatibility method before refactoring to getDriverCurrentUrl
17
     *
18
     *
19
     * @return mixed
20
     */
21
    public function getCurrentUrl()
22
    {
23
        return $this->getDriverCurrentUrl();
24
    }
25
26
    /**
27
     * @return mixed
28
     */
29
    public function getDriverCurrentUrl()
30
    {
31
        return $this->getDriver()->getCurrentUrl();
32
    }
33
}
34