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.

ChartOption::__get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Ob\HighchartsBundle\Highcharts;
4
5
/**
6
 * This class is part of the Ob/HighchartsBundle
7
 * See Highcharts documentation at http://www.highcharts.com/ref/#chart
8
 */
9
class ChartOption
10
{
11
    private $option_name;
12
13
    /**
14
     * @param string $name
15
     */
16 69
    public function __construct($name)
17
    {
18 69
        $this->option_name = $name;
19 69
        $this->{$name} = new \stdClass();
20 69
    }
21
22
    /**
23
     * @param string $name
24
     * @param array  $value
25
     *
26
     * @return $this
27
     */
28 62
    public function __call($name, $value)
29
    {
30 62
        $option_name = $this->option_name;
31 62
        $this->{$option_name}->{$name} = $value[0];
32
33 62
        return $this;
34
    }
35
36
    /**
37
     * @param string $name
38
     *
39
     * @return mixed
40
     */
41 36
    public function __get($name)
42
    {
43 36
        $option_name = $this->option_name;
44 36
        $value = $this->{$option_name}->{$name};
45
46 36
        return $value;
47
    }
48
49
    /**
50
     * @param string $name
51
     *
52
     * @return mixed
53
     */
54 67
    public function __isset($name)
55
    {
56 67
        $option_name = $this->option_name;
57
        
58 67
        return isset($this->{$option_name}->{$name});
59
    }
60
}
61