for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace League\Tactician\Plugins\NamedCommand;
use League\Tactician\Exception\CanNotDetermineCommandNameException;
use League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor;
/**
* Extract the name from a NamedCommand
*/
class NamedCommandExtractor implements CommandNameExtractor
{
* {@inheritdoc}
public function extract($command): string
if ($command instanceof NamedCommand) {
return $command->getCommandName();
}
throw CanNotDetermineCommandNameException::forCommand($command);