Completed
Push — master ( 27493f...f3deef )
by Marcin
01:42
created

Font::setType()   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
 * @package mrcnpdlk\Grandstream\XMLApp\Helper
21
 */
22
class Font
23
{
24
    /**
25
     * @var \mrcnpdlk\Grandstream\XMLApp\Helper\Color
26
     */
27
    private $oColor;
28
    /**
29
     * @var string
30
     */
31
    private $sHorizontalAlign;
32
    /**
33
     * @var string
34
     */
35
    private $sType;
36
37
    /**
38
     * Font constructor.
39
     */
40 1
    public function __construct()
41
    {
42 1
        $this->oColor           = new Color(100);
43 1
        $this->sHorizontalAlign = 'left';
44 1
        $this->sType            = 'unifont';
45 1
    }
46
47 1
    public function setType(string $sType)
48
    {
49 1
        $this->sType = $sType;
50
51 1
        return $this;
52
    }
53
54
    /**
55
     * @return string
56
     */
57 1
    public function getType()
58
    {
59 1
        return $this->sType;
60
    }
61
62
    /**
63
     * @return \mrcnpdlk\Grandstream\XMLApp\Helper\Color
64
     */
65 1
    public function getColor()
66
    {
67 1
        return $this->oColor;
68
    }
69
70
    /**
71
     * @param Color $oColor
72
     *
73
     * @return Font
74
     */
75 1
    public function setColor(Color $oColor)
76
    {
77 1
        $this->oColor = $oColor;
78
79 1
        return $this;
80
    }
81
82
    /**
83
     * @return string
84
     */
85 1
    public function getHorizontalAlign()
86
    {
87 1
        return $this->sHorizontalAlign;
88
    }
89
90
    /**
91
     * @param string $sHorizontalAlign
92
     *
93
     * @return Font
94
     */
95 1
    public function setHorizontalAlign(string $sHorizontalAlign)
96
    {
97 1
        $this->sHorizontalAlign = $sHorizontalAlign;
98
99 1
        return $this;
100
    }
101
}
102