Completed
Push — master ( c73746...57e5ee )
by Alex
14s queued 12s
created

EdmTypeAnnotation::getPropertyValueBindings()   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\Annotations;
5
6
use AlgoWeb\ODataMetadata\Helpers\TypeAnnotationHelpers;
7
use AlgoWeb\ODataMetadata\Interfaces\Annotations\IPropertyValueBinding;
8
use AlgoWeb\ODataMetadata\Interfaces\Annotations\ITypeAnnotation;
9
use AlgoWeb\ODataMetadata\Interfaces\ITerm;
10
use AlgoWeb\ODataMetadata\Interfaces\IVocabularyAnnotatable;
11
12
/**
13
 * Represents an EDM type annotation.
14
 * @package AlgoWeb\ODataMetadata\Library\Annotations
15
 */
16
class EdmTypeAnnotation extends EdmVocabularyAnnotation implements ITypeAnnotation
17
{
18
    use TypeAnnotationHelpers;
19
    /**
20
     * @var IPropertyValueBinding[]
21
     */
22
    private $propertyValueBindings;
23
24
    /**
25
     * Initializes a new instance of the EdmTypeAnnotation class.
26
     * @param IVocabularyAnnotatable $target Element the annotation applies to.
27
     * @param ITerm $term Term bound by the annotation.
28
     * @param string|null $qualifier Qualifier used to discriminate between multiple bindings of the same property or type.
29
     * @param IPropertyValueBinding ...$propertyValueBindings Value annotations for the properties of the type.
30
     */
31
    public function __construct(IVocabularyAnnotatable $target, ITerm $term, string $qualifier = null, IPropertyValueBinding ...$propertyValueBindings)
32
    {
33
        parent::__construct($target, $term, $qualifier);
34
        $this->propertyValueBindings = $propertyValueBindings;
35
36
    }
37
38
    /**
39
     * @inheritDoc
40
     */
41
    public function getPropertyValueBindings(): array
42
    {
43
        return $this->propertyValueBindings;
44
    }
45
46
}