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.

Input   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
dl 0
loc 52
c 0
b 0
f 0
wmc 4
lcom 1
cbo 0
ccs 9
cts 10
cp 0.9
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A set() 0 6 1
A get() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JonnyW\PhantomJs\Procedure;
11
12
/**
13
 * PHP PhantomJs
14
 *
15
 * @author Jon Wenmoth <[email protected]>
16
 */
17
class Input implements InputInterface
18
{
19
    /**
20
     * Data storage.
21
     *
22
     * @var array
23
     * @access protected
24
     */
25
    protected $data;
26
27
    /**
28
     * Internal constructor.
29
     *
30
     * @access public
31
     * @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...
32
     */
33 21
    public function __construct()
34
    {
35 21
        $this->data = array();
36 21
    }
37
38
    /**
39
     * Set data value.
40
     *
41
     * @access public
42
     * @param  string                            $name
43
     * @param  mixed                             $value
44
     * @return \JonnyW\PhantomJs\Procedure\Input
45
     */
46 19
    public function set($name, $value)
47
    {
48 19
        $this->data[$name] = $value;
49
50 19
        return $this;
51
    }
52
53
    /**
54
     * Get data value.
55
     *
56
     * @access public
57
     * @param  string $name
58
     * @return mixed
59
     */
60 19
    public function get($name)
61
    {
62 19
        if (isset($this->data[$name])) {
63 19
            return $this->data[$name];
64
        }
65
66
        return '';
67
    }
68
}
69