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

EdmFunctionReferenceExpression::__construct()   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 1
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace AlgoWeb\ODataMetadata\Library\Expressions;
5
6
7
use AlgoWeb\ODataMetadata\Enums\ExpressionKind;
8
use AlgoWeb\ODataMetadata\Interfaces\Expressions\IFunctionReferenceExpression;
9
use AlgoWeb\ODataMetadata\Interfaces\IFunction;
10
use AlgoWeb\ODataMetadata\Library\EdmElement;
11
12
/**
13
 * Represents an EDM function reference expression.
14
 *
15
 * @package AlgoWeb\ODataMetadata\Library\Expressions
16
 */
17
class EdmFunctionReferenceExpression extends EdmElement implements IFunctionReferenceExpression
18
{
19
    /**
20
     * @var IFunction
21
     */
22
    private $referencedFunction;
23
24
    /**
25
     * Initializes a new instance of the EdmFunctionReferenceExpression class.
26
     * @param IFunction $referencedFunction Referenced function
27
     */
28
    public  function __construct(IFunction $referencedFunction)
29
    {
30
        $this->referencedFunction = $referencedFunction;
31
    }
32
33
    /**
34
     * @inheritDoc
35
     */
36
    public function getExpressionKind(): ExpressionKind
37
    {
38
        return ExpressionKind::FunctionReference();
39
    }
40
41
    /**
42
     * @inheritDoc
43
     */
44
    public function getReferencedFunction(): IFunction
45
    {
46
        return $this->referencedFunction;
47
    }
48
}