A maintenance model for phase-type systems