1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add more types

This commit is contained in:
Jordi Boggiano 2022-02-22 22:10:52 +01:00
parent e52071a92c
commit 7abc8da7d3
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
71 changed files with 807 additions and 850 deletions

View file

@ -135,7 +135,9 @@ class ProcessExecutorMock extends ProcessExecutor
$this->captureOutput = func_num_args() > 3;
$this->errorOutput = '';
$callback = is_callable($output) ? $output : array($this, 'outputHandler');
$callback = is_callable($output) ? $output : function (string $type, string $buffer): void {
$this->outputHandler($type, $buffer);
};
$commandString = is_array($command) ? implode(' ', $command) : $command;
$this->log[] = $commandString;