Commit 5cd45783 authored by Jeremy Mikola's avatar Jeremy Mikola

Fix order of ResumeTokenException methods

Thank you, PedantryTest.
parent 041c0c4f
...@@ -20,23 +20,23 @@ namespace MongoDB\Exception; ...@@ -20,23 +20,23 @@ namespace MongoDB\Exception;
class ResumeTokenException extends \Exception class ResumeTokenException extends \Exception
{ {
/** /**
* Thrown when a resume token is not found in a change document. * Thrown when a resume token has an invalid type.
* *
* @param mixed $value Actual value (used to derive the type)
* @return self * @return self
*/ */
public static function notFound() public static function invalidType($value)
{ {
return new static('Resume token not found in change document'); return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', gettype($value)));
} }
/** /**
* Thrown when a resume token has an invalid type. * Thrown when a resume token is not found in a change document.
* *
* @param mixed $value Actual value (used to derive the type)
* @return self * @return self
*/ */
public static function invalidType($value) public static function notFound()
{ {
return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', gettype($value))); return new static('Resume token not found in change document');
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment