1 | <?php declare(strict_types=1); |
||
2 | /** |
||
3 | * This source file is subject to the license that is bundled with this package in the file LICENSE. |
||
4 | */ |
||
5 | |||
6 | namespace PhUml\Graphviz\Builders; |
||
7 | |||
8 | use PhUml\Code\Name; |
||
9 | use PhUml\Code\Variables\TypeDeclaration; |
||
10 | use Stringable; |
||
11 | |||
12 | final class EdgeKey implements Stringable |
||
13 | { |
||
14 | private readonly string $key; |
||
15 | |||
16 | 13 | public static function from(Name $name, TypeDeclaration $type): EdgeKey |
|
17 | { |
||
18 | 13 | return new EdgeKey($name . $type); |
|
19 | } |
||
20 | |||
21 | 13 | private function __construct(string $key) |
|
22 | { |
||
23 | 13 | $this->key = $key; |
|
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
24 | } |
||
25 | |||
26 | 13 | public function __toString(): string |
|
27 | { |
||
28 | 13 | return $this->key; |
|
29 | } |
||
30 | } |
||
31 |