Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class plEdge implements plHasDotRepresentation |
||
9 | { |
||
10 | /** @var plHasNodeIdentifier */ |
||
11 | private $fromNode; |
||
12 | |||
13 | /** @var plHasNodeIdentifier */ |
||
14 | private $toNode; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $options; |
||
18 | |||
19 | public static function inheritance(plHasNodeIdentifier $parent, plHasNodeIdentifier $child): plEdge |
||
20 | { |
||
21 | return new plEdge($parent, $child, 'dir=back arrowtail=empty style=solid'); |
||
22 | } |
||
23 | |||
24 | public static function implementation(plHasNodeIdentifier $interface, plHasNodeIdentifier $class): plEdge |
||
25 | { |
||
26 | return new plEdge($interface, $class, 'dir=back arrowtail=normal style=dashed'); |
||
27 | } |
||
28 | |||
29 | public static function association(plHasNodeIdentifier $reference, plHasNodeIdentifier $class): plEdge |
||
32 | } |
||
33 | |||
34 | public function toDotLanguage(): string |
||
35 | { |
||
36 | return "\"{$this->fromNode->identifier()}\" -> \"{$this->toNode->identifier()}\" [{$this->options}]\n"; |
||
37 | } |
||
38 | |||
39 | private function __construct(plHasNodeIdentifier $nodeA, plHasNodeIdentifier $nodeB, string $options) |
||
44 | } |
||
45 | } |
||
46 |