aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryWatchlist.php
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2020-01-09 15:48:34 -0800
committerJames D. Forrester <jforrester@wikimedia.org>2020-01-10 14:17:13 -0800
commit0958a0bce4bd8390c97ce2042f1eb04df8308293 (patch)
treea1f9eb5d647b1150c3188f698129e3eb7a0c1393 /includes/api/ApiQueryWatchlist.php
parent41f8acfd52b36759f7a10196f36af5e2d9f81427 (diff)
downloadmediawikicore-0958a0bce4bd8390c97ce2042f1eb04df8308293.tar.gz
mediawikicore-0958a0bce4bd8390c97ce2042f1eb04df8308293.zip
Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
Diffstat (limited to 'includes/api/ApiQueryWatchlist.php')
-rw-r--r--includes/api/ApiQueryWatchlist.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php
index 15ffc58bf0d9..5954b5668f3c 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -64,7 +64,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$user = $this->getUser();
$wlowner = $this->getWatchlistUser( $params );
- if ( !is_null( $params['prop'] ) && is_null( $resultPageSet ) ) {
+ if ( $params['prop'] !== null && $resultPageSet === null ) {
$prop = array_flip( $params['prop'] );
$this->fld_ids = isset( $prop['ids'] );
@@ -96,7 +96,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
: WatchedItemQueryService::DIR_NEWER,
];
- if ( is_null( $resultPageSet ) ) {
+ if ( $resultPageSet === null ) {
$options['includeFields'] = $this->getFieldsToInclude();
} else {
$options['usedInGenerator'] = true;
@@ -110,7 +110,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
}
$startFrom = null;
- if ( !is_null( $params['continue'] ) ) {
+ if ( $params['continue'] !== null ) {
$cont = explode( '|', $params['continue'] );
$this->dieContinueUsageIf( count( $cont ) != 2 );
$continueTimestamp = $cont[0];
@@ -124,7 +124,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$options['watchlistOwnerToken'] = $params['token'];
}
- if ( !is_null( $params['namespace'] ) ) {
+ if ( $params['namespace'] !== null ) {
$options['namespaceIds'] = $params['namespace'];
}
@@ -132,7 +132,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$options['allRevisions'] = true;
}
- if ( !is_null( $params['show'] ) ) {
+ if ( $params['show'] !== null ) {
$show = array_flip( $params['show'] );
/* Check for conflicting parameters. */
@@ -152,7 +152,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$options['filters'] = array_keys( $show );
}
- if ( !is_null( $params['type'] ) ) {
+ if ( $params['type'] !== null ) {
try {
$rcTypes = RecentChange::parseToRCType( $params['type'] );
if ( $rcTypes ) {
@@ -164,10 +164,10 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
}
$this->requireMaxOneParameter( $params, 'user', 'excludeuser' );
- if ( !is_null( $params['user'] ) ) {
+ if ( $params['user'] !== null ) {
$options['onlyByUser'] = $params['user'];
}
- if ( !is_null( $params['excludeuser'] ) ) {
+ if ( $params['excludeuser'] !== null ) {
$options['notByUser'] = $params['excludeuser'];
}
@@ -201,7 +201,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
foreach ( $items as list( $watchedItem, $recentChangeInfo ) ) {
/** @var WatchedItem $watchedItem */
- if ( is_null( $resultPageSet ) ) {
+ if ( $resultPageSet === null ) {
$vals = $this->extractOutputData( $watchedItem, $recentChangeInfo );
$fit = $this->getResult()->addValue( [ 'query', $this->getModuleName() ], null, $vals );
if ( !$fit ) {
@@ -219,7 +219,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$this->setContinueEnumParameter( 'continue', implode( '|', $startFrom ) );
}
- if ( is_null( $resultPageSet ) ) {
+ if ( $resultPageSet === null ) {
$this->getResult()->addIndexedTagName(
[ 'query', $this->getModuleName() ],
'item'