PackagePreInstallEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 25
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPackage() 0 4 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\Deploy\Manager\Entry;
8
9
/**
10
 * Class PackageDeployEvent
11
 * @package MagentoHackathon\Composer\Magento\Event
12
 * @author  Aydin Hassan <[email protected]>
13
 */
14
class PackagePreInstallEvent extends Event
15
{
16
    /**
17
     * @var PackageInterface
18
     */
19
    protected $package;
20
21
    /**
22
     * @param string           $name
23
     * @param PackageInterface $package
24
     */
25
    public function __construct($name, PackageInterface $package)
26
    {
27
        parent::__construct($name);
28
        $this->package = $package;
29
    }
30
31
    /**
32
     * @return PackageInterface
33
     */
34
    public function getPackage()
35
    {
36
        return $this->package;
37
    }
38
}
39