| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 45.45% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class CliCommandFactory |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Cli |
||
| 12 | */ |
||
| 13 | protected $cli; |
||
| 14 | |||
| 15 | 50 | public function __construct(Cli $cli) |
|
| 16 | { |
||
| 17 | 50 | $this->cli = $cli; |
|
| 18 | 50 | } |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Create a Docker CLI command. |
||
| 22 | * |
||
| 23 | * @param string $command |
||
| 24 | * @return CliCommand |
||
| 25 | */ |
||
| 26 | 10 | public function command($command) |
|
| 27 | { |
||
| 28 | 10 | return new CliCommand($this->cli, $command); |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Construct a docker-compose exec {$container} command |
||
| 33 | * |
||
| 34 | * @param string|null $container |
||
| 35 | * @return CliCommand |
||
| 36 | */ |
||
| 37 | public function execContainer($container = null) |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Construct a docker-compose run {$container} command |
||
| 44 | * |
||
| 45 | * @param string|null $container |
||
| 46 | * @return CliCommand |
||
| 47 | */ |
||
| 48 | public function runContainer($container = null) |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.