GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Arc::setBackgroundColor()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 5
rs 10
c 2
b 0
f 1
1
<?php
2
3
namespace Halfpastfour\PHPChartJS\Options\Elements;
4
5
use Halfpastfour\PHPChartJS\ArraySerializableInterface;
6
use Halfpastfour\PHPChartJS\Delegate\ArraySerializable;
7
use JsonSerializable;
8
9
/**
10
 * Class Arc
11
 *
12
 * @package Halfpastfour\PHPChartJS\Options\Elements
13
 */
14
class Arc implements ArraySerializableInterface, JsonSerializable
15
{
16
    use ArraySerializable;
17
18
    /**
19
     * Arc fill color.
20
     *
21
     * @default 'rgba(0,0,0,0.1)'
22
     * @var string
23
     */
24
    private $backgroundColor;
25
26
    /**
27
     * Arc stroke color.
28
     *
29
     * @default '#fff'
30
     * @var string
31
     */
32
    private $borderColor;
33
34
    /**
35
     * Arc stroke width.
36
     *
37
     * @default 2
38
     * @var int
39
     */
40
    private $borderWidth;
41
42
    /**
43
     * @return string
44
     */
45
    public function getBackgroundColor()
46
    {
47
        return $this->backgroundColor;
48
    }
49
50
    /**
51
     * @param string $backgroundColor
52
     *
53
     * @return Arc
54
     */
55
    public function setBackgroundColor($backgroundColor)
56
    {
57
        $this->backgroundColor = is_null($backgroundColor) ? null : strval($backgroundColor);
0 ignored issues
show
introduced by
The condition is_null($backgroundColor) is always false.
Loading history...
58
59
        return $this;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getBorderColor()
66
    {
67
        return $this->borderColor;
68
    }
69
70
    /**
71
     * @param string $borderColor
72
     *
73
     * @return Arc
74
     */
75
    public function setBorderColor($borderColor)
76
    {
77
        $this->borderColor = is_null($borderColor) ? null : strval($borderColor);
0 ignored issues
show
introduced by
The condition is_null($borderColor) is always false.
Loading history...
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return int
84
     */
85
    public function getBorderWidth()
86
    {
87
        return $this->borderWidth;
88
    }
89
90
    /**
91
     * @param int $borderWidth
92
     *
93
     * @return Arc
94
     */
95
    public function setBorderWidth($borderWidth)
96
    {
97
        $this->borderWidth = intval($borderWidth);
98
99
        return $this;
100
    }
101
102
    /**
103
     * @return array
104
     */
105
    public function jsonSerialize()
106
    {
107
        return $this->getArrayCopy();
108
    }
109
}
110