Completed
Push — master ( 70ad44...4c5fb5 )
by Dominik
06:07 queued 04:07
created

CommandAdapter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Lazy;
6
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
final class CommandAdapter
12
{
13
    /**
14
     * @var Command
15
     */
16
    private $command;
17
18
    /**
19
     * @param Command $command
20
     */
21 1
    public function __construct(Command $command)
22
    {
23 1
        $this->command = $command;
24 1
    }
25
26
    /**
27
     * @param InputInterface  $input
28
     * @param OutputInterface $output
29
     *
30
     * @return int|null
31
     */
32 1
    public function __invoke(InputInterface $input, OutputInterface $output)
33
    {
34 1
        $execute = \Closure::bind(
35 1
            function (InputInterface $input, OutputInterface $output) {
36 1
                return $this->execute($input, $output);
0 ignored issues
show
Bug introduced by
The method execute() does not seem to exist on object<Chubbyphp\Lazy\CommandAdapter>.

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...
37 1
            },
38 1
            $this->command,
39 1
            get_class($this->command)
40
        );
41
42 1
        return $execute($input, $output);
43
    }
44
}
45