summaryrefslogtreecommitdiff
path: root/app/Event/ProjectDailySummaryListener.php
blob: cd593abcd98a2fbed65b2870105fcb2cecec716f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace Event;

/**
 * Project daily summary listener
 *
 * @package event
 * @author  Frederic Guillot
 */
class ProjectDailySummaryListener extends Base
{
    /**
     * Execute the action
     *
     * @access public
     * @param  array   $data   Event data dictionary
     * @return bool            True if the action was executed or false when not executed
     */
    public function execute(array $data)
    {
        if (isset($data['project_id'])) {
            return $this->projectDailySummary->updateTotals($data['project_id'], date('Y-m-d'));
        }

        return false;
    }
}