Passed
Push — master ( 1f79c2...07c15d )
by David
02:33
created

NullValue::create()   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 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DavidGarcia\ValueObject\Model;
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