}
/**
- * Fetch revision comment if it's available to the specified audience.
- * If the specified audience does not have access to the comment, an
- * empty string will be returned.
- *
* @param int $audience One of:
* Revision::FOR_PUBLIC to be displayed to all users
* Revision::FOR_THIS_USER to be displayed to the given user
* Revision::RAW get the text regardless of permissions
* @param User|null $user User object to check for, only if FOR_THIS_USER is passed
* to the $audience parameter
- * @return string
+ *
+ * @return string|null Returns null if the specified audience does not have access to the
+ * comment.
*/
function getComment( $audience = self::FOR_PUBLIC, User $user = null ) {
global $wgUser;