Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
Shadow | |
100.00% |
7 / 7 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getColor | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setColor | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getOffset | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setOffset | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of PHPWord - A pure PHP library for reading and writing |
5 | * word processing documents. |
6 | * |
7 | * PHPWord is free software distributed under the terms of the GNU Lesser |
8 | * General Public License version 3 as published by the Free Software Foundation. |
9 | * |
10 | * For the full copyright and license information, please read the LICENSE |
11 | * file that was distributed with this source code. For the full list of |
12 | * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. |
13 | * |
14 | * @see https://github.com/PHPOffice/PHPWord |
15 | * |
16 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
17 | */ |
18 | |
19 | namespace PhpOffice\PhpWord\Style; |
20 | |
21 | /** |
22 | * Shadow style. |
23 | * |
24 | * @see http://www.schemacentral.com/sc/ooxml/t-v_CT_Shadow.html |
25 | * @since 0.12.0 |
26 | */ |
27 | class Shadow extends AbstractStyle |
28 | { |
29 | /** |
30 | * Color. |
31 | * |
32 | * @var string |
33 | */ |
34 | private $color; |
35 | |
36 | /** |
37 | * Offset; Format: 3pt,3pt. |
38 | * |
39 | * @var string |
40 | */ |
41 | private $offset; |
42 | |
43 | /** |
44 | * Create a new instance. |
45 | * |
46 | * @param array $style |
47 | */ |
48 | public function __construct($style = []) |
49 | { |
50 | $this->setStyleByArray($style); |
51 | } |
52 | |
53 | /** |
54 | * Get color. |
55 | * |
56 | * @return string |
57 | */ |
58 | public function getColor() |
59 | { |
60 | return $this->color; |
61 | } |
62 | |
63 | /** |
64 | * Set color. |
65 | * |
66 | * @param string $value |
67 | * |
68 | * @return self |
69 | */ |
70 | public function setColor($value = null) |
71 | { |
72 | $this->color = $value; |
73 | |
74 | return $this; |
75 | } |
76 | |
77 | /** |
78 | * Get offset. |
79 | * |
80 | * @return string |
81 | */ |
82 | public function getOffset() |
83 | { |
84 | return $this->offset; |
85 | } |
86 | |
87 | /** |
88 | * Set offset. |
89 | * |
90 | * @param string $value |
91 | * |
92 | * @return self |
93 | */ |
94 | public function setOffset($value = null) |
95 | { |
96 | $this->offset = $value; |
97 | |
98 | return $this; |
99 | } |
100 | } |