| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | final class ParametrisedRunner implements Runner |
||
| 8 | { |
||
| 9 | private $decoratedRunner; |
||
| 10 | private $parameters; |
||
| 11 | |||
| 12 | 6 | public function __construct(Runner $decoratedRunner, array $parameters) |
|
| 16 | } |
||
| 17 | |||
| 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; |
||
| 22 | private $parameters; |
||
| 23 | |||
| 24 | 4 | public function __construct(Command $command, array $parameters) |
|
| 33 | } |
||
| 34 | }); |
||
| 35 | } |
||
| 37 |