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

EdmValue::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace AlgoWeb\ODataMetadata\Library\Values;
7
8
use AlgoWeb\ODataMetadata\Enums\ValueKind;
9
use AlgoWeb\ODataMetadata\Helpers\EdmElementHelpers;
10
use AlgoWeb\ODataMetadata\Interfaces\ITypeReference;
11
use AlgoWeb\ODataMetadata\Interfaces\Values\IDelayedValue;
12
use AlgoWeb\ODataMetadata\Interfaces\Values\IValue;
13
14
/**
15
 * Represents an EDM value.
16
 *
17
 * @package AlgoWeb\ODataMetadata\Library\Values
18
 */
19
abstract class EdmValue implements IValue, IDelayedValue
20
{
21
    use EdmElementHelpers;
22
    /**
23
     * @var ITypeReference type of the value
24
     */
25
    private $type;
26
27
    /**
28
     * Initializes a new instance of the EdmValue class.
29
     *
30
     * @param ITypeReference $type type of the value
31
     */
32
    public function __construct(?ITypeReference $type)
33
    {
34
        $this->type = $type;
35
    }
36
37
38
    /**
39
     * @return ITypeReference gets the type of this value
40
     */
41
    public function getType(): ?ITypeReference
42
    {
43
        return $this->type;
44
    }
45
46
    /**
47
     * @return ValueKind gets the kind of this value
48
     */
49
    abstract public function getValueKind(): ValueKind;
50
51
public function getValue()
52
{
53
    return $this;
54
}
55
}
56