Ejemplo n.º 1
0
 /**
  * @return Report[]
  */
 private function getReportsToMerge()
 {
     $result = array();
     foreach (Report::getAllReportClasses() as $reportClass) {
         if ($reportClass == 'Piwik\\Plugins\\API\\Reports\\Get') {
             continue;
         }
         /** @var Report $report */
         $report = new $reportClass();
         if ($report->getModule() == 'API' || $report->getAction() != 'get') {
             continue;
         }
         $metrics = $report->getMetrics();
         if (!empty($report->parameters) || empty($metrics)) {
             continue;
         }
         $result[] = $report;
     }
     return $result;
 }