aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryWatchlist.php
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2019-02-25 00:38:33 +0000
committerReedy <reedy@wikimedia.org>2019-02-25 00:38:33 +0000
commit4691389fa46f79cbeaf2daffda407cf7daa66fd4 (patch)
treedc1898086c8f0eb41ff1ec3d5f380b4e5e4649dc /includes/api/ApiQueryWatchlist.php
parent5b6a8d4c57e3e601fbd8af6eebb22b372895f809 (diff)
downloadmediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.tar.gz
mediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.zip
Use (int) rather than intval()
Bug: T216969 Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64
Diffstat (limited to 'includes/api/ApiQueryWatchlist.php')
-rw-r--r--includes/api/ApiQueryWatchlist.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php
index 95fbd3de6c73..236f6e0908d7 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -195,9 +195,9 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
}
} else {
if ( $params['allrev'] ) {
- $ids[] = intval( $recentChangeInfo['rc_this_oldid'] );
+ $ids[] = (int)$recentChangeInfo['rc_this_oldid'];
} else {
- $ids[] = intval( $recentChangeInfo['rc_cur_id'] );
+ $ids[] = (int)$recentChangeInfo['rc_cur_id'];
}
}
}
@@ -272,7 +272,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
/* Our output data. */
$vals = [];
- $type = intval( $recentChangeInfo['rc_type'] );
+ $type = (int)$recentChangeInfo['rc_type'];
$vals['type'] = RecentChange::parseFromRCType( $type );
$anyHidden = false;
@@ -294,9 +294,9 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
ApiQueryBase::addTitleInfo( $vals, $title );
}
if ( $this->fld_ids ) {
- $vals['pageid'] = intval( $recentChangeInfo['rc_cur_id'] );
- $vals['revid'] = intval( $recentChangeInfo['rc_this_oldid'] );
- $vals['old_revid'] = intval( $recentChangeInfo['rc_last_oldid'] );
+ $vals['pageid'] = (int)$recentChangeInfo['rc_cur_id'];
+ $vals['revid'] = (int)$recentChangeInfo['rc_this_oldid'];
+ $vals['old_revid'] = (int)$recentChangeInfo['rc_last_oldid'];
}
}
}
@@ -337,8 +337,8 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
/* Add sizes of each revision. (Only available on 1.10+) */
if ( $this->fld_sizes ) {
- $vals['oldlen'] = intval( $recentChangeInfo['rc_old_len'] );
- $vals['newlen'] = intval( $recentChangeInfo['rc_new_len'] );
+ $vals['oldlen'] = (int)$recentChangeInfo['rc_old_len'];
+ $vals['newlen'] = (int)$recentChangeInfo['rc_new_len'];
}
/* Add the timestamp. */
@@ -391,7 +391,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
LogPage::DELETED_ACTION,
$user
) ) {
- $vals['logid'] = intval( $recentChangeInfo['rc_logid'] );
+ $vals['logid'] = (int)$recentChangeInfo['rc_logid'];
$vals['logtype'] = $recentChangeInfo['rc_log_type'];
$vals['logaction'] = $recentChangeInfo['rc_log_action'];
$vals['logparams'] = LogFormatter::newFromRow( $recentChangeInfo )->formatParametersForApi();