Passed
Push — trunk ( 13f525...a8cce2 )
by Christian
12:21 queued 14s
created

GenericSnippetFile   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 60
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getIso() 0 3 1
A setTechnicalName() 0 3 1
A __construct() 0 8 1
A isBase() 0 3 1
A getName() 0 3 1
A getAuthor() 0 3 1
A getTechnicalName() 0 3 1
A getPath() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\System\Snippet\Files;
4
5
class GenericSnippetFile extends AbstractSnippetFile
6
{
7
    private string $name;
8
9
    private string $path;
10
11
    private string $iso;
12
13
    private string $author;
14
15
    private bool $isBase;
16
17
    private string $technicalName;
18
19
    /**
20
     * @deprecated tag:v6.5.0 - parameter $technicalName will be required
21
     */
22
    public function __construct(string $name, string $path, string $iso, string $author, bool $isBase, ?string $technicalName = null)
23
    {
24
        $this->name = $name;
25
        $this->path = $path;
26
        $this->iso = $iso;
27
        $this->author = $author;
28
        $this->isBase = $isBase;
29
        $this->technicalName = $technicalName ?? '';
30
    }
31
32
    public function getName(): string
33
    {
34
        return $this->name;
35
    }
36
37
    public function getPath(): string
38
    {
39
        return $this->path;
40
    }
41
42
    public function getIso(): string
43
    {
44
        return $this->iso;
45
    }
46
47
    public function getAuthor(): string
48
    {
49
        return $this->author;
50
    }
51
52
    public function isBase(): bool
53
    {
54
        return $this->isBase;
55
    }
56
57
    public function getTechnicalName(): string
58
    {
59
        return $this->technicalName;
60
    }
61
62
    public function setTechnicalName(string $technicalName): void
63
    {
64
        $this->technicalName = $technicalName;
65
    }
66
}
67