AbstractTag::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Jasny\PhpdocParser\Tag;
6
7
use Jasny\PhpdocParser\TagInterface;
8
9
/**
10
 * Base class for tags
11
 */
12
abstract class AbstractTag implements TagInterface
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $name;
18
19
    /**
20
     * Class constructor.
21
     *
22
     * @param string $name  Tag name
23
     */
24 119
    public function __construct(string $name)
25
    {
26 119
        $this->name = $name;
27
    }
28
29
    /**
30
     * Get the tag name
31
     *
32
     * @return string
33
     */
34 26
    public function getName(): string
35
    {
36 26
        return $this->name;
37
    }
38
}
39