wiki.techinc.nl/includes/api
Thiemo Kreuz 734a969d55 Safe replacement of a lot of !count() with === []
This was originally a global search and replace. I manually checked all
replacements and reverted them if (due to the lack of type hints) either
null (that would be 0 when counted) or a Countable object can end in the
variable or property in question.

Now this patch only touches places where I'm sure nothing can break.

For the sanity of the honorable reviewers this patch is exclusively touching
negated counts. You should not find a single `!== []` in this patch, that
would be a mistake.

Change-Id: I5eafd4d8fccdb53a668be8e6f25a566f9c3a0a95
2019-01-15 17:28:49 +01:00
..
i18n Localisation updates from https://translatewiki.net. 2019-01-08 22:13:08 +01:00
ApiAMCreateAccount.php
ApiAuthManagerHelper.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiBase.php ApiDelete: Handle batched deletions properly 2018-12-20 10:03:26 -05:00
ApiBlock.php ApiBlock: Avoid PHP warning when partial blocks are enabled but not used 2018-12-19 11:14:50 -05:00
ApiChangeAuthenticationData.php
ApiCheckToken.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiClearHasMsg.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiClientLogin.php
ApiComparePages.php Merge "ApiComparePages: Don't error with no prev/next rev" 2018-12-18 10:06:23 +00:00
ApiContinuationManager.php
ApiCSPReport.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiDelete.php ApiDelete: Handle batched deletions properly 2018-12-20 10:03:26 -05:00
ApiDisabled.php Remove use of old API doc methods 2018-10-29 14:58:19 -07:00
ApiEditPage.php Enforce partial blocks 2018-10-24 00:57:48 +00:00
ApiEmailUser.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiErrorFormatter.php ApiDelete: Handle batched deletions properly 2018-12-20 10:03:26 -05:00
ApiExpandTemplates.php API: Update query modules for MCR 2018-07-27 23:33:45 +00:00
ApiFeedContributions.php Delete always true condition 2018-12-02 19:06:53 +01:00
ApiFeedRecentChanges.php Drop the 'CategorizedRecentChanges' feature 2018-02-15 10:45:10 -08:00
ApiFeedWatchlist.php Link log entries to Special:Log on ApiFeedWatchlist 2018-12-12 16:20:11 +01:00
ApiFileRevert.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiFormatBase.php API: Set robots noindex,nofollow on HTML output 2018-10-25 09:37:30 -04:00
ApiFormatFeedWrapper.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiFormatJson.php Don't silently fail if API result fails to encode 2018-12-05 13:28:33 -05:00
ApiFormatNone.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiFormatPhp.php Add more checks to ApiStructureTest.php 2018-04-08 15:58:06 +03:00
ApiFormatRaw.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiFormatXml.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiHelp.php Merge "Remove loading of module 'mediawiki.toc' in special pages" 2018-12-13 01:57:34 +00:00
ApiHelpParamValueMessage.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiImageRotate.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiImport.php A few doc comment fixups 2017-12-04 11:11:52 +11:00
ApiLinkAccount.php
ApiLogin.php Improve ApiLogin test coverage 2018-10-10 11:11:43 +03:00
ApiLogout.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiMain.php API: Add User-Agent to CORS allow list 2018-12-19 12:11:17 -08:00
ApiManageTags.php
ApiMergeHistory.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiMessage.php Split ApiMessage to class per file 2018-05-27 00:31:30 +00:00
ApiMessageTrait.php API: Validate API error codes 2018-11-26 18:41:08 +00:00
ApiModuleManager.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ApiMove.php Test ApiMove 2018-04-15 14:13:08 +03:00
ApiOpenSearch.php A few doc comment fixups 2017-12-04 11:11:52 +11:00
ApiOptions.php New hook ApiOptions 2018-10-17 18:02:20 -07:00
ApiPageSet.php ApiPageSet::initFromPageIds: Default $filterIds to true 2018-12-12 18:37:43 +00:00
ApiParamInfo.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiParse.php Fix PHPDoc type for instance variables and methods 2018-10-21 13:00:25 +01:00
ApiPatrol.php API: Update query modules for MCR 2018-07-27 23:33:45 +00:00
ApiProtect.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiPurge.php [MCR] Move getSecondaryDataUpdates to the page level 2018-09-04 21:50:58 +02:00
ApiQuery.php Rename ApiQueryContributions to ApiQueryUserContribs to match api module name 2018-05-26 23:07:15 +00:00
ApiQueryAllCategories.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryAllDeletedRevisions.php Merge "Migrate Api modules from tag_summary table to change_tag" 2018-11-30 19:13:46 +00:00
ApiQueryAllImages.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
ApiQueryAllLinks.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
ApiQueryAllMessages.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
ApiQueryAllPages.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryAllRevisions.php Migrate Api modules from tag_summary table to change_tag 2018-11-27 18:12:06 +01:00
ApiQueryAllUsers.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryAuthManagerInfo.php
ApiQueryBacklinks.php Remove unused use in anonymous function 2018-12-01 10:12:32 +01:00
ApiQueryBacklinksprop.php API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop 2018-10-01 10:18:40 -04:00
ApiQueryBase.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryBlocks.php API: Filter lists of IDs before sending them to the database 2018-12-04 08:57:57 +00:00
ApiQueryCategories.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryCategoryInfo.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryCategoryMembers.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryContributors.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryDeletedRevisions.php Merge "Migrate Api modules from tag_summary table to change_tag" 2018-11-30 19:13:46 +00:00
ApiQueryDeletedrevs.php Merge "Migrate Api modules from tag_summary table to change_tag" 2018-11-30 19:13:46 +00:00
ApiQueryDisabled.php Remove use of old API doc methods 2018-10-29 14:58:19 -07:00
ApiQueryDuplicateFiles.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryExternalLinks.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
ApiQueryExtLinksUsage.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
ApiQueryFilearchive.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
ApiQueryFileRepoInfo.php API: Use param-per-value for meta=filerepoinfo's friprop docs 2018-06-20 10:47:18 -04:00
ApiQueryGeneratorBase.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryImageInfo.php API: Remove long-deprecated methods (and one class) 2018-10-15 16:37:04 -04:00
ApiQueryImages.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryInfo.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryIWBacklinks.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ApiQueryIWLinks.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryLangBacklinks.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ApiQueryLangLinks.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
ApiQueryLinks.php Replace call_user_func_array(), part 2 2018-06-07 20:19:26 -07:00
ApiQueryLogEvents.php Drop $wgChangeTagsSchemaMigrationStage 2018-11-28 23:03:41 +01:00
ApiQueryMyStashedFiles.php
ApiQueryPagePropNames.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryPageProps.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryPagesWithProp.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryPrefixSearch.php Push pagination decision for search into SearchEngine 2018-06-11 13:35:44 -07:00
ApiQueryProtectedTitles.php Pass $key into CommentStore methods and use MediawikiServices 2018-02-05 15:34:12 +00:00
ApiQueryQueryPage.php Use SpecialPageFactory in ApiQueryQueryPage 2018-12-14 18:50:22 +01:00
ApiQueryRandom.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryRecentChanges.php Merge "Migrate Api modules from tag_summary table to change_tag" 2018-11-30 19:13:46 +00:00
ApiQueryRevisions.php Merge "Migrate Api modules from tag_summary table to change_tag" 2018-11-30 19:13:46 +00:00
ApiQueryRevisionsBase.php [MCR] Introduce SlotRoleHandler and SlotRoleRegistry 2018-11-30 12:29:05 -08:00
ApiQuerySearch.php Reduce calls to MediaWikiServices::getInstance() 2018-08-18 06:02:39 +02:00
ApiQuerySiteinfo.php Ensure LanguageCode::bcp47() returns a valid BCP 47 language code 2018-10-11 01:53:54 -04:00
ApiQueryStashImageInfo.php
ApiQueryTags.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiQueryTokens.php Replace call_user_func_array(), part 2 2018-06-07 20:19:26 -07:00
ApiQueryUserContribs.php Safe replacement of a lot of !count() with === [] 2019-01-15 17:28:49 +01:00
ApiQueryUserInfo.php List Partial Block details in ApiQueryBlocks and ApiQueryUserinfo. 2018-10-24 16:26:32 +00:00
ApiQueryUsers.php Pass $key into CommentStore methods and use MediawikiServices 2018-02-05 15:34:12 +00:00
ApiQueryWatchlist.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
ApiQueryWatchlistRaw.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiRawMessage.php Split ApiMessage to class per file 2018-05-27 00:31:30 +00:00
ApiRemoveAuthenticationData.php
ApiResetPassword.php
ApiResult.php Mass conversion of $wgContLang to service 2018-08-11 22:44:29 -06:00
ApiRevisionDelete.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
ApiRollback.php Add TransactionProfiler::redefineExpectations and migrate appropriate callers 2018-12-10 16:02:30 +00:00
ApiRsd.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiSerializable.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiSetNotificationTimestamp.php API: Update query modules for MCR 2018-07-27 23:33:45 +00:00
ApiSetPageLanguage.php Simplify PHP by using ?? and ?: 2018-07-10 20:03:17 +00:00
ApiStashEdit.php Fix caller name in ApiStashEdit::parseAndStash 2018-09-30 16:01:23 +02:00
ApiTag.php Re-namespace RevisionStore and RevisionRecord classes 2018-10-09 10:22:48 -04:00
ApiTokens.php Use ::class to resolve class names in includes files 2018-01-27 20:34:29 +01:00
ApiUnblock.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
ApiUndelete.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiUpload.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiUsageException.php API: Remove long-deprecated methods (and one class) 2018-10-15 16:37:04 -04:00
ApiUserrights.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiValidatePassword.php
ApiWatch.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
IApiMessage.php Split ApiMessage to class per file 2018-05-27 00:31:30 +00:00
SearchApi.php Use PHP 7 '??' operator instead of '?:' (round 2) 2018-09-03 20:48:10 +02:00