/** * 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; }
protected function collectJsonFileWithoutSourceFiles() { $xml = $this->createNoSourceCloverXml(); $collector = new CloverXmlCoverageCollector(); return $collector->collect($xml, $this->rootDir); }