Completed
Pull Request — master (#19)
by Sullivan
04:16
created

OutdatedPackage::getDepends()   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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SLLH\ComposerVersionsCheck;
4
5
use Composer\Package\PackageInterface;
6
7
/**
8
 * @author Sullivan Senechal <[email protected]>
9
 */
10
final class OutdatedPackage
11
{
12
    /**
13
     * @var PackageInterface
14
     */
15
    private $actual;
16
17
    /**
18
     * @var PackageInterface
19
     */
20
    private $last;
21
22
    /**
23
     * @var PackageInterface[]
24
     */
25
    private $depends = array();
26
27
    /**
28
     * @param PackageInterface   $actual
29
     * @param PackageInterface   $last
30
     * @param PackageInterface[] $depends
31
     */
32
    public function __construct(PackageInterface $actual, PackageInterface $last, array $depends = null)
33
    {
34
        $this->actual = $actual;
35
        $this->last = $last;
36
        if (null !== $depends) {
37
            $this->depends = $depends;
38
        }
39
    }
40
41
    /**
42
     * @return PackageInterface
43
     */
44
    public function getActual()
45
    {
46
        return $this->actual;
47
    }
48
49
    /**
50
     * @return PackageInterface
51
     */
52
    public function getLast()
53
    {
54
        return $this->last;
55
    }
56
57
    /**
58
     * @return PackageInterface[]
59
     */
60
    public function getDepends()
61
    {
62
        return $this->depends;
63
    }
64
}
65