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