Effect of trapping in degenerate quantum plasmas