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

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