1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace DependencyAnalyzer\DependencyGraph; |
||
5 | |||
6 | use DependencyAnalyzer\DependencyGraph\ExtraPhpDocTags\DepsInternal; |
||
7 | use DependencyAnalyzer\DependencyGraph\ExtraPhpDocTags\Internal; |
||
8 | use Fhaculty\Graph\Vertex; |
||
9 | |||
10 | class ClassLike |
||
11 | { |
||
12 | /** |
||
13 | * @var Vertex |
||
14 | */ |
||
15 | private $vertex; |
||
16 | |||
17 | public function __construct(Vertex $vertex) |
||
18 | { |
||
19 | $this->vertex = $vertex; |
||
20 | } |
||
21 | |||
22 | public function getVertex(): Vertex |
||
23 | { |
||
24 | return $this->vertex; |
||
25 | } |
||
26 | |||
27 | public function getName(): string |
||
28 | { |
||
29 | return $this->vertex->getId(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return DepsInternal[] |
||
34 | */ |
||
35 | public function getDepsInternalTag(): array |
||
36 | { |
||
37 | return $this->vertex->getAttribute(DepsInternal::getTagName()); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return Internal[] |
||
42 | */ |
||
43 | public function getInternalTag(): array |
||
44 | { |
||
45 | return $this->vertex->getAttribute(Internal::getTagName()); |
||
0 ignored issues
–
show
|
|||
46 | } |
||
47 | |||
48 | public function __toString(): string |
||
49 | { |
||
50 | return $this->getName(); |
||
51 | } |
||
52 | } |
||
53 |