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

OutdatedPackage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 55
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getActual() 0 4 1
A getLast() 0 4 1
A getLinks() 0 4 1
A __construct() 0 8 2
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