Big update: New way of storing build errors, updated UI, AdminLTE 2, fixes, etc.

This commit is contained in:
Dan Cryer 2015-10-15 10:07:54 +01:00
commit 28ad88cff9
821 changed files with 164244 additions and 19321 deletions

View file

@ -10,6 +10,8 @@
namespace PHPCI\Store;
use PHPCI\Store\Base\BuildMetaStoreBase;
use b8\Database;
use PHPCI\Model\BuildMeta;
/**
* BuildMeta Store
@ -17,5 +19,28 @@ use PHPCI\Store\Base\BuildMetaStoreBase;
*/
class BuildMetaStore extends BuildMetaStoreBase
{
// This class has been left blank so that you can modify it - changes in this file will not be overwritten.
public function getErrorsForUpgrade($start, $limit)
{
$query = 'SELECT * FROM build_meta
WHERE meta_key IN (\'phpmd-data\', \'phpcs-data\', \'phpdoccheck-data\')
ORDER BY id ASC LIMIT :start, :limit';
$stmt = Database::getConnection('read')->prepare($query);
$stmt->bindValue(':start', $start, \PDO::PARAM_INT);
$stmt->bindValue(':limit', $limit, \PDO::PARAM_INT);
if ($stmt->execute()) {
$res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$map = function ($item) {
return new BuildMeta($item);
};
$rtn = array_map($map, $res);
return $rtn;
} else {
return array();
}
}
}