Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
14 / 14 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
1 / 1 |
Marker | |
100.00% |
14 / 14 |
|
100.00% |
9 / 9 |
9 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getSymbol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSymbol | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getSize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSize | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getFill | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFill | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getBorder | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setBorder | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
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 | * @see https://github.com/PHPOffice/PHPPresentation |
14 | * |
15 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
16 | */ |
17 | |
18 | declare(strict_types=1); |
19 | |
20 | namespace PhpOffice\PhpPresentation\Shape\Chart; |
21 | |
22 | use PhpOffice\PhpPresentation\Style\Border; |
23 | use PhpOffice\PhpPresentation\Style\Fill; |
24 | |
25 | class Marker |
26 | { |
27 | public const SYMBOL_CIRCLE = 'circle'; |
28 | public const SYMBOL_DASH = 'dash'; |
29 | public const SYMBOL_DIAMOND = 'diamond'; |
30 | public const SYMBOL_DOT = 'dot'; |
31 | public const SYMBOL_NONE = 'none'; |
32 | public const SYMBOL_PLUS = 'plus'; |
33 | public const SYMBOL_SQUARE = 'square'; |
34 | public const SYMBOL_STAR = 'star'; |
35 | public const SYMBOL_TRIANGLE = 'triangle'; |
36 | public const SYMBOL_X = 'x'; |
37 | |
38 | /** |
39 | * @var array<int, string> |
40 | */ |
41 | public static $arraySymbol = [ |
42 | self::SYMBOL_CIRCLE, |
43 | self::SYMBOL_DASH, |
44 | self::SYMBOL_DIAMOND, |
45 | self::SYMBOL_DOT, |
46 | self::SYMBOL_NONE, |
47 | self::SYMBOL_PLUS, |
48 | self::SYMBOL_SQUARE, |
49 | self::SYMBOL_STAR, |
50 | self::SYMBOL_TRIANGLE, |
51 | self::SYMBOL_X, |
52 | ]; |
53 | |
54 | /** |
55 | * @var string |
56 | */ |
57 | protected $symbol = self::SYMBOL_NONE; |
58 | |
59 | /** |
60 | * @var int |
61 | */ |
62 | protected $size = 5; |
63 | |
64 | /** |
65 | * @var Fill |
66 | */ |
67 | protected $fill; |
68 | |
69 | /** |
70 | * @var Border |
71 | */ |
72 | protected $border; |
73 | |
74 | public function __construct() |
75 | { |
76 | $this->fill = new Fill(); |
77 | $this->border = new Border(); |
78 | } |
79 | |
80 | public function getSymbol(): string |
81 | { |
82 | return $this->symbol; |
83 | } |
84 | |
85 | public function setSymbol(string $symbol = self::SYMBOL_NONE): self |
86 | { |
87 | $this->symbol = $symbol; |
88 | |
89 | return $this; |
90 | } |
91 | |
92 | public function getSize(): int |
93 | { |
94 | return $this->size; |
95 | } |
96 | |
97 | public function setSize(int $size = 5): self |
98 | { |
99 | $this->size = $size; |
100 | |
101 | return $this; |
102 | } |
103 | |
104 | public function getFill(): Fill |
105 | { |
106 | return $this->fill; |
107 | } |
108 | |
109 | public function setFill(Fill $fill): self |
110 | { |
111 | $this->fill = $fill; |
112 | |
113 | return $this; |
114 | } |
115 | |
116 | public function getBorder(): Border |
117 | { |
118 | return $this->border; |
119 | } |
120 | |
121 | public function setBorder(Border $border): self |
122 | { |
123 | $this->border = $border; |
124 | |
125 | return $this; |
126 | } |
127 | } |