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

src/Configuration/ClassDiagramBuilder.php (1 issue)

Severity
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\Configuration;
9
10
use PhUml\Generators\ClassDiagramGenerator;
11
use PhUml\Processors\DotProcessor;
12
use PhUml\Processors\ImageProcessor;
13
use PhUml\Processors\NeatoProcessor;
14
15
class ClassDiagramBuilder extends DigraphBuilder
16
{
17 12
    public function __construct(ClassDiagramConfiguration $configuration)
18
    {
19 12
        $this->configuration = $configuration;
20 12
    }
21
22 9
    public function classDiagramGenerator(): ClassDiagramGenerator
23
    {
24 9
        return new ClassDiagramGenerator(
25 9
            $this->codeParser(),
26 9
            $this->digraphProcessor(),
27 9
            $this->imageProcessor()
28
        );
29
    }
30
31 9
    private function imageProcessor(): ImageProcessor
32
    {
33 9
        return $this->configuration->isDotProcessor() ? new DotProcessor() : new NeatoProcessor();
0 ignored issues
show
The method isDotProcessor() does not exist on PhUml\Configuration\DigraphConfiguration. Maybe you want to declare this class abstract? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

33
        return $this->configuration->/** @scrutinizer ignore-call */ isDotProcessor() ? new DotProcessor() : new NeatoProcessor();
Loading history...
34
    }
35
}
36