| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 14.29% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class TalentCollection extends Collection |
||
| 14 | { |
||
| 15 | public function findWeaponMasteryForWeaponType(WeaponType $weaponType): ?WeaponMastery |
||
| 16 | { |
||
| 17 | return $this->filter( |
||
| 18 | static fn(Talent $talent): bool => |
||
| 19 | $talent instanceof WeaponMastery && $talent->getType()->equals($weaponType), |
||
| 20 | )->getIterator()->current(); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function findSecretKnowledge(): ?SecretKnowledge |
||
| 24 | { |
||
| 25 | return $this->filter( |
||
| 26 | static fn(Talent $talent): bool => $talent instanceof SecretKnowledge, |
||
| 27 | )->getIterator()->current(); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function filterAttacks(): self |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | 1 | protected function getType(): string |
|
| 40 | } |
||
| 41 | } |
||
| 42 |