for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tactics\CommandBusBundle\NamingStrategy;
use Tactics\CommandBusBundle\Command\Command;
use Tactics\CommandBusBundle\CommandHandler\CommandHandler;
/**
* Class ShortNameStrategy
* @package Tactics\CommandBusBundle\NamingStrategy
*/
class ShortNameStrategy implements NamingStrategy
{
* @inheritDoc
public function getCommandName(Command $command)
return (new \ReflectionClass($command))->getShortName();
}
public function getCommandHandlerName(CommandHandler $commandHandler)
return str_replace('Handler', '', (new \ReflectionClass($commandHandler))->getShortName());