protected function formatTasksAndDescriptions()
{
$tasks = $this->application['tasks']->getArrayCopy();
ksort($tasks);
$text = '';
$text .= "(in {$this->application->projectDirectory})\n";
foreach ($tasks as $name => $task) {
if ($name === 'default' || !$task->description && !$this->showAllTasks) {
continue;
}
if ($task instanceof FileTask) {
$text .= "File => {$task->name}";
} else {
$text .= "bob {$task->name}";
}
$text .= "\n";
if ($task->description) {
$text .= "\t{$task->description}\n";
}
}
return $text;
}