Passed
Push — master ( 72c793...7f699f )
by Kirill
03:22
created

ViewPath   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 45
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBasename() 0 3 1
A getName() 0 3 1
A __construct() 0 5 1
A getNamespace() 0 3 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Views\Loader;
13
14
final class ViewPath
15
{
16
    /** @var string */
17
    private $namespace;
18
19
    /** @var string */
20
    private $name;
21
22
    /** @var string */
23
    private $basename;
24
25
    /**
26
     * @param string $namespace
27
     * @param string $name
28
     * @param string $basename
29
     */
30
    public function __construct(string $namespace, string $name, string $basename)
31
    {
32
        $this->namespace = $namespace;
33
        $this->name = $name;
34
        $this->basename = $basename;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getNamespace(): string
41
    {
42
        return $this->namespace;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getName(): string
49
    {
50
        return $this->name;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getBasename(): string
57
    {
58
        return $this->basename;
59
    }
60
}
61