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