TitleTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 32
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 4 1
A setTitle() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of the Axstrad library.
5
 *
6
 * (c) Dan Kempster <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @copyright 2014-2015 Dan Kempster <[email protected]>
12
 */
13
14
namespace Axstrad\Common\Traits;
15
16
/**
17
 * Axstrad\Common\Traits\TitleTrait
18
 *
19
 * @author Dan Kempster <[email protected]>
20
 * @license MIT
21
 * @package Axstrad/Common
22
 * @subpackage Traits
23
 */
24
trait TitleTrait
25
{
26
    /**
27
     * @var string
28
     */
29
    protected $title;
30
31
32
    /**
33
     * Get title
34
     *
35
     * @return string
36
     * @see setTitle
37
     */
38
    public function getTitle()
39
    {
40
        return $this->title;
41
    }
42
43
    /**
44
     * Set title
45
     *
46
     * @param string $title
47
     * @return self
48
     * @see getTitle
49
     */
50
    public function setTitle($title)
51
    {
52
        $this->title = (string) $title;
53
        return $this;
54
    }
55
}
56