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

NodeRenderer::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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