Merge "Improve type hints in export related classes"

This commit is contained in:
jenkins-bot 2019-07-25 21:42:32 +00:00 committed by Gerrit Code Review
commit bd62b3562a
5 changed files with 12 additions and 9 deletions

View file

@ -29,13 +29,13 @@ class ApiImportReporter extends ImportReporter {
/**
* @param Title $title
* @param Title $origTitle
* @param ForeignTitle $foreignTitle
* @param int $revisionCount
* @param int $successCount
* @param array $pageInfo
* @return void
*/
public function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
public function reportPage( $title, $foreignTitle, $revisionCount, $successCount, $pageInfo ) {
// Add a result entry
$r = [];
@ -51,7 +51,7 @@ class ApiImportReporter extends ImportReporter {
$this->mResultArr[] = $r;
// Piggyback on the parent to do the logging
parent::reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo );
parent::reportPage( $title, $foreignTitle, $revisionCount, $successCount, $pageInfo );
}
public function getData() {

View file

@ -27,7 +27,10 @@
* @ingroup Dump
*/
class DumpFileOutput extends DumpOutput {
protected $handle = false, $filename;
/** @var resource|false */
protected $handle = false;
/** @var string */
protected $filename;
/**
* @param string $file
@ -73,7 +76,7 @@ class DumpFileOutput extends DumpOutput {
}
/**
* @param array $newname
* @param string|string[] $newname
* @return string
* @throws MWException
*/

View file

@ -125,7 +125,7 @@ class WikiExporter {
* various row objects and XML output for filtering. Filters
* can be chained or used as callbacks.
*
* @param DumpOutput &$sink
* @param DumpOutput|DumpFilter &$sink
*/
public function setOutputSink( &$sink ) {
$this->sink =& $sink;
@ -240,7 +240,7 @@ class WikiExporter {
* Not called by default (depends on $this->list_authors)
* Can be set by Special:Export when not exporting whole history
*
* @param array $cond
* @param string $cond
*/
protected function do_list_authors( $cond ) {
$this->author_list = "<contributors>";

View file

@ -466,7 +466,7 @@ class WikiImporter {
/**
* Notify the callback function when a new "<page>" is reached.
* @param Title $title
* @param array $title
*/
function pageCallback( $title ) {
if ( isset( $this->mPageCallback ) ) {

View file

@ -352,7 +352,7 @@ class WikiRevision implements ImportableUploadRevision, ImportableOldRevision {
/**
* @since 1.12.2
* @param array $params
* @param string $params
*/
public function setParams( $params ) {
$this->params = $params;