Completed
Push — master ( 175b65...c73746 )
by Alex
18s queued 15s
created

EdmNullExpression   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getValueKind() 0 3 1
A getExpressionKind() 0 3 1
A __construct() 0 3 1
A getEdmNullExpression() 0 2 1
1
<?php
2
3
4
namespace AlgoWeb\ODataMetadata\Library\Expressions;
5
6
7
use AlgoWeb\ODataMetadata\Enums\ExpressionKind;
8
use AlgoWeb\ODataMetadata\Enums\ValueKind;
9
use AlgoWeb\ODataMetadata\Interfaces\Expressions\INullExpression;
10
use AlgoWeb\ODataMetadata\Library\Values\EdmValue;
11
12
class EdmNullExpression extends EdmValue implements INullExpression
13
{
14
    private static $instance = null;
15
16
    /**
17
     * @return EdmNullExpression Singleton EdmNullExpression instance.
18
     */
19
    public static function getEdmNullExpression(): EdmNullExpression{
20
        return self::$instance ?? self::$instance = new self();
21
    }
22
23
    public function __construct()
24
    {
25
        parent::__construct(null);
26
    }
27
28
    /**
29
     * @inheritDoc
30
     */
31
    public function getValueKind(): ValueKind
32
    {
33
        return ValueKind::Null();
34
    }
35
36
    /**
37
     * @inheritDoc
38
     */
39
    public function getExpressionKind(): ExpressionKind
40
    {
41
        return ExpressionKind::Null();
42
    }
43
}