Passed
Pull Request — master (#94)
by Šimon
04:26
created

UInt64::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ClickHouseDB\Type;
6
7
final class UInt64 implements NumericType
8
{
9
    /** @var string */
10
    public $value;
11
12 2
    private function __construct(string $uint64Value)
13
    {
14 2
        $this->value = $uint64Value;
15 2
    }
16
17
    /**
18
     * @return self
19
     */
20 2
    public static function fromString(string $uint64Value)
0 ignored issues
show
introduced by
Method \ClickHouseDB\Type\UInt64::fromString() does not have return type hint for its return value but it should be possible to add it based on @return annotation "self".
Loading history...
21
    {
22 2
        return new self($uint64Value);
23
    }
24
25
    /**
26
     * @return string
27
     */
28 1
    public function getValue()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Type\UInt64::getValue() does not have return type hint for its return value but it should be possible to add it based on @return annotation "string".
Loading history...
29
    {
30 1
        return $this->value;
31
    }
32
33
    /**
34
     * @return string
35
     */
36 1
    public function __toString()
0 ignored issues
show
introduced by
Method \ClickHouseDB\Type\UInt64::__toString() does not have return type hint for its return value but it should be possible to add it based on @return annotation "string".
Loading history...
37
    {
38 1
        return $this->value;
39
    }
40
}
41