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

DigraphStyle::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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