NullValue   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A __construct() 0 2 1
A create() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DavidGarcia\ValueObject\Primitive;
6
7
use DavidGarcia\ValueObject\Exception\InvalidValueException;
8
9
class NullValue extends AbstractValue
10
{
11 1
    private function __construct()
12
    {
13 1
    }
14
15
    /**
16
     * Creates the value object.
17
     *
18
     * @return NullValue The value object
19
     */
20 1
    public static function create(): self
21
    {
22 1
        return new self();
23
    }
24
25
    /**
26
     * Exposes the stored NULL value.
27
     *
28
     * @return NULL The NULL value
29
     */
30 1
    public function getValue()
31
    {
32 1
        return null;
33
    }
34
}
35