Completed
Push — master ( e6cea0...5c122a )
by Marcin
01:53
created

Font::setColor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Grandstream-XMLApp
4
 *
5
 * Copyright (c) 2017 pudelek.org.pl
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For the full copyright and license information, please view source file
10
 * that is bundled with this package in the file LICENSE
11
 *
12
 * @author  Marcin Pudełek <[email protected]>
13
 */
14
15
namespace mrcnpdlk\Grandstream\XMLApp\Helper;
16
17
18
class Font
19
{
20
    /**
21
     * @var \mrcnpdlk\Grandstream\XMLApp\Helper\Color
22
     */
23
    private $oColor;
24
    /**
25
     * @var string
26
     */
27
    private $sHorizontalAlign;
28
    /**
29
     * @var string
30
     */
31
    private $sType;
32
33
    /**
34
     * Font constructor.
35
     */
36 1
    public function __construct()
37
    {
38 1
        $this->oColor           = new Color(100);
39 1
        $this->sHorizontalAlign = 'left';
40 1
        $this->sType            = 'unifont';
41 1
    }
42
43 1
    public function setType(string $sType)
44
    {
45 1
        $this->sType = $sType;
46
47 1
        return $this;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 1
    public function getType()
54
    {
55 1
        return $this->sType;
56
    }
57
58
    /**
59
     * @return \mrcnpdlk\Grandstream\XMLApp\Helper\Color
60
     */
61 1
    public function getColor()
62
    {
63 1
        return $this->oColor;
64
    }
65
66
    /**
67
     * @param Color $oColor
68
     *
69
     * @return Font
70
     */
71 1
    public function setColor(Color $oColor)
72
    {
73 1
        $this->oColor = $oColor;
74
75 1
        return $this;
76
    }
77
78
    /**
79
     * @return string
80
     */
81 1
    public function getHorizontalAlign()
82
    {
83 1
        return $this->sHorizontalAlign;
84
    }
85
86
    /**
87
     * @param string $sHorizontalAlign
88
     *
89
     * @return Font
90
     */
91 1
    public function setHorizontalAlign(string $sHorizontalAlign)
92
    {
93 1
        $this->sHorizontalAlign = $sHorizontalAlign;
94
95 1
        return $this;
96
    }
97
}
98