From 8a9a1eff3e117a4f0572c88285f64472213dd962 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 30 Dec 2013 16:41:36 +0100 Subject: [PATCH] Update type hint for CreditsAction::getAuthor() This function calls $page->getUserText() and $page->getTimestamp(). These functions are not specified in the interface Page (which actually specifies nothing at all). Page is only implemented by WikiPage and Article. Article does not implement getUserText() and getTimestamp(). WikiPage does. CreditsAction::getAuthor() cannot ever be given an Article, because that would cause a fatal error "call to undefined method". Change-Id: I0ba29622b7307845345ce645cb63b53614aaf2ab --- includes/actions/CreditsAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php index 97c160510d..398548a2ca 100644 --- a/includes/actions/CreditsAction.php +++ b/includes/actions/CreditsAction.php @@ -80,10 +80,10 @@ class CreditsAction extends FormlessAction { /** * Get the last author with the last modification time - * @param Page $page + * @param WikiPage $page * @return String HTML */ - protected function getAuthor( Page $page ) { + protected function getAuthor( WikiPage $page ) { $user = User::newFromName( $page->getUserText(), false ); $timestamp = $page->getTimestamp(); -- 2.20.1