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

EdmFunctionReferenceExpression   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getReferencedFunction() 0 3 1
A getExpressionKind() 0 3 1
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
}