Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/248233
Change subject: Made LinksUpdate::__construct() use normal type hints
......................................................................
Made LinksUpdate::__construct() use normal type hints
Change-Id: Ie5f4de95d07ac9f24e415f92c5116385863a47f9
---
M includes/deferred/LinksUpdate.php
1 file changed, 4 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/33/248233/1
diff --git a/includes/deferred/LinksUpdate.php
b/includes/deferred/LinksUpdate.php
index 5a7efca..0348a1a 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -85,25 +85,16 @@
* @param bool $recursive Queue jobs for recursive updates?
* @throws MWException
*/
- function __construct( $title, $parserOutput, $recursive = true ) {
+ function __construct( Title $title, ParserOutput $parserOutput,
$recursive = true ) {
parent::__construct( false ); // no implicit transaction
-
- if ( !( $title instanceof Title ) ) {
- throw new MWException( "The calling convention to
LinksUpdate::LinksUpdate() has changed. " .
- "Please see Article::editUpdates() for an
invocation example.\n" );
- }
-
- if ( !( $parserOutput instanceof ParserOutput ) ) {
- throw new MWException( "The calling convention to
LinksUpdate::__construct() has changed. " .
- "Please see WikiPage::doEditUpdates() for an
invocation example.\n" );
- }
$this->mTitle = $title;
$this->mId = $title->getArticleID();
if ( !$this->mId ) {
- throw new MWException( "The Title object did not
provide an article " .
- "ID. Perhaps the page doesn't exist?" );
+ throw new InvalidArgumentException(
+ "The Title object yields no ID. Perhaps the
page doesn't exist?"
+ );
}
$this->mParserOutput = $parserOutput;
--
To view, visit https://gerrit.wikimedia.org/r/248233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5f4de95d07ac9f24e415f92c5116385863a47f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits