diff --git a/module/Api/config/command-map.config.php b/module/Api/config/command-map.config.php index b84fde7ab8..27a4e26dd3 100644 --- a/module/Api/config/command-map.config.php +++ b/module/Api/config/command-map.config.php @@ -915,8 +915,8 @@ // PrivateHireLicence TransferCommand\PrivateHireLicence\DeleteList::class => CommandHandler\PrivateHireLicence\DeleteList::class, - TransferCommand\PrivateHireLicence\Create::class => CommandHandler\PrivateHireLicence\Create::class, - TransferCommand\PrivateHireLicence\Update::class => CommandHandler\PrivateHireLicence\Update::class, + TransferCommand\PrivateHireLicence\Create::class => CommandHandler\PrivateHireLicence\CreateFactory::class, + TransferCommand\PrivateHireLicence\Update::class => CommandHandler\PrivateHireLicence\UpdateFactory::class, // ContinuationDetail TransferCommand\ContinuationDetail\Submit::class => CommandHandler\ContinuationDetail\Submit::class, diff --git a/module/Api/config/validation-map/private-hire-licence.config.php b/module/Api/config/validation-map/private-hire-licence.config.php index 968613bb70..c4c3cbfa7f 100644 --- a/module/Api/config/validation-map/private-hire-licence.config.php +++ b/module/Api/config/validation-map/private-hire-licence.config.php @@ -8,6 +8,8 @@ return [ // Commands CommandHandler\PrivateHireLicence\Create::class => Handler\PrivateHireLicence\PrivateHireLicence::class, + CommandHandler\PrivateHireLicence\CreateFactory::class => Handler\PrivateHireLicence\PrivateHireLicence::class, CommandHandler\PrivateHireLicence\DeleteList::class => Handler\PrivateHireLicence\PrivateHireLicence::class, CommandHandler\PrivateHireLicence\Update::class => Handler\PrivateHireLicence\PrivateHireLicence::class, + CommandHandler\PrivateHireLicence\UpdateFactory::class => Handler\PrivateHireLicence\PrivateHireLicence::class, ]; diff --git a/module/Api/src/Domain/CommandHandler/Application/SetDefaultTrafficAreaAndEnforcementAreaFactory.php b/module/Api/src/Domain/CommandHandler/Application/SetDefaultTrafficAreaAndEnforcementAreaFactory.php index 156b65682f..a31ea30fd4 100644 --- a/module/Api/src/Domain/CommandHandler/Application/SetDefaultTrafficAreaAndEnforcementAreaFactory.php +++ b/module/Api/src/Domain/CommandHandler/Application/SetDefaultTrafficAreaAndEnforcementAreaFactory.php @@ -2,13 +2,14 @@ namespace Dvsa\Olcs\Api\Domain\CommandHandler\Application; +use Dvsa\Olcs\Api\Domain\CommandHandler\TransactioningCommandHandler; use Dvsa\Olcs\Api\Service\AddressHelper\AddressHelperService; use Laminas\ServiceManager\Factory\FactoryInterface; use Psr\Container\ContainerInterface; class SetDefaultTrafficAreaAndEnforcementAreaFactory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): SetDefaultTrafficAreaAndEnforcementArea + public function __invoke(ContainerInterface $container, $requestedName, array $options = null): TransactioningCommandHandler { $instance = new SetDefaultTrafficAreaAndEnforcementArea( $container->get(AddressHelperService::class) diff --git a/module/Api/src/Domain/CommandHandler/PrivateHireLicence/CreateFactory.php b/module/Api/src/Domain/CommandHandler/PrivateHireLicence/CreateFactory.php index ed239bd296..cfd5611061 100644 --- a/module/Api/src/Domain/CommandHandler/PrivateHireLicence/CreateFactory.php +++ b/module/Api/src/Domain/CommandHandler/PrivateHireLicence/CreateFactory.php @@ -4,13 +4,14 @@ namespace Dvsa\Olcs\Api\Domain\CommandHandler\PrivateHireLicence; +use Dvsa\Olcs\Api\Domain\CommandHandler\TransactioningCommandHandler; use Dvsa\Olcs\Api\Service\AddressHelper\AddressHelperService; use Laminas\ServiceManager\Factory\FactoryInterface; use Psr\Container\ContainerInterface; class CreateFactory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Create + public function __invoke(ContainerInterface $container, $requestedName, array $options = null): TransactioningCommandHandler { $instance = new Create( $container->get(AddressHelperService::class) diff --git a/module/Api/src/Domain/CommandHandler/PrivateHireLicence/UpdateFactory.php b/module/Api/src/Domain/CommandHandler/PrivateHireLicence/UpdateFactory.php index 9781d4e66a..6e37e5a323 100644 --- a/module/Api/src/Domain/CommandHandler/PrivateHireLicence/UpdateFactory.php +++ b/module/Api/src/Domain/CommandHandler/PrivateHireLicence/UpdateFactory.php @@ -4,13 +4,14 @@ namespace Dvsa\Olcs\Api\Domain\CommandHandler\PrivateHireLicence; +use Dvsa\Olcs\Api\Domain\CommandHandler\TransactioningCommandHandler; use Dvsa\Olcs\Api\Service\AddressHelper\AddressHelperService; use Laminas\ServiceManager\Factory\FactoryInterface; use Psr\Container\ContainerInterface; class UpdateFactory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Update + public function __invoke(ContainerInterface $container, $requestedName, array $options = null): TransactioningCommandHandler { $instance = new Update( $container->get(AddressHelperService::class)