Merge "import/export: Add documentation for nullable arguments"

This commit is contained in:
jenkins-bot 2021-10-20 18:47:28 +00:00 committed by Gerrit Code Review
commit 5680816a08
4 changed files with 15 additions and 15 deletions

View file

@ -63,7 +63,7 @@ class DumpFilter {
}
/**
* @param stdClass $page
* @param stdClass|null $page
* @param string $string
*/
public function writeOpenPage( $page, $string ) {
@ -84,7 +84,7 @@ class DumpFilter {
}
/**
* @param stdClass $rev
* @param stdClass|null $rev
* @param string $string
*/
public function writeRevision( $rev, $string ) {
@ -127,7 +127,7 @@ class DumpFilter {
/**
* Override for page-based filter types.
* @param stdClass $page
* @param stdClass|null $page
* @return bool
*/
protected function pass( $page ) {

View file

@ -43,7 +43,7 @@ class DumpOutput {
}
/**
* @param stdClass $page
* @param stdClass|null $page
* @param string $string
*/
public function writeOpenPage( $page, $string ) {
@ -58,7 +58,7 @@ class DumpOutput {
}
/**
* @param stdClass $rev
* @param stdClass|null $rev
* @param string $string
*/
public function writeRevision( $rev, $string ) {

View file

@ -511,7 +511,7 @@ class WikiExporter {
* and be sorted/grouped by page and revision to avoid duplicate page records in the output.
*
* @param IResultWrapper $results
* @param stdClass $lastRow the last row output from the previous call (or null if none)
* @param stdClass|null $lastRow the last row output from the previous call (or null if none)
* @return stdClass the last row processed
*/
protected function outputPageStreamBatch( $results, $lastRow ) {

View file

@ -54,16 +54,16 @@ class WikiImporter {
/** @var callable */
private $mUploadCallback;
/** @var callable */
/** @var callable|null */
private $mRevisionCallback;
/** @var callable */
/** @var callable|null */
private $mPageCallback;
/** @var callable|null */
private $mSiteInfoCallback;
/** @var callable */
/** @var callable|null */
private $mPageOutCallback;
/** @var callable|null */
@ -285,8 +285,8 @@ class WikiImporter {
/**
* Sets the action to perform as each new page in the stream is reached.
* @param callable $callback
* @return callable
* @param callable|null $callback
* @return callable|null
*/
public function setPageCallback( $callback ) {
$previous = $this->mPageCallback;
@ -300,8 +300,8 @@ class WikiImporter {
* with the original title form (in case it's been overridden into a
* local namespace), and a count of revisions.
*
* @param callable $callback
* @return callable
* @param callable|null $callback
* @return callable|null
*/
public function setPageOutCallback( $callback ) {
$previous = $this->mPageOutCallback;
@ -311,8 +311,8 @@ class WikiImporter {
/**
* Sets the action to perform as each page revision is reached.
* @param callable $callback
* @return callable
* @param callable|null $callback
* @return callable|null
*/
public function setRevisionCallback( $callback ) {
$previous = $this->mRevisionCallback;