for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of LuisMulinari\Consoleful
*
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
*/
namespace LuisMulinari\Consoleful\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ContainerAwareCommand extends Command implements ContainerAwareInterface
{
* @var ContainerInterface|null
private $container;
* @return ContainerInterface
public function getContainer()
if (null === $this->container) {
throw new \LogicException('The container cannot be retrieved');
}
return $this->container;
* {@inheritdoc}
public function setContainer(ContainerInterface $container = null)
$this->container = $container;