CommandApplication   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCommand() 0 4 1
A doRun() 0 6 1
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
}