Completed
Push — master ( ea9ffc...4b17ca )
by Daniel
19:33
created

RpcServerCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 4
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 5 1
A execute() 0 9 1
1
<?php
2
3
namespace Application\Infrastructure\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
class RpcServerCommand extends ContainerAwareCommand
10
{
11
    protected function configure()
12
    {
13
        $this->setName('cmobi:rpc-server:run')
14
            ->setDescription('Run rpcserver');
15
    }
16
17
    protected function execute(InputInterface $input, OutputInterface $output)
18
    {
19
        $output->writeln(date('Y-m-d H:i:s') . 'cmobi:rpc-server:run ................... Running Server');
20
        $server = $this->getContainer()->get('cmobi_rabbitmq.rpc_server');
21
22
        $server->run();
23
24
        $output->writeln(date('Y-m-d H:i:s') . 'cmobi:rpc-server:run ................... Exiting Server');
25
    }
26
}