diff --git a/src/Sylius/Bundle/CartBundle/Command/FlushCartsCommand.php b/src/Sylius/Bundle/CartBundle/Command/FlushCartsCommand.php index 28dce31fa8..f75b93bde7 100644 --- a/src/Sylius/Bundle/CartBundle/Command/FlushCartsCommand.php +++ b/src/Sylius/Bundle/CartBundle/Command/FlushCartsCommand.php @@ -13,9 +13,7 @@ namespace Sylius\Bundle\CartBundle\Command; use Sylius\Bundle\CartBundle\EventDispatcher\SyliusCartEvents; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\OutputInterface; @@ -32,13 +30,13 @@ class FlushCartsCommand extends ContainerAwareCommand protected function configure() { $this - ->setName('sylius:carts:flush') + ->setName('sylius:cart:flush') ->setDescription('Deletes expried carts.') ->setHelp( <<sylius:carts:flush command deletes expired carts: +The sylius:cart:flush command deletes expired carts: - php sylius/console sylius:carts:flush + php sylius/console sylius:cart:flush EOT ) ; @@ -52,6 +50,6 @@ EOT $this->getContainer()->get('event_dispatcher')->dispatch(SyliusCartEvents::CART_FLUSH); $this->getContainer()->get('sylius_cart.manager.cart')->flushCarts(); - $output->writeln('[Sylius:Carts] Deleted expired carts.'); + $output->writeln('[Sylius:Cart] Deleted expired carts.'); } } diff --git a/src/Sylius/Bundle/CartBundle/Entity/CartManager.php b/src/Sylius/Bundle/CartBundle/Entity/CartManager.php index ede81b7278..ba1fb4a25b 100644 --- a/src/Sylius/Bundle/CartBundle/Entity/CartManager.php +++ b/src/Sylius/Bundle/CartBundle/Entity/CartManager.php @@ -81,7 +81,7 @@ class CartManager extends BaseCartManager /** * {@inheritdoc} */ - public function clearCarts() + public function flushCarts() { $expiredCarts = $this->entityManager->createQueryBuilder() ->select('c') diff --git a/src/Sylius/Bundle/CartBundle/Model/CartManagerInterface.php b/src/Sylius/Bundle/CartBundle/Model/CartManagerInterface.php index bc0e1de1e4..a67a65a4cf 100644 --- a/src/Sylius/Bundle/CartBundle/Model/CartManagerInterface.php +++ b/src/Sylius/Bundle/CartBundle/Model/CartManagerInterface.php @@ -43,7 +43,7 @@ interface CartManagerInterface /** * Removes all saved carts that are expired. */ - function clearCarts(); + function flushCarts(); /** * Finds cart by id.