1
0
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:
Etienne Baroux
2014-06-03 10:42:50 +02:00
parent 71fb956498
commit 760aa9d402
3 changed files with 45 additions and 46 deletions

View File

@@ -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());
}
}
}