* it is every other state.
*
* @return void
- * @throws InvalidStateException If the state is not 'active'
+ * @throws UnexpectedStateException If the state is not 'active'
*/
public function validateCityStateIsActive () {
// Just compare it...
if (!$this instanceof CityActiveState) {
// Throw the exception
- throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
+ throw new UnexpectedStateException($this, self::EXCEPTION_INVALID_STATE);
+ } // END - if
+ }
+
+ /**
+ * Validates whether the state is 'virgin' or throws an exception if
+ * it is every other state.
+ *
+ * @return void
+ * @throws UnexpectedStateException If the state is not 'virgin'
+ */
+ public function validateCityStateIsVirgin () {
+ // Just compare it...
+ if (!$this instanceof CityVirginState) {
+ // Throw the exception
+ throw new UnexpectedStateException($this, self::EXCEPTION_INVALID_STATE);
} // END - if
}
}