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

EdmPropertyConstructor::getName()   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
4
namespace AlgoWeb\ODataMetadata\Library\Expressions\RecordExpression;
5
6
7
use AlgoWeb\ODataMetadata\Interfaces\Expressions\IExpression;
8
use AlgoWeb\ODataMetadata\Interfaces\Expressions\RecordExpression\IPropertyConstructor;
9
use AlgoWeb\ODataMetadata\Library\EdmElement;
10
11
/**
12
 * Represents an EDM property constructor specified as part of a EDM record construction expression.
13
 * @package AlgoWeb\ODataMetadata\Library\Expressions
14
 */
15
class EdmPropertyConstructor extends EdmElement implements IPropertyConstructor
16
{
17
    /**
18
     * @inheritDoc
19
     */
20
    public function getName(): string
21
    {
22
        return $this->name;
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28
    public function getValue(): IExpression
29
    {
30
        return $this->value;
31
    }
32
    /**
33
     * @var string
34
     */
35
    private $name;
36
    /**
37
     * @var IExpression
38
     */
39
        private $value;
40
41
    /**
42
     * Initializes a new instance of the EdmPropertyConstructor class.
43
     * @param string $name Property name.
44
     * @param IExpression $value Property value.
45
     */
46
    public function __construct(string $name, IExpression $value)
47
    {
48
        $this->name = $name;
49
        $this->value = $value;
50
    }
51
52
}