HeaderTrait::getTitle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace MisterIcy\ExcelWriter\Properties\Traits;
5
6
/**
7
 * Trait HeaderTrait
8
 * @package MisterIcy\ExcelWriter\Properties\Traits
9
 *
10
 * @author Alexandros Koutroulis <[email protected]>
11
 * @license MIT
12
 */
13
trait HeaderTrait
14
{
15
    /**
16
     * Column's Header
17
     * @var string
18
     */
19
    protected $title = '';
20
21
    /**
22
     * Column's width
23
     * @var int
24
     */
25
    protected $width = 0;
26
27
    /**
28
     * @return string
29
     */
30
    public function getTitle(): string
31
    {
32
        return $this->title;
33
    }
34
35
    /**
36
     * @param string $title
37
     * @return
38
     */
39
    public function setTitle(string $title) : self
40
    {
41
        $this->title = $title;
42
        return $this;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getWidth(): int
49
    {
50
        return $this->width;
51
    }
52
53
    /**
54
     * @param int $width
55
     * @return
56
     */
57
    public function setWidth(int $width) : self
58
    {
59
        $this->width = $width;
60
        return $this;
61
    }
62
}
63