Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
fix: Fixes factories for command handlers and types (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerotire authored Jul 26, 2024
1 parent ee5b2f5 commit a6cdaa6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions module/Api/config/command-map.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6cdaa6

Please sign in to comment.