Completed
Push — master ( 206d9f...261a93 )
by Pablo
02:52
created

CommandApplication::doRun()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
4
namespace Bruli\EventBusBundleTests\Infrastructure;
5
6
use Bruli\EventBusBundle\CommandBus\CommandInterface;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
final class CommandApplication extends Application
11
{
12
    /**
13
     * @var CommandInterface
14
     */
15
    private $command;
16
    /**
17
     * @param CommandInterface $command
18
     */
19
    public function setCommand(CommandInterface $command)
20
    {
21
        $this->command = $command;
22
    }
23
24
    public function doRun(InputInterface $input, OutputInterface $output)
25
    {
26
        $command = $this->container->get('bruli.command.bus');
0 ignored issues
show
Bug introduced by
The method get() does not seem to exist on object<Bruli\EventBusBun...frastructure\AppKernel>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
28
        $command->handle($this->command);
29
    }
30
31
}