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

getExpressionKind()   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;
5
6
use AlgoWeb\ODataMetadata\Enums\ExpressionKind;
7
use AlgoWeb\ODataMetadata\Interfaces\Expressions\IParameterReferenceExpression;
8
use AlgoWeb\ODataMetadata\Interfaces\IFunctionParameter;
9
use AlgoWeb\ODataMetadata\Library\EdmElement;
10
11
/**
12
 * Represents an EDM parameter reference expression.
13
 * @package AlgoWeb\ODataMetadata\Library\Expressions
14
 */
15
class EdmParameterReferenceExpression extends EdmElement implements IParameterReferenceExpression
16
{
17
    /**
18
     * @var IFunctionParameter
19
     */
20
    private $referencedParameter;
21
22
    /**
23
     * Initializes a new instance of the EdmParameterReferenceExpression class.
24
     * @param IFunctionParameter $referencedParameter Referenced parameter
25
     */
26
    public function __construct(IFunctionParameter $referencedParameter)
27
    {
28
        $this->referencedParameter = $referencedParameter;
29
    }
30
31
    /**
32
     * @inheritDoc
33
     */
34
    public function getExpressionKind(): ExpressionKind
35
    {
36
        return ExpressionKind::ParameterReference();
37
    }
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getReferencedParameter(): ?IFunctionParameter
43
    {
44
        return $this->referencedParameter;
45
    }
46
}