import/export: Add documentation for nullable arguments

Change-Id: Id8e4553a054a36011433d5705c699d1c2730456e
This commit is contained in:
Umherirrender 2021-09-22 23:09:12 +02:00
parent 42d554c930
commit 10e2f98a17
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

@ -53,16 +53,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 */
@ -284,8 +284,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;
@ -299,8 +299,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;
@ -310,8 +310,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;