Mercurial > hg > cmmr2012-drupal-site
diff vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php Thu Jul 05 15:32:06 2018 +0100 +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php Tue Jul 10 13:19:18 2018 +0000 @@ -41,15 +41,19 @@ } /** - * @param string $className - * @param string $methodName - * @param string $parameterName - * @param \Exception $previous + * @param string $className + * @param string $methodName + * @param string $parameterName + * @param \Exception|null $previous * * @return self */ - public static function invalidParameterTypeHint($className, $methodName, $parameterName, \Exception $previous) - { + public static function invalidParameterTypeHint( + $className, + $methodName, + $parameterName, + \Exception $previous = null + ) { return new self( sprintf( 'The type hint of parameter "%s" in method "%s" in class "%s" is invalid.', @@ -61,4 +65,24 @@ $previous ); } + + /** + * @param $className + * @param $methodName + * @param \Exception|null $previous + * + * @return self + */ + public static function invalidReturnTypeHint($className, $methodName, \Exception $previous = null) + { + return new self( + sprintf( + 'The return type of method "%s" in class "%s" is invalid.', + $methodName, + $className + ), + 0, + $previous + ); + } }