for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Jean Silva <[email protected]>
* @license MIT
*/
namespace Jeancsil\FlightSpy\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class ContainerAwareCommand extends Command implements ContainerAwareInterface
{
* @var ContainerInterface|null
private $container;
* @return ContainerInterface
*
* @throws \LogicException
protected function getContainer()
if (null === $this->container) {
throw new \LogicException('The container cannot be retrieved as the application instance is not yet set.');
}
return $this->container;
* Sets the container.
* @param ContainerInterface|null $container A ContainerInterface instance or null
public function setContainer(ContainerInterface $container = null)
$this->container = $container;