Candidate   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 40
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSymbols() 0 3 1
A __construct() 0 6 1
A getPackage() 0 3 1
1
<?php
2
/**
3
 * Copyright MediaCT. All rights reserved.
4
 * https://www.mediact.nl
5
 */
6
7
namespace Mediact\DependencyGuard\Candidate;
8
9
use Composer\Package\PackageInterface;
10
use Mediact\DependencyGuard\Php\SymbolIteratorInterface;
11
12
class Candidate implements CandidateInterface
13
{
14
    /** @var PackageInterface */
15
    private $package;
16
17
    /** @var SymbolIteratorInterface */
18
    private $symbols;
19
20
    /**
21
     * Constructor.
22
     *
23
     * @param PackageInterface        $package
24
     * @param SymbolIteratorInterface $symbols
25
     */
26 1
    public function __construct(
27
        PackageInterface $package,
28
        SymbolIteratorInterface $symbols
29
    ) {
30 1
        $this->package = $package;
31 1
        $this->symbols = $symbols;
32 1
    }
33
34
    /**
35
     * Get the composer package.
36
     *
37
     * @return PackageInterface
38
     */
39 1
    public function getPackage(): PackageInterface
40
    {
41 1
        return $this->package;
42
    }
43
44
    /**
45
     * Get the symbols.
46
     *
47
     * @return SymbolIteratorInterface
48
     */
49 1
    public function getSymbols(): SymbolIteratorInterface
50
    {
51 1
        return $this->symbols;
52
    }
53
}
54