Passed
Push — master ( 22202f...615a20 )
by David
02:36
created

NullValue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
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