Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 14 | public function getTraits(): Traits |
|
33 | { |
||
34 | 14 | $traits = \array_filter( |
|
35 | 14 | $this->element->getClasses(), |
|
36 | 14 | static fn (ClassLike $element): bool => $element instanceof TraitType |
|
37 | 14 | ); |
|
38 | |||
39 | 14 | return new Traits(\array_map( |
|
40 | 14 | static fn (TraitType $trait): TraitDeclaration => TraitDeclaration::fromElement($trait), |
|
41 | 14 | $traits |
|
42 | 14 | )); |
|
45 |