GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AnnotationDefinition   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 53
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
A getTag() 0 4 1
A getDescription() 0 4 1
1
<?php
2
3
namespace Wingu\OctopusCore\Reflection\Annotation;
4
5
/**
6
 * Class that holds the raw output of the annotation parser for one annotation.
7
 */
8
class AnnotationDefinition
9
{
10
11
    /**
12
     * The tag name of the annotation.
13
     *
14
     * @var string
15
     */
16
    protected $tag;
17
18
    /**
19
     * The description text for the annotation.
20
     *
21
     * @var string
22
     */
23
    protected $description;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param string $tag The tag name for the annotation.
29
     * @param string $description The annotation description.
30
     */
31 177
    public function __construct($tag, $description = null)
32
    {
33 177
        $this->tag = (string)$tag;
34
35 177
        $description = trim((string)$description);
36 177
        if ($description !== '') {
37 66
            $this->description = $description;
38 22
        }
39 177
    }
40
41
    /**
42
     * Get the tag name.
43
     *
44
     * @return string
45
     */
46 30
    public function getTag()
47
    {
48 30
        return $this->tag;
49
    }
50
51
    /**
52
     * Get the description.
53
     *
54
     * @return string
55
     */
56 30
    public function getDescription()
57
    {
58 30
        return $this->description;
59
    }
60
}
61