diff options
author | Reedy <reedy@wikimedia.org> | 2019-02-25 00:38:33 +0000 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2019-02-25 00:38:33 +0000 |
commit | 4691389fa46f79cbeaf2daffda407cf7daa66fd4 (patch) | |
tree | dc1898086c8f0eb41ff1ec3d5f380b4e5e4649dc /includes/api/ApiQueryBase.php | |
parent | 5b6a8d4c57e3e601fbd8af6eebb22b372895f809 (diff) | |
download | mediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.tar.gz mediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.zip |
Use (int) rather than intval()
Bug: T216969
Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64
Diffstat (limited to 'includes/api/ApiQueryBase.php')
-rw-r--r-- | includes/api/ApiQueryBase.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index c92f037c9cc2..307066573cd2 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -510,7 +510,7 @@ abstract class ApiQueryBase extends ApiBase { * @param string $prefix Module prefix */ public static function addTitleInfo( &$arr, $title, $prefix = '' ) { - $arr[$prefix . 'ns'] = intval( $title->getNamespace() ); + $arr[$prefix . 'ns'] = (int)$title->getNamespace(); $arr[$prefix . 'title'] = $title->getPrefixedText(); } @@ -524,7 +524,7 @@ abstract class ApiQueryBase extends ApiBase { $result = $this->getResult(); ApiResult::setIndexedTagName( $data, $this->getModulePrefix() ); - return $result->addValue( [ 'query', 'pages', intval( $pageId ) ], + return $result->addValue( [ 'query', 'pages', (int)$pageId ], $this->getModuleName(), $data ); } |