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

TemplateCommand::getTemplate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
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