Completed
Pull Request — develop (#190)
by Franck
08:58
created

Outline   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 56
ccs 13
cts 13
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFill() 0 4 1
A setFill() 0 5 1
A getWidth() 0 4 1
A setWidth() 0 5 1
1
<?php
2
/**
3
 * This file is part of PHPPresentation - A pure PHP library for reading and writing
4
 * presentations documents.
5
 *
6
 * PHPPresentation 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/PHPPresentation/contributors.
12
 *
13
 * @link        https://github.com/PHPOffice/PHPPresentation
14
 * @copyright   2009-2015 PHPPresentation contributors
15
 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL version 3
16
 */
17
18
namespace PhpOffice\PhpPresentation\Style;
19
20
/**
21
 * \PhpOffice\PhpPresentation\Style\Outline
22
 */
23
class Outline
24
{
25
    /**
26
     * @var Fill
27
     */
28
    protected $fill;
29
    /**
30
     * @var int
31
     */
32
    protected $width;
33
34
    /**
35
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
36
     */
37 8
    public function __construct()
38
    {
39 8
        $this->fill = new Fill();
40 8
    }
41
42
    /**
43
     * @return Fill
44
     */
45 6
    public function getFill()
46
    {
47 6
        return $this->fill;
48
    }
49
50
    /**
51
     * @param Fill $fill
52
     * @return Outline
53
     */
54 1
    public function setFill(Fill $fill)
55
    {
56 1
        $this->fill = $fill;
57 1
        return $this;
58
    }
59
60
    /**
61
     * @return int
62
     */
63 6
    public function getWidth()
64
    {
65 6
        return $this->width;
66
    }
67
68
    /**
69
     * Value in points
70
     * @param int $width
71
     * @return Outline
72
     */
73 5
    public function setWidth($width)
74
    {
75 5
        $this->width = intval($width);
76 5
        return $this;
77
    }
78
}
79