Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
Fill
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
3
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
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 * Fill style.
22 *
23 * There are still lot of interesting things for this style that can be added, including gradient. See @see .
24 *
25 * @see  http://www.schemacentral.com/sc/ooxml/t-v_CT_Fill.html
26 * @since 0.12.0
27 */
28class Fill extends AbstractStyle
29{
30    /**
31     * Color.
32     *
33     * @var string
34     */
35    private $color;
36
37    /**
38     * Create a new instance.
39     *
40     * @param array $style
41     */
42    public function __construct($style = [])
43    {
44        $this->setStyleByArray($style);
45    }
46
47    /**
48     * Get color.
49     *
50     * @return string
51     */
52    public function getColor()
53    {
54        return $this->color;
55    }
56
57    /**
58     * Set color.
59     *
60     * @param string $value
61     *
62     * @return self
63     */
64    public function setColor($value = null)
65    {
66        $this->color = $value;
67
68        return $this;
69    }
70}