Passed
Push — master ( 1d60eb...03dff3 )
by Stiofan
06:44 queued 03:02
created

ExpressionEngineInstaller   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInstallPath() 0 8 1
1
<?php
2
namespace Composer\Installers;
3
4
use Composer\Package\PackageInterface;
5
6
class ExpressionEngineInstaller extends BaseInstaller
7
{
8
9
    protected $locations = array();
10
11
    private $ee2Locations = array(
12
        'addon'   => 'system/expressionengine/third_party/{$name}/',
13
        'theme'   => 'themes/third_party/{$name}/',
14
    );
15
16
    private $ee3Locations = array(
17
        'addon'   => 'system/user/addons/{$name}/',
18
        'theme'   => 'themes/user/{$name}/',
19
    );
20
21
    public function getInstallPath(PackageInterface $package, $frameworkType = '')
22
    {
23
24
        $version = "{$frameworkType}Locations";
25
        $this->locations = $this->$version;
26
27
        return parent::getInstallPath($package, $frameworkType);
28
    }
29
}
30