function getPercentDone() { $rep = $this->getResponse('text'); $srv = new EmailService(); $nbSent = $srv->nbEmailsSent($this->param('id')); $total = $srv->nbLogs($this->param('id')); $rep->content = $nbSent * 100 / $total; return $rep; }