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

CreateClassDiagram   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 __invoke() 0 4 1
A __construct() 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\Processors\ImageProcessor;
11
use PhUml\Processors\OutputContent;
12
13
final class CreateClassDiagram
14
{
15
    private ImageProcessor $imageProcessor;
16
17
    private ProgressDisplay $display;
18
19
    public function __construct(ImageProcessor $imageProcessor, ProgressDisplay $display)
20
    {
21
        $this->imageProcessor = $imageProcessor;
22
        $this->display = $display;
23
    }
24
25
    public function __invoke(OutputContent $digraph): OutputContent
26
    {
27
        $this->display->runningProcessor($this->imageProcessor);
28
        return $this->imageProcessor->process($digraph);
29
    }
30
}
31