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.
Completed
Push — master ( c7f4e3...a41792 )
by Mario
18:09
created

AttributeValue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\InformationCollection\API\Value;
6
7
class AttributeValue extends ValueObject
8
{
9
    /**
10
     * @var int
11
     */
12
    protected $dataInt;
13
14
    /**
15
     * @var float
16
     */
17
    protected $dataFloat;
18
19
    /**
20
     * @var string
21
     */
22
    protected $dataText;
23
24
    public function __construct(int $dataInt, float $dataFloat, string $dataText)
25
    {
26
        $this->dataInt = $dataInt;
27
        $this->dataFloat = $dataFloat;
28
        $this->dataText = $dataText;
29
    }
30
31
    public function __toString()
32
    {
33
        if (!empty($this->dataText)) {
34
            return $this->dataText;
35
        }
36
37
        if (!empty($this->dataInt)) {
38
            return $this->dataInt;
39
        }
40
41
        if (!empty($this->dataFloat)) {
42
            return $this->dataFloat;
43
        }
44
45
        return '';
46
    }
47
48
    /**
49
     * @return int
50
     */
51
    public function getDataInt(): int
52
    {
53
        return $this->dataInt;
54
    }
55
56
    /**
57
     * @return float
58
     */
59
    public function getDataFloat(): float
60
    {
61
        return $this->dataFloat;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getDataText(): string
68
    {
69
        return $this->dataText;
70
    }
71
}
72