UInt64   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 32
ccs 9
cts 9
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A __construct() 0 3 1
A fromString() 0 3 1
A __toString() 0 3 1
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 native 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 native 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 native 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