Conditions | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
18 | 4 | public function run(Command $command): int |
|
19 | { |
||
20 | 4 | return $this->decoratedRunner->run(new class($command, $this->parameters) implements Command { |
|
21 | private Command $command; |
||
22 | private array $parameters; |
||
23 | |||
24 | public function __construct(Command $command, array $parameters) |
||
25 | { |
||
26 | 4 | $this->command = $command; |
|
27 | 4 | $this->parameters = $parameters; |
|
28 | } |
||
29 | |||
30 | public function __toString(): string |
||
31 | { |
||
32 | 4 | return \strtr((string) $this->command, $this->parameters); |
|
33 | } |
||
37 |