コード例 #1
0
ファイル: StandardController.php プロジェクト: mrimann/como
 /**
  * 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());
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: ElectomatService.php プロジェクト: mrimann/como
 /**
  * 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);
 }