Completed
Push — master ( 5f432b...5d5b15 )
by Jens
15:50 queued 05:48
created

NodeRenderer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 20
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 11 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Helper\State\Renderer;
7
8
use Commercetools\Core\Model\State\State;
9
10
class NodeRenderer
11
{
12
    const COMMAND_COLOR = '#555555';
13
14
    /**
15
     * @param State $state
16
     * @return string
17
     */
18
    public function render(State $state)
19
    {
20
        $graph = '';
21
        $color = static::COMMAND_COLOR;
22
23
        $graph .= '  node [label=' . $state->getKey() . ',color="",fontcolor="' . $color . '"' .
24
            ',style="",shape="plaintext",fontname="Arial"] ' .
25
            '{ state_' . $state->getKey()  . ' } ' . PHP_EOL;
26
27
        return $graph;
28
    }
29
}
30