diff options
Diffstat (limited to 'app/Console')
-rw-r--r-- | app/Console/Base.php | 21 | ||||
-rw-r--r-- | app/Console/ProjectDailyColumnStatsExport.php (renamed from app/Console/ProjectDailySummaryExport.php) | 8 | ||||
-rw-r--r-- | app/Console/ProjectDailyStatsCalculation.php (renamed from app/Console/ProjectDailySummaryCalculation.php) | 9 |
3 files changed, 20 insertions, 18 deletions
diff --git a/app/Console/Base.php b/app/Console/Base.php index 07243080..86d78ab3 100644 --- a/app/Console/Base.php +++ b/app/Console/Base.php @@ -11,16 +11,17 @@ use Symfony\Component\Console\Command\Command; * @package console * @author Frederic Guillot * - * @property \Model\Notification $notification - * @property \Model\Project $project - * @property \Model\ProjectPermission $projectPermission - * @property \Model\ProjectAnalytic $projectAnalytic - * @property \Model\ProjectDailySummary $projectDailySummary - * @property \Model\SubtaskExport $subtaskExport - * @property \Model\Task $task - * @property \Model\TaskExport $taskExport - * @property \Model\TaskFinder $taskFinder - * @property \Model\Transition $transition + * @property \Model\Notification $notification + * @property \Model\Project $project + * @property \Model\ProjectPermission $projectPermission + * @property \Model\ProjectAnalytic $projectAnalytic + * @property \Model\ProjectDailyColumnStats $projectDailyColumnStats + * @property \Model\ProjectDailyStats $projectDailyColumnStats + * @property \Model\SubtaskExport $subtaskExport + * @property \Model\Task $task + * @property \Model\TaskExport $taskExport + * @property \Model\TaskFinder $taskFinder + * @property \Model\Transition $transition */ abstract class Base extends Command { diff --git a/app/Console/ProjectDailySummaryExport.php b/app/Console/ProjectDailyColumnStatsExport.php index 07841d52..b9830662 100644 --- a/app/Console/ProjectDailySummaryExport.php +++ b/app/Console/ProjectDailyColumnStatsExport.php @@ -7,13 +7,13 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class ProjectDailySummaryExport extends Base +class ProjectDailyColumnStatsExport extends Base { protected function configure() { $this - ->setName('export:daily-project-summary') - ->setDescription('Daily project summary CSV export (number of tasks per column and per day)') + ->setName('export:daily-project-column-stats') + ->setDescription('Daily project column stats CSV export (number of tasks per column and per day)') ->addArgument('project_id', InputArgument::REQUIRED, 'Project id') ->addArgument('start_date', InputArgument::REQUIRED, 'Start date (YYYY-MM-DD)') ->addArgument('end_date', InputArgument::REQUIRED, 'End date (YYYY-MM-DD)'); @@ -21,7 +21,7 @@ class ProjectDailySummaryExport extends Base protected function execute(InputInterface $input, OutputInterface $output) { - $data = $this->projectDailySummary->getAggregatedMetrics( + $data = $this->projectDailyColumnStats->getAggregatedMetrics( $input->getArgument('project_id'), $input->getArgument('start_date'), $input->getArgument('end_date') diff --git a/app/Console/ProjectDailySummaryCalculation.php b/app/Console/ProjectDailyStatsCalculation.php index b2ada1b6..4b77c556 100644 --- a/app/Console/ProjectDailySummaryCalculation.php +++ b/app/Console/ProjectDailyStatsCalculation.php @@ -6,13 +6,13 @@ use Model\Project; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class ProjectDailySummaryCalculation extends Base +class ProjectDailyStatsCalculation extends Base { protected function configure() { $this - ->setName('projects:daily-summary') - ->setDescription('Calculate daily summary data for all projects'); + ->setName('projects:daily-stats') + ->setDescription('Calculate daily statistics for all projects'); } protected function execute(InputInterface $input, OutputInterface $output) @@ -21,7 +21,8 @@ class ProjectDailySummaryCalculation extends Base foreach ($projects as $project) { $output->writeln('Run calculation for '.$project['name']); - $this->projectDailySummary->updateTotals($project['id'], date('Y-m-d')); + $this->projectDailyColumnStats->updateTotals($project['id'], date('Y-m-d')); + $this->projectDailyStats->updateTotals($project['id'], date('Y-m-d')); } } } |