Completed
Push — master ( 9d2c7e...85264a )
by Jan Philipp
11s
created

TemplateCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 49
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getLineNumber() 0 4 1
A getTemplate() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Psh\ScriptRuntime;
4
5
class TemplateCommand implements Command
6
{
7
    /**
8
     * @var string
9
     */
10
    private $source;
11
    /**
12
     * @var string
13
     */
14
    private $destination;
15
    /**
16
     * @var int
17
     */
18
    private $lineNumber;
19
20
    /**
21
     * @param string $source
22
     * @param string $destination
23
     * @param int $lineNumber
24
     */
25
    public function __construct(
26
        string $source,
27
        string $destination,
28
        int $lineNumber
29
    ) {
30
        $this->source = $source;
31
        $this->destination = $destination;
32
        $this->lineNumber = $lineNumber;
33
    }
34
35
    /**
36
     * @return int
37
     */
38
    public function getLineNumber(): int
39
    {
40
        return $this->lineNumber;
41
    }
42
43
    /**
44
     * @return Template
45
     */
46
    public function getTemplate(): Template
47
    {
48
        return new Template(
49
            $this->source,
50
            $this->destination
51
        );
52
    }
53
}
54