Completed
Push — master ( f02869...8251a6 )
by Nicolas
03:31
created

Theme   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getPath() 0 4 1
A getLowerName() 0 4 1
1
<?php namespace Modules\Core\Foundation\Theme;
2
3
class Theme
4
{
5
    /**
6
     * @var string the theme name
7
     */
8
    private $name;
9
    /**
10
     * @var string the theme path
11
     */
12
    private $path;
13
14
    public function __construct($name, $path)
15
    {
16
        $this->name = $name;
17
        $this->path = realpath($path);
18
    }
19
20
    /**
21
     * @return string
22
     */
23
    public function getName()
24
    {
25
        return ucfirst($this->name);
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getPath()
32
    {
33
        return $this->path;
34
    }
35
36
    /**
37
     * Get name in lower case.
38
     *
39
     * @return string
40
     */
41
    public function getLowerName()
42
    {
43
        return strtolower($this->name);
44
    }
45
}
46