Passed
Push — master ( 056350...65484c )
by Satoshi
05:02
created

Base   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 74
rs 10
c 0
b 0
f 0
wmc 13

12 Methods

Rating   Name   Duplication   Size   Complexity  
A isConstant() 0 3 1
A isSame() 0 3 2
A isInterface() 0 3 1
A isFunction() 0 3 1
A isTrait() 0 3 1
A isClass() 0 3 1
A toString() 0 3 1
A isMethod() 0 3 1
A __construct() 0 3 1
A isProperty() 0 3 1
A isClassConstant() 0 3 1
A isNamespace() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace DependencyAnalyzer\DependencyGraph\FullyQualifiedStructuralElementName;
5
6
abstract class Base
7
{
8
    abstract public function getType(): string;
9
    abstract public function include(Base $that): bool;
10
    abstract public function getFullyQualifiedNamespaceName(): array;
11
    abstract public function getFullyQualifiedClassName(): ?array;
12
13
    /**
14
     * @var string
15
     */
16
    protected $elementName;
17
18
    /**
19
     * @param string $elementName
20
     * @deps-internal \DependencyAnalyzer\DependencyGraph\FullyQualifiedStructuralElementName
21
     */
22
    public function __construct(string $elementName)
23
    {
24
        $this->elementName = $elementName;
25
    }
26
27
    public function toString(): string
28
    {
29
        return $this->elementName;
30
    }
31
32
    public function isNamespace(): bool
33
    {
34
        return false;
35
    }
36
37
    public function isClass(): bool
38
    {
39
        return false;
40
    }
41
42
    public function isMethod(): bool
43
    {
44
        return false;
45
    }
46
47
    public function isProperty(): bool
48
    {
49
        return false;
50
    }
51
52
    public function isClassConstant(): bool
53
    {
54
        return false;
55
    }
56
57
    public function isInterface(): bool
58
    {
59
        return false;
60
    }
61
62
    public function isTrait(): bool
63
    {
64
        return false;
65
    }
66
67
    public function isFunction(): bool
68
    {
69
        return false;
70
    }
71
72
    public function isConstant(): bool
73
    {
74
        return false;
75
    }
76
77
    public function isSame(Base $that): bool
78
    {
79
        return $this->getType() === $that->getType() && $this->toString() === $that->toString();
80
    }
81
}
82