MontealegreLuis /
phuml
| 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\Parser\Code\Builders; |
||
| 9 | |||
| 10 | use PhpParser\Node\Stmt\Class_; |
||
|
0 ignored issues
–
show
|
|||
| 11 | use PhUml\Code\ClassDefinition; |
||
| 12 | use PhUml\Code\Name as ClassDefinitionName; |
||
| 13 | use PhUml\Parser\Code\Builders\Names\InterfaceNamesBuilder; |
||
| 14 | use PhUml\Parser\Code\Builders\Names\TraitNamesBuilder; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * It builds a `ClassDefinition` |
||
| 18 | * |
||
| 19 | * @see MembersBuilder |
||
| 20 | * @see InterfaceNamesBuilder |
||
| 21 | * @see TraitNamesBuilder |
||
| 22 | */ |
||
| 23 | class ClassDefinitionBuilder |
||
| 24 | { |
||
| 25 | use InterfaceNamesBuilder, TraitNamesBuilder; |
||
| 26 | |||
| 27 | /** @var MembersBuilder */ |
||
| 28 | protected $membersBuilder; |
||
| 29 | |||
| 30 | 135 | public function __construct(MembersBuilder $membersBuilder = null) |
|
| 31 | { |
||
| 32 | 135 | $this->membersBuilder = $membersBuilder ?? new MembersBuilder(); |
|
| 33 | 135 | } |
|
| 34 | |||
| 35 | 102 | public function build(Class_ $class): ClassDefinition |
|
| 36 | { |
||
| 37 | 102 | return new ClassDefinition( |
|
| 38 | 102 | ClassDefinitionName::from((string)$class->name), |
|
| 39 | 102 | $this->membersBuilder->methods($class->getMethods()), |
|
| 40 | 102 | $this->membersBuilder->constants($class->stmts), |
|
| 41 | 102 | $class->extends !== null ? ClassDefinitionName::from((string)end($class->extends->parts)) : null, |
|
| 42 | 102 | $this->membersBuilder->attributes($class->stmts), |
|
| 43 | 102 | $this->buildInterfaces($class->implements), |
|
| 44 | 102 | $this->buildTraits($class->stmts) |
|
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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