Completed
Push — master ( 9d1ab7...13f027 )
by Luis
04:13 queued 02:19
created

DigraphGenerator::generateDigraph()   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\Generators;
9
10
use PhUml\Code\Structure;
11
use PhUml\Parser\CodeParser;
12
use PhUml\Processors\GraphvizProcessor;
13
14
class DigraphGenerator extends Generator
15
{
16
    /** @var GraphvizProcessor */
17
    protected $digraphProcessor;
18
19 51
    public function __construct(CodeParser $parser, GraphvizProcessor $digraphProcessor)
20
    {
21 51
        parent::__construct($parser);
22 51
        $this->digraphProcessor = $digraphProcessor;
23 51
    }
24
25 39
    protected function generateDigraph(Structure $structure): string
26
    {
27 39
        $this->display()->runningProcessor($this->digraphProcessor);
28 39
        return $this->digraphProcessor->process($structure);
29
    }
30
}
31