| Total Complexity | 3 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 14 | final class PaymentServiceMap extends TypedMap |
||
| 15 | { |
||
| 16 | 3 | public function __construct(iterable $services = []) |
|
| 17 | { |
||
| 18 | 3 | $this->init($services, [PaymentServiceInterface::class]); |
|
| 19 | 3 | } |
|
| 20 | |||
| 21 | 1 | public function availableForRequest(MoneyInterface $amount): self |
|
| 22 | { |
||
| 23 | 1 | return $this->filter( |
|
| 24 | 1 | fn(string $key, PaymentServiceInterface $paymentService): bool => $paymentService->canRequest($amount) |
|
| 25 | 1 | ); |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | public function availableForSend(MoneyInterface $amount): self |
|
| 32 | 1 | ); |
|
| 33 | } |
||
| 34 | } |
||
| 35 |