Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
9 / 9
AlexisLefebvre\Bundle\AsyncTweetsBundle\Command\BaseCommand
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
9 / 9
 configure
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
4 / 4
 initialize
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
5 / 5
<?php
namespace AlexisLefebvre\Bundle\AsyncTweetsBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class BaseCommand extends ContainerAwareCommand
{
    protected $container;
    protected $em;
    protected function configure()
    {
        parent::configure();
        $this
            ->setName('statuses:base')
            ->setDescription('Base command');
    }
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output); //initialize parent class method
        $this->container = $this->getContainer();
        // This loads Doctrine, you can load your own services as well
        $this->em = $this->container->get('doctrine')
            ->getManager();
    }
}