function RunScriptCommand::listScripts
1 call to RunScriptCommand::listScripts()
- RunScriptCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ RunScriptCommand.php - Executes the current command.
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ RunScriptCommand.php, line 142
Class
- RunScriptCommand
- @author Fabien Potencier <fabien.potencier@gmail.com>
Namespace
Composer\CommandCode
protected function listScripts(OutputInterface $output) : int {
$scripts = $this->getScripts();
if (count($scripts) === 0) {
return 0;
}
$io = $this->getIO();
$io->writeError('<info>scripts:</info>');
$table = [];
foreach ($scripts as $script) {
$table[] = [
' ' . $script['name'],
$script['description'],
];
}
$this->renderTable($table, $output);
return 0;
}