Merge "Swap isset by null check in ApiSetNotificationTimestamp/ApiPurge"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 5 Apr 2018 14:06:28 +0000 (14:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 5 Apr 2018 14:06:28 +0000 (14:06 +0000)
includes/api/ApiPurge.php
includes/api/ApiSetNotificationTimestamp.php

index b7cfc2c..bb0be68 100644 (file)
@@ -26,7 +26,7 @@ use MediaWiki\MediaWikiServices;
  * @ingroup API
  */
 class ApiPurge extends ApiBase {
-       private $mPageSet;
+       private $mPageSet = null;
 
        /**
         * Purges the cache of a page
@@ -132,7 +132,7 @@ class ApiPurge extends ApiBase {
         * @return ApiPageSet
         */
        private function getPageSet() {
-               if ( !isset( $this->mPageSet ) ) {
+               if ( $this->mPageSet === null ) {
                        $this->mPageSet = new ApiPageSet( $this );
                }
 
index 5e7a633..f7dc4a7 100644 (file)
@@ -30,7 +30,7 @@ use MediaWiki\MediaWikiServices;
  */
 class ApiSetNotificationTimestamp extends ApiBase {
 
-       private $mPageSet;
+       private $mPageSet = null;
 
        public function execute() {
                $user = $this->getUser();
@@ -187,7 +187,7 @@ class ApiSetNotificationTimestamp extends ApiBase {
         * @return ApiPageSet
         */
        private function getPageSet() {
-               if ( !isset( $this->mPageSet ) ) {
+               if ( $this->mPageSet === null ) {
                        $this->mPageSet = new ApiPageSet( $this );
                }