svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/ Sqlite.php

From: Date: Thu, 11 Mar 2010 00:33:00 +0000
Subject: svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/ Sqlite.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9291@lists.php.net to get a copy of this message
dufuz Thu, 11 Mar 2010 00:33:00 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=296050 Log: Prevent the no coverage function to attempt to get new coverage for files we already have in our database. Changed paths: U pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/Sqlite.php Modified: pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/Sqlite.php =================================================================== --- pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/Sqlite.php 2010-03-11 00:13:47 UTC (rev 296049) +++ pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/Sqlite.php 2010-03-11 00:33:00 UTC (rev 296050) @@ -668,6 +668,17 @@ public function addNoCoverageFiles() { echo "Adding files with no coverage information\n"; + + // Start by pruning out files we already have information about + $sql = 'SELECT * FROM files WHERE issource = 1'; + $result = $this->db->query($sql); + while ($res = $result->fetchArray(SQLITE3_ASSOC)) { + $key = array_search($res['path'], $this->files); + if (isset($this->files[$key])) { + unset($this->files[$key]); + } + } + foreach ($this->files as $file) { if (empty($file)) { continue;

« previous php.pear.core (#9291) next »