Completed
Push — master ( d6b303...8271f2 )
by Sullivan
02:14
created

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