jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: Give more meaningful function names and add
documentation
......................................................................
Hygiene: Give more meaningful function names and add documentation
Change-Id: I667c593b7e77011367d1bb32a5bad85888561595
---
M includes/specials/SpecialUserProfile.php
1 file changed, 16 insertions(+), 6 deletions(-)
Approvals:
Awjrichards: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialUserProfile.php
b/includes/specials/SpecialUserProfile.php
index 62f47e0..1d6af99 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -24,11 +24,11 @@
}
/**
- * Returns HTML to show the last upload or a message where there is no
last upload
+ * Returns HTML to show the last upload or an empty string when there
has been no last upload
*
* @return String HTML string representing the last upload by the user
*/
- protected function getLastUpload() {
+ protected function getLastUploadHtml() {
wfProfileIn( __METHOD__ );
$file = $this->userInfo->getLastUpload();
@@ -64,7 +64,12 @@
return '';
}
- protected function getLastThanks() {
+ /**
+ * Returns HTML to show the last thanking or an empty string if the
user has never been thanked
+ *
+ * @return String HTML string representing the last thank by the user
+ */
+ protected function getLastThanksHtml() {
wfProfileIn( __METHOD__ );
$html = '';
$thank = $this->userInfo->getLastThanking();
@@ -85,7 +90,12 @@
return $html;
}
- protected function getLastEdit() {
+ /**
+ * Returns HTML to show the last edit or an empty string when the user
has not edited
+ *
+ * @return String HTML string representing the last edit by the user
+ */
+ protected function getLastEditHtml() {
wfProfileIn( __METHOD__ );
$rev = $this->userInfo->getLastEdit();
if ( $rev ) {
@@ -186,8 +196,8 @@
if ( $this->targetUser->getId() ) {
// prepare content
$this->userInfo = new MobileUserInfo(
$this->targetUser );
- $activityHtml = $this->getLastUpload() .
$this->getLastThanks()
- . $this->getLastEdit();
+ $activityHtml = $this->getLastUploadHtml() .
$this->getLastThanksHtml()
+ . $this->getLastEditHtml();
$html = Html::openElement( 'div', array(
'class' => 'profile' ) )
. Html::element( 'h1', array(),
$this->targetUser->getName() )
. $this->getUserSummary()
--
To view, visit https://gerrit.wikimedia.org/r/94085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I667c593b7e77011367d1bb32a5bad85888561595
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits