Completed
Push — 3.0 ( ac6a55...46111f )
by Daniel
02:19
created

PackageUnInstallEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 33
ccs 6
cts 6
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getInstalledFiles() 0 4 1
A getPackage() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace MagentoHackathon\Composer\Magento\Event;
4
5
use Composer\EventDispatcher\Event;
6
use Composer\Package\PackageInterface;
7
use MagentoHackathon\Composer\Magento\InstalledPackage;
8
9
/**
10
 * Class PackageUnInstallEvent
11
 * @package MagentoHackathon\Composer\Magento\Event
12
 * @author  Aydin Hassan <[email protected]>
13
 */
14
class PackageUnInstallEvent extends Event
15
{
16
    /**
17
     * @var InstalledPackage
18
     */
19
    protected $package;
20
21
    /**
22
     * @param string           $name
23
     * @param InstalledPackage $package
24
     */
25 6
    public function __construct($name, InstalledPackage $package)
26
    {
27 6
        parent::__construct($name);
28 6
        $this->package = $package;
29 6
    }
30
31
    /**
32
     * @return InstalledPackage
33
     */
34
    public function getPackage()
35
    {
36
        return $this->package;
37
    }
38
39
    /**
40
     * @return array
41
     */
42 1
    public function getInstalledFiles()
43
    {
44 1
        return $this->package->getInstalledFiles();
45
    }
46
}
47