Passed
Push — master ( cedc01...8bcd2b )
by Christopher
02:32
created

HasDocumentation::XmlSerializeHasDocumentation()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace AlgoWeb\ODataMetadata\MetadataV3\Edm\Concerns;
7
8
use AlgoWeb\ODataMetadata\MetadataV3\Edm\Documentation;
9
use AlgoWeb\ODataMetadata\MetadataV3\Edm\EdmBase;
10
11
/**
12
 * Trait HasDocumentation.
13
 * @package AlgoWeb\ODataMetadata\MetadataV3\Edm\Concerns
14
 * @mixin EdmBase
15
 */
16
trait HasDocumentation
17
{
18
    /**
19
     * @var Documentation|null $documentation
20
     */
21
    private $documentation = null;
22
23
    /**
24
     * Gets as documentation.
25
     *
26
     * @return null|Documentation
27
     */
28
    public function getDocumentation(): ?Documentation
29
    {
30
        return $this->documentation;
31
    }
32
33
    /**
34
     * Sets a new documentation.
35
     *
36
     * @param  Documentation|null $documentation
37
     * @return self
38
     */
39
    public function setDocumentation(?Documentation $documentation): self
40
    {
41
        $this->documentation = $documentation;
42
        return $this;
43
    }
44
}
45