for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/**
* This file is part of the daikon-cqrs/money-interop project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Daikon\Money\Service;
use Daikon\DataStructure\TypedMap;
final class PaymentServiceMap extends TypedMap
{
public function __construct(iterable $services = [])
$this->init($services, [PaymentServiceInterface::class]);
}
public function enabledForRequest(): self
return $this->filter(
fn(string $key, PaymentServiceInterface $paymentService): bool => $paymentService->canRequest()
);
public function enabledForSend(): self
fn(string $key, PaymentServiceInterface $paymentService): bool => $paymentService->canSend()