Candidate::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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