public function getKnownBranches($projectId)
    {
        $query = 'SELECT DISTINCT branch from build WHERE project_id = :pid';
        $stmt = Database::getConnection('read')->prepare($query);
        $stmt->bindValue(':pid', $projectId);

        if ($stmt->execute()) {
            $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

            $map = function ($item) {
                return $item['branch'];
            };
            $rtn = array_map($map, $res);

            return $rtn;
        } else {
            return array();
        }
    }
public function getKnownBranches($projectId)
    {
        $query = 'SELECT DISTINCT branch from build WHERE project_id = :pid';
        $stmt = Database::getConnection('read')->prepare($query);
        $stmt->bindValue(':pid', $projectId);

        if ($stmt->execute()) {
            $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

            $map = function ($item) {
                return $item['branch'];
            };
            $rtn = array_map($map, $res);

            return $rtn;
        } else {
            return array();
        }
    }
public function getKnownBranches ( $ projectId ) { $ query = 'SELECT DISTINCT branch from build WHERE project_id = :pid' ; $ stmt = Database :: getConnection ( 'read' ) -> prepare ( $ query ) ; $ stmt -> bindValue ( ':pid' , $ projectId ) ; if ( $ stmt -> execute ( ) ) { $ res = $ stmt -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; $ map = function ( $ item ) { return $ item [ 'branch' ] ; } ; $ rtn = array_map ( $ map , $ res ) ; return $ rtn ; } else { return array ( ) ; } }
Returns a list of all branch names PHPCI has run builds against.
@param $projectId
@return array
Returns a list of all branch names PHPCI has run builds against .