Skip to content

Commit

Permalink
Merge pull request #8 from hallowelt/ERM20742
Browse files Browse the repository at this point in the history
CS
  • Loading branch information
osnard authored Nov 28, 2023
2 parents 5f51c52 + cc13b94 commit da10eb5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
3 changes: 1 addition & 2 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


if ( defined( 'MWSTAKE_MEDIAWIKI_COMPONENT_COMMONWEBAPIS_VERSION' ) ) {
return;
}
Expand All @@ -13,7 +12,7 @@
= "\\MWStake\\MediaWiki\\Component\\CommonWebAPIs\\Setup::onExtensionFunctions";
$GLOBALS['wgServiceWiringFiles'][] = __DIR__ . '/includes/ServiceWiring.php';

$GLOBALS['wgExtensionFunctions'][] = static function() {
$GLOBALS['wgExtensionFunctions'][] = static function () {
$lb = \MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancer();
$titleIndexUpdater = new \MWStake\MediaWiki\Component\CommonWebAPIs\TitleIndexUpdater( $lb );
$userIndexUpdater = new \MWStake\MediaWiki\Component\CommonWebAPIs\UserIndexUpdater( $lb );
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"mwstake/mediawiki-component-utils": "~2"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"jakub-onderka/php-console-highlighter": "0.4.0",
"mediawiki/mediawiki-codesniffer": "29.0.0",
"mediawiki/minus-x": "1.0.0",
"phpunit/phpunit": "^6.5"
"mediawiki/mediawiki-codesniffer": "39.0.0",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"phpunit/phpunit": "^8.5"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 3 additions & 0 deletions src/Maintenance/PopulateTitleIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ protected function doDBUpdates() {
return true;
}

/**
* @param array $batch
*/
private function insertBatch( array $batch ) {
$db = $this->getDB( DB_PRIMARY );
$db->insert(
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/FileQueryStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
/**
* @return IStore
*/
protected function getStore() : IStore {
protected function getStore(): IStore {
return $this->store;
}
}
2 changes: 1 addition & 1 deletion src/Rest/GroupStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
/**
* @return IStore
*/
protected function getStore() : IStore {
protected function getStore(): IStore {
return $this->store;
}
}
2 changes: 1 addition & 1 deletion src/Rest/TitleQueryStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(
/**
* @return IStore
*/
protected function getStore() : IStore {
protected function getStore(): IStore {
return $this->store;
}
}
2 changes: 1 addition & 1 deletion src/Rest/UserQueryStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(
/**
* @return IStore
*/
protected function getStore() : IStore {
protected function getStore(): IStore {
return $this->store;
}
}
6 changes: 3 additions & 3 deletions src/TitleIndexUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
use MediaWiki\Hook\PageMoveCompleteHook;
use MediaWiki\Page\Hook\ArticleUndeleteHook;
use MediaWiki\Page\Hook\PageDeleteCompleteHook;
use MediaWiki\Page\Hook\PageUndeleteHook;
use MediaWiki\Page\PageIdentity;
use MediaWiki\Page\ProperPageIdentity;
use MediaWiki\Permissions\Authority;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Storage\Hook\PageSaveCompleteHook;
use StatusValue;
use Wikimedia\Rdbms\ILoadBalancer;

class TitleIndexUpdater implements PageSaveCompleteHook,
class TitleIndexUpdater implements
PageSaveCompleteHook,
PageMoveCompleteHook,
PageDeleteCompleteHook,
ArticleUndeleteHook,
Expand Down Expand Up @@ -81,6 +80,7 @@ public function onAfterImportPage( $title, $foreignTitle, $revCount, $sRevCount,

/**
* @param PageIdentity $page
* @param int|null $forceId (optional)
*
* @return bool|void
*/
Expand Down

0 comments on commit da10eb5

Please sign in to comment.