Ejemplo n.º 1
0
 /**
  * Index action
  *
  * @return void
  */
 public function indexAction()
 {
     $monthIdentifier = $this->electomatService->getMonthIdentifierLastMonth();
     $this->view->assign('numberOfCommits', $this->commitRepository->getCommitsByMonth($monthIdentifier)->count());
     $this->view->assign('numberOfActiveRepositories', $this->repositoryRepository->extractTheRepositoriesFromAStackOfCommits($this->commitRepository->getCommitsByMonth($monthIdentifier))->count());
     $this->view->assign('numberOfMonitoredRepositories', $this->repositoryRepository->countByIsActive(TRUE));
     $this->view->assign('numberOfCommitters', $this->aggregatedDataPerUserRepository->findNumberOfCommittersPerMonth($monthIdentifier));
     $this->view->assign('coderOfTheMonthAward', $this->awardRepository->findLatestAwards(1)->getFirst());
     $this->view->assign('currentTopicAwards', $this->awardRepository->findCurrentTopicAwards());
 }
 /**
  * Processes a single commit and adds it (the numbers) to the aggregated data
  *
  * @param \Mrimann\CoMo\Domain\Model\Commit $commit
  */
 protected function processSingleCommit(\Mrimann\CoMo\Domain\Model\Commit $commit)
 {
     $aggregatedDataBucket = $this->aggregatedDataPerUserRepository->findByCommitterAndMonth($commit);
     $aggregatedDataBucket->addCommit($commit);
     $this->aggregatedDataPerUserRepository->update($aggregatedDataBucket);
 }
Ejemplo n.º 3
0
 /**
  * Returns the best ranked committers for a given topic and month
  *
  * @param string the topic
  * @param string the month identifier
  */
 public function getTopicAwardsForMonth($topic, $month)
 {
     return $this->aggregatedDataPerUserRepository->findBestRankedForTopicAndMonth($topic, $month);
 }