Passed
Pull Request — develop (#28)
by Carlo
05:26
created

DriverCurrentUrl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
rs 10
c 2
b 0
f 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
getDriver() 0 1 ?
A getCurrentUrl() 0 4 1
A getDriverCurrentUrl() 0 4 1
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