Skip to content

Commit

Permalink
fix: Fixes factories for command handlers and types (dvsa/olcs-backen…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerotire authored Jul 26, 2024
1 parent b77d084 commit 5c3daa6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/api/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 5c3daa6

Please sign in to comment.