mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12602] Changes to respect coding style and to factorize code.
PHPBB3-12602
This commit is contained in:
@@ -61,20 +61,26 @@ class cron_list extends \phpbb\console\command\command
|
||||
if (!empty($ready_tasks))
|
||||
{
|
||||
$output->writeln('<info>' . $this->user->lang('TASKS_READY') . '</info>');
|
||||
foreach ($ready_tasks as $task)
|
||||
{
|
||||
$output->writeln($task->get_name());
|
||||
}
|
||||
$this->print_tasks_names($ready_tasks, $output);
|
||||
}
|
||||
|
||||
if (!empty($ready_tasks) && !empty($not_ready_tasks))
|
||||
{
|
||||
$output->writeln('');
|
||||
}
|
||||
|
||||
if (!empty($not_ready_tasks))
|
||||
{
|
||||
$output->writeln('<info>' . $this->user->lang('TASKS_NOT_READY') . '</info>');
|
||||
foreach ($not_ready_tasks as $task)
|
||||
{
|
||||
$output->writeln($task->get_name());
|
||||
}
|
||||
$this->print_tasks_names($not_ready_tasks, $output);
|
||||
}
|
||||
}
|
||||
|
||||
public function print_tasks_names ($tasks, $output)
|
||||
{
|
||||
foreach ($tasks as $task)
|
||||
{
|
||||
$output->writeln($task->get_name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user