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