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\Generators; |
9
|
|
|
|
10
|
|
|
use PhUml\Parser\CodeFinder; |
11
|
|
|
use PhUml\Parser\CodeParser; |
12
|
|
|
use PhUml\Parser\CodeParserConfiguration; |
13
|
|
|
use PhUml\Parser\SourceCodeFinder; |
14
|
|
|
use PhUml\Processors\OutputWriter; |
15
|
|
|
use PhUml\Processors\StatisticsProcessor; |
16
|
|
|
use PhUml\Templates\TemplateEngine; |
17
|
|
|
use Symplify\SmartFileSystem\SmartFileSystem; |
|
|
|
|
18
|
|
|
|
19
|
|
|
final class StatisticsGeneratorConfiguration |
20
|
|
|
{ |
21
|
|
|
private CodeFinder $codeFinder; |
22
|
|
|
|
23
|
|
|
private CodeParser $codeParser; |
24
|
|
|
|
25
|
|
|
private StatisticsProcessor $statisticsProcessor; |
26
|
|
|
|
27
|
|
|
private OutputWriter $writer; |
28
|
|
|
|
29
|
|
|
/** @param mixed[] $configuration */ |
30
|
|
|
public function __construct(array $configuration) |
31
|
|
|
{ |
32
|
|
|
$recursive = (bool) ($configuration['recursive'] ?? false); |
33
|
|
|
$this->codeFinder = $recursive ? SourceCodeFinder::recursive() : SourceCodeFinder::nonRecursive(); |
34
|
|
|
$this->codeParser = CodeParser::fromConfiguration(new CodeParserConfiguration($configuration)); |
35
|
|
|
$this->statisticsProcessor = new StatisticsProcessor(new TemplateEngine()); |
36
|
|
|
$this->writer = new OutputWriter(new SmartFileSystem()); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function codeParser(): CodeParser |
40
|
|
|
{ |
41
|
|
|
return $this->codeParser; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function codeFinder(): CodeFinder |
45
|
|
|
{ |
46
|
|
|
return $this->codeFinder; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function statisticsProcessor(): StatisticsProcessor |
50
|
|
|
{ |
51
|
|
|
return $this->statisticsProcessor; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function writer(): OutputWriter |
55
|
|
|
{ |
56
|
|
|
return $this->writer; |
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
|
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