TemplateConfiguration::getTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * (c) Jean-Fran�ois L�pine <https://twitter.com/Halleck45>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Hal\Application\Config;
11
12
/**
13
 * Template configuration
14
 *
15
 * @author Ramunas Geciauskas <[email protected]>
16
 */
17
class TemplateConfiguration
18
{
19
    /** @var string Template title name */
20
    private $title;
21
22
    /**
23
     * @param array $defaults Default settings
24
     */
25
    public function __construct(array $defaults = array())
26
    {
27
        $this->title = empty($defaults['title']) ? 'PhpMetrics report' : $defaults['title'];
28
    }
29
30
    /**
31
     * @param string $title
32
     * @return self
33
     */
34
    public function setTitle($title)
35
    {
36
        $this->title = $title;
37
        return $this;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getTitle()
44
    {
45
        return $this->title;
46
    }
47
}