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

Marker   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSymbol() 0 4 1
A setSymbol() 0 6 1
A getSize() 0 4 1
A setSize() 0 6 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\Shape\Chart;
19
20
use PhpOffice\PhpPresentation\ComparableInterface;
21
22
/**
23
 * \PhpOffice\PhpPresentation\Shape\Chart\Axis
24
 */
25
class Marker
26
{
27
    const SYMBOL_CIRCLE = 'circle';
28
    const SYMBOL_DASH = 'dash';
29
    const SYMBOL_DIAMOND = 'diamond';
30
    const SYMBOL_DOT = 'dot';
31
    const SYMBOL_NONE = 'none';
32
    const SYMBOL_PLUS = 'plus';
33
    const SYMBOL_SQUARE = 'square';
34
    const SYMBOL_STAR = 'star';
35
    const SYMBOL_TRIANGLE = 'triangle';
36
    const SYMBOL_X = 'x';
37
38
    public static $arraySymbol = array(
39
        self::SYMBOL_CIRCLE,
40
        self::SYMBOL_DASH,
41
        self::SYMBOL_DIAMOND,
42
        self::SYMBOL_DOT,
43
        self::SYMBOL_NONE,
44
        self::SYMBOL_PLUS,
45
        self::SYMBOL_SQUARE,
46
        self::SYMBOL_STAR,
47
        self::SYMBOL_TRIANGLE,
48
        self::SYMBOL_X
49
    );
50
51
    /**
52
     * @var string
53
     */
54
    protected $symbol = self::SYMBOL_NONE;
55
56
    /**
57
     * @var int
58
     */
59
    protected $size = 5;
60
61
    /**
62
     * @return string
63
     */
64 19
    public function getSymbol()
65
    {
66 19
        return $this->symbol;
67
    }
68
69
    /**
70
     * @param string $symbol
71
     * @return Marker
72
     */
73 5
    public function setSymbol($symbol = self::SYMBOL_NONE)
74
    {
75 5
        $this->symbol = $symbol;
76
77 5
        return $this;
78
    }
79
80
    /**
81
     * @return int
82
     */
83 6
    public function getSize()
84
    {
85 6
        return $this->size;
86
    }
87
88
    /**
89
     * @param int $size
90
     * @return Marker
91
     */
92 5
    public function setSize($size = 5)
93
    {
94 5
        $this->size = $size;
95
96 5
        return $this;
97
    }
98
}
99