Passed
Push — master ( 1fb040...5fddea )
by Satoshi
02:25
created

Internal   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getTagName() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace DependencyAnalyzer\DependencyGraph\ExtraPhpDocTags;
5
6
use DependencyAnalyzer\DependencyGraph\FullyQualifiedStructuralElementName\Base as FQSEN;
7
8
class Internal extends Base
9
{
10
    protected const TAG_NAME = '@internal';
11
12
    /**
13
     * @var string
14
     */
15
    private $package;
16
17
    public function __construct(FQSEN $fqsen, string $package = null)
18
    {
19
        parent::__construct($fqsen);
20
21
        if (is_null($package)) {
22
            $package = $fqsen->getFullyQualifiedNamespaceName()->toString();
23
        }
24
        $this->package = $package;
25
    }
26
27
    public static function getTagName(): string
28
    {
29
        return self::TAG_NAME;
30
    }
31
}
32