TargetLink::getSources()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Bankiru\Seo\Integration\Local;
4
5
use Bankiru\Seo\Entity\TargetLinkInterface;
6
use Bankiru\Seo\SourceFiller;
7
use Bankiru\Seo\TargetDefinitionInterface;
8
9
final class TargetLink implements TargetLinkInterface
10
{
11
    /** @var  TargetDefinitionInterface */
12
    private $target;
13
    /** @var string[] */
14
    private $sources = [];
15
    /** @var  string */
16
    private $template;
17
    /** @var SourceFiller[] */
18
    private $fillers = [];
19
20
    /**
21
     * TargetLink constructor.
22
     *
23
     * @param TargetDefinitionInterface $target
24
     * @param string[]                  $sources
25
     * @param string                    $template
26
     * @param SourceFiller[]            $fillers
27
     */
28 2
    public function __construct(TargetDefinitionInterface $target, $template, array $sources, array $fillers = [])
29
    {
30 2
        $this->target   = $target;
31 2
        $this->sources  = $sources;
32 2
        $this->template = $template;
33 2
        $this->fillers  = $fillers;
34 2
    }
35
36
    /** {@inheritdoc} */
37 1
    public function getTarget()
38
    {
39 1
        return $this->target;
40
    }
41
42
    /** {@inheritdoc} */
43 1
    public function getSources()
44
    {
45 1
        return $this->sources;
46
    }
47
48
    /** {@inheritdoc} */
49 1
    public function getTitleTemplate()
50
    {
51 1
        return $this->template;
52
    }
53
54
    /** {@inheritdoc} */
55 1
    public function getFillers()
56
    {
57 1
        return $this->fillers;
58
    }
59
}
60