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.

SingleParameter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace TheIconic\Tracking\GoogleAnalytics\Parameters;
4
5
use TheIconic\Tracking\GoogleAnalytics\Traits\Indexable;
6
7
/**
8
 * Class SingleParameter
9
 *
10
 * A parameter is composed of a name and a value.
11
 *
12
 * @package TheIconic\Tracking\GoogleAnalytics\Parameters
13
 */
14
abstract class SingleParameter implements SingleParameterInterface
15
{
16
    use Indexable;
17
18
    /**
19
     * Name for a parameter in GA Measurement Protocol.
20
     * Its sent as the name for a query parameter in the HTTP request.
21
     *
22
     * @var string
23
     */
24
    protected $name = '';
25
26
    /**
27
     * Value for the parameter.
28
     *
29
     * @var mixed
30
     */
31
    protected $value;
32
33
    /**
34
     * Indexes the name when necessary.
35
     *
36
     * @param $index
37
     */
38
    public function __construct($index = '')
39
    {
40
        $this->name = $this->addIndex($this->name, $index);
41
    }
42
43
    /**
44
     * @inheritDoc
45
     */
46
    public function getName()
47
    {
48
        return $this->name;
49
    }
50
51
    /**
52
     * @inheritDoc
53
     */
54
    public function setValue($value)
55
    {
56
        $this->value = $value;
57
58
        return $this;
59
    }
60
61
    /**
62
     * @inheritDoc
63
     */
64
    public function getValue()
65
    {
66
        return $this->value;
67
    }
68
}
69