Passed
Push — union-types ( b56600 )
by Luis
14:03
created

CreateDigraph   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 4 1
1
<?php declare(strict_types=1);
2
/**
3
 * PHP version 7.4
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\Stages;
9
10
use PhUml\Code\Codebase;
11
use PhUml\Processors\GraphvizProcessor;
12
use PhUml\Processors\OutputContent;
13
14
final class CreateDigraph
15
{
16
    private GraphvizProcessor $processor;
17
18
    private ProgressDisplay $display;
19
20
    public function __construct(GraphvizProcessor $processor, ProgressDisplay $display)
21
    {
22
        $this->processor = $processor;
23
        $this->display = $display;
24
    }
25
26
    public function __invoke(Codebase $codebase): OutputContent
27
    {
28
        $this->display->runningProcessor($this->processor);
29
        return $this->processor->process($codebase);
30
    }
31
}
32