Exemplo n.º 1
0
 /**
  * Collect clover XML into json_file.
  *
  * @return \Contrib\Bundle\CoverallsV1Bundle\Api\Jobs
  */
 public function collectCloverXml()
 {
     $srcDir = $this->config->getSrcDir();
     $cloverXmlPaths = $this->config->getCloverXmlPaths();
     $xmlCollector = new CloverXmlCoverageCollector();
     foreach ($cloverXmlPaths as $cloverXmlPath) {
         $xml = simplexml_load_file($cloverXmlPath);
         $xmlCollector->collect($xml, $srcDir);
     }
     $this->jsonFile = $xmlCollector->getJsonFile();
     if ($this->config->isExcludeNoStatements()) {
         $this->jsonFile->excludeNoStatementsFiles();
     }
     $this->jsonFile->sortSourceFiles();
     return $this;
 }
Exemplo n.º 2
0
 protected function collectJsonFileWithoutSourceFiles()
 {
     $xml = $this->createNoSourceCloverXml();
     $collector = new CloverXmlCoverageCollector();
     return $collector->collect($xml, $this->rootDir);
 }