Completed
Push — master ( 389baa...c7c5a4 )
by Luis
14:17 queued 08:06
created

DigraphStyle   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 33
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A methods() 0 3 1
A theme() 0 3 1
A attributes() 0 3 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * PHP version 7.1
4
 *
5
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
6
 */
7
8
namespace PhUml\Graphviz\Styles;
9
10
/**
11
 * It is a container for the partial files used to build the HTML label for the node
12
 */
13
abstract class DigraphStyle
14
{
15
    /** @var string */
16
    protected $theme;
17
18
    /** @var string */
19
    protected $attributes;
20
21
    /** @var string */
22
    protected $methods;
23
24 108
    public function __construct(string $theme = 'phuml')
25
    {
26 108
        $this->theme = "{$theme}.html.twig";
27 108
        $this->setPartials();
28 108
    }
29
30 84
    public function attributes(): string
31
    {
32 84
        return $this->attributes;
33
    }
34
35 84
    public function methods(): string
36
    {
37 84
        return $this->methods;
38
    }
39
40 90
    public function theme(): string
41
    {
42 90
        return $this->theme;
43
    }
44
45
    abstract protected function setPartials(): void;
46
}
47