Test Failed
Push — uuid_annotation ( d6506f )
by David
06:37
created

Annotation::getAnnotationComment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace TheCodingMachine\TDBM\Utils\Annotation;
5
6
/**
7
 * Represents an annotation in a column comment.
8
 */
9
class Annotation
10
{
11
    /**
12
     * @var string
13
     */
14
    private $annotationType;
15
    /**
16
     * @var string
17
     */
18
    private $annotationComment;
19
20
    /**
21
     * @param string $annotationType The type of the annotation (the string after the @)
22
     * @param string $annotationComment Anything to the right of the annotation.
23
     */
24
    public function __construct(string $annotationType, string $annotationComment)
25
    {
26
        $this->annotationType = $annotationType;
27
        $this->annotationComment = $annotationComment;
28
    }
29
30
    /**
31
     * Return the type of the annotation (the string after the @)
32
     *
33
     * @return string
34
     */
35
    public function getAnnotationType(): string
36
    {
37
        return $this->annotationType;
38
    }
39
40
    /**
41
     * Return anything to the right of the annotation.
42
     *
43
     * @return string
44
     */
45
    public function getAnnotationComment(): string
46
    {
47
        return $this->annotationComment;
48
    }
49
}
50