AbstractTag   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 25
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 3 1
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