diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-04-18 21:57:23 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-04-18 21:57:23 -0400 |
commit | 78ffcf9496612dc44b7e6505fa5a16f2089c86ed (patch) | |
tree | c03b1ae824f7219dee68aa69e468d4825947c53a /app/Console/TaskOverdueNotificationCommand.php | |
parent | 4253df0854cfc80ee89ef6449613944db2c066b9 (diff) |
Update doc for CLI
Diffstat (limited to 'app/Console/TaskOverdueNotificationCommand.php')
-rw-r--r-- | app/Console/TaskOverdueNotificationCommand.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/Console/TaskOverdueNotificationCommand.php b/app/Console/TaskOverdueNotificationCommand.php index 894e4402..7e8484c8 100644 --- a/app/Console/TaskOverdueNotificationCommand.php +++ b/app/Console/TaskOverdueNotificationCommand.php @@ -4,7 +4,6 @@ namespace Kanboard\Console; use Kanboard\Model\Task; use Kanboard\Core\Security\Role; -use Kanboard\Model\ProjectUserRole; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -24,7 +23,7 @@ class TaskOverdueNotificationCommand extends BaseCommand protected function execute(InputInterface $input, OutputInterface $output) { - if($input->getOption('group')) { + if ($input->getOption('group')) { $tasks = $this->sendGroupOverdueTaskNotifications(); } elseif ($input->getOption('manager')) { $tasks = $this->sendOverdueTaskNotificationsToManagers(); @@ -90,8 +89,8 @@ class TaskOverdueNotificationCommand extends BaseCommand foreach ($this->groupByColumn($tasks, 'project_id') as $project_id => $project_tasks) { $users = $this->userNotification->getUsersWithNotificationEnabled($project_id); - $managers = array(); + foreach ($users as $user) { $role = $this->projectUserRole->getUserRole($project_id, $user['id']); if($role == Role::PROJECT_MANAGER) { @@ -159,7 +158,7 @@ class TaskOverdueNotificationCommand extends BaseCommand * Send overdue tasks for a project manager(s) * * @access public - * @param array $user + * @param array $manager * @param array $tasks */ public function sendUserOverdueTaskNotificationsToManagers(array $manager, array $tasks) |