Avoid Jenkins' CodeSniffer warnings for Userlogin
authorS Page <spage@wikimedia.org>
Tue, 12 Feb 2013 03:23:37 +0000 (19:23 -0800)
committerS Page <spage@wikimedia.org>
Tue, 12 Feb 2013 03:23:37 +0000 (19:23 -0800)
Change property declarations from "var" to "public". This eliminates the
 46 | ERROR | The var keyword must not be used to declare a property
warnings from Jenkins CI, e.g.
https://integration.mediawiki.org/ci/job/mediawiki-core-phpcs-HEAD/1565/console

http://php.net/manual/en/language.oop5.properties.php says
  "If you declare a property using var instead of one of public,
protected, or private, then PHP 5 will treat the property as if it had
been declared as public."
, so this should be a no-op.

Change-Id: I754ccea018f95421bfe3f7b04e3ab3a6d9b407e3

includes/specials/SpecialUserlogin.php

index 1223713..48dfb19 100644 (file)
@@ -43,12 +43,12 @@ class LoginForm extends SpecialPage {
        const NEED_TOKEN = 12;
        const WRONG_TOKEN = 13;
 
-       var $mUsername, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted;
-       var $mAction, $mCreateaccount, $mCreateaccountMail;
-       var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage;
-       var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS;
-       var $mType, $mReason, $mRealName;
-       var $mAbortLoginErrorMsg = 'login-abort-generic';
+       public $mUsername, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted;
+       public $mAction, $mCreateaccount, $mCreateaccountMail;
+       public $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage;
+       public $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS;
+       public $mType, $mReason, $mRealName;
+       public $mAbortLoginErrorMsg = 'login-abort-generic';
        private $mLoaded = false;
 
        /**