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

Internal::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
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