setExpired function added.
Formated under PSR-2 standard