TemplateConfiguration   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A setTitle() 0 5 1
A getTitle() 0 4 1
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
}