*/
public $mTitle = null;
- /**@{{
+ /**
+ * @var bool
+ * @protected
+ */
+ public $mDataLoaded = false;
+
+ /**
+ * @var bool
* @protected
*/
- public $mDataLoaded = false; // !< Boolean
- public $mIsRedirect = false; // !< Boolean
- public $mLatest = false; // !< Integer (false means "not loaded")
- /**@}}*/
+ public $mIsRedirect = false;
+
+ /**
+ * @var int|false False means "not loaded"
+ * @protected
+ */
+ public $mLatest = false;
/** @var PreparedEdit Map of cache fields (text, parser output, ect) for a proposed/new edit */
public $mPreparedEdit = false;
// Avoid PHP 7.1 warning of passing $this by reference
$wikiPage = $this;
- $deleter = is_null( $deleter ) ? $wgUser : $deleter;
+ if ( !$deleter ) {
+ $deleter = $wgUser;
+ }
if ( !Hooks::run( 'ArticleDelete',
[ &$wikiPage, &$deleter, &$reason, &$error, &$status, $suppress ]
) ) {
* @param Content|null $content Page content to be used when determining
* the required updates. This may be needed because $this->getContent()
* may already return null when the page proper was deleted.
- * @param RevisionRecord|Revision|null $revision The current page revision at the time of
+ * @param Revision|null $revision The current page revision at the time of
* deletion, used when determining the required updates. This may be needed because
* $this->getRevision() may already return null when the page proper was deleted.
* @param User|null $user The user that caused the deletion
*/
public function updateCategoryCounts( array $added, array $deleted, $id = 0 ) {
$id = $id ?: $this->getId();
- $type = MWNamespace::getCategoryLinkType( $this->getTitle()->getNamespace() );
+ $type = MediaWikiServices::getInstance()->getNamespaceInfo()->
+ getCategoryLinkType( $this->getTitle()->getNamespace() );
$addFields = [ 'cat_pages = cat_pages + 1' ];
$removeFields = [ 'cat_pages = cat_pages - 1' ];