Passed
Pull Request — master (#50)
by Alex
03:58
created

EdmDirectValueAnnotation::getValue()   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
 * Created by PhpStorm.
4
 * User: alex
5
 * Date: 7/07/20
6
 * Time: 11:33 PM
7
 */
8
9
namespace AlgoWeb\ODataMetadata\Library;
10
11
use AlgoWeb\ODataMetadata\Interfaces\Annotations\IDirectValueAnnotation;
12
use AlgoWeb\ODataMetadata\Interfaces\ILocation;
13
14
class EdmDirectValueAnnotation extends EdmNamedElement implements IDirectValueAnnotation
15
{
16
    private $namespaceUri;
17
    private $value;
18
19
    public function __construct(string $namespaceUri, string $name, $value = null)
20
    {
21
        parent::__construct($name);
22
        $this->namespaceUri = $namespaceUri;
23
        $this->value = $value;
24
    }
25
26
    /**
27
     * @return string gets the namespace Uri of the annotation
28
     */
29
    public function getNamespaceUri(): string
30
    {
31
        return $this->namespaceUri;
32
    }
33
34
    /**
35
     * @return mixed gets the value of this annotation
36
     */
37
    public function getValue()
38
    {
39
        return $this->value;
40
    }
41
42
    /**
43
     * Gets the location of this element.
44
     *
45
     * @return ILocation|null the location of the element
46
     */
47
    public function Location(): ?ILocation
48
    {
49
        // TODO: Implement Location() method.
50
    }
51
52
    public function getErrors(): iterable
53
    {
54
        return [];
55
    }
56
}
57