|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
/** |
|
3
|
|
|
* PHP version 8.0 |
|
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\Parser\CodeFinder; |
|
11
|
|
|
use PhUml\Parser\CodeFinderConfiguration; |
|
12
|
|
|
use PhUml\Parser\CodeParser; |
|
13
|
|
|
use PhUml\Parser\CodeParserConfiguration; |
|
14
|
|
|
use PhUml\Parser\SourceCodeFinder; |
|
15
|
|
|
use PhUml\Processors\GraphvizConfiguration; |
|
16
|
|
|
use PhUml\Processors\GraphvizProcessor; |
|
17
|
|
|
use PhUml\Processors\ImageProcessor; |
|
18
|
|
|
use PhUml\Processors\ImageProcessorName; |
|
19
|
|
|
use PhUml\Processors\OutputWriter; |
|
20
|
|
|
use PhUml\Stages\ProgressDisplay; |
|
21
|
|
|
use Symplify\SmartFileSystem\SmartFileSystem; |
|
|
|
|
|
|
22
|
|
|
|
|
23
|
|
|
final class ClassDiagramConfiguration |
|
24
|
|
|
{ |
|
25
|
|
|
private CodeFinder $codeFinder; |
|
26
|
|
|
|
|
27
|
|
|
private CodeParser $codeParser; |
|
28
|
|
|
|
|
29
|
|
|
private GraphvizProcessor $graphvizProcessor; |
|
30
|
|
|
|
|
31
|
|
|
private ImageProcessor $imageProcessor; |
|
32
|
|
|
|
|
33
|
|
|
private OutputWriter $writer; |
|
34
|
|
|
|
|
35
|
|
|
/** @param mixed[] $options */ |
|
36
|
|
|
public function __construct(array $options, private ProgressDisplay $display) |
|
37
|
|
|
{ |
|
38
|
|
|
$this->codeFinder = SourceCodeFinder::fromConfiguration(new CodeFinderConfiguration($options)); |
|
39
|
|
|
$this->codeParser = CodeParser::fromConfiguration(new CodeParserConfiguration($options)); |
|
40
|
|
|
$this->graphvizProcessor = GraphvizProcessor::fromConfiguration(new GraphvizConfiguration($options)); |
|
41
|
|
|
$imageProcessorName = new ImageProcessorName($options['processor'] ?? ''); |
|
42
|
|
|
$filesystem = new SmartFileSystem(); |
|
43
|
|
|
$this->imageProcessor = $imageProcessorName->isDot() |
|
44
|
|
|
? ImageProcessor::dot($filesystem) |
|
45
|
|
|
: ImageProcessor::neato($filesystem); |
|
46
|
|
|
$this->writer = new OutputWriter($filesystem); |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
public function codeFinder(): CodeFinder |
|
50
|
|
|
{ |
|
51
|
|
|
return $this->codeFinder; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
public function codeParser(): CodeParser |
|
55
|
|
|
{ |
|
56
|
|
|
return $this->codeParser; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function graphvizProcessor(): GraphvizProcessor |
|
60
|
|
|
{ |
|
61
|
|
|
return $this->graphvizProcessor; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
public function imageProcessor(): ImageProcessor |
|
65
|
|
|
{ |
|
66
|
|
|
return $this->imageProcessor; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
public function writer(): OutputWriter |
|
70
|
|
|
{ |
|
71
|
|
|
return $this->writer; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
public function display(): ProgressDisplay |
|
75
|
|
|
{ |
|
76
|
|
|
return $this->display; |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths