X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FDeprecatedGlobal.php;h=d1fda2ebf006dc5d3705c080a47f0d0a6e892f94;hb=68c11363de9ff61acf9c865efed94cc5e3bfc529;hp=4d7b9689872bf6594af8af7d18dd4ac9073a21fb;hpb=5fb8b9619529453f05c243538fce6cf82a559298;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DeprecatedGlobal.php b/includes/DeprecatedGlobal.php index 4d7b968987..d1fda2ebf0 100644 --- a/includes/DeprecatedGlobal.php +++ b/includes/DeprecatedGlobal.php @@ -23,11 +23,10 @@ /** * Class to allow throwing wfDeprecated warnings * when people use globals that we do not want them to. - * (For example like $wgArticle) */ class DeprecatedGlobal extends StubObject { - // The m's are to stay consistent with parent class. + // The m's are to stay consistent with parent class. protected $mRealValue, $mVersion; function __construct( $name, $realValue, $version = false ) { @@ -36,7 +35,11 @@ class DeprecatedGlobal extends StubObject { $this->mVersion = $version; } + // @codingStandardsIgnoreStart + // PSR2.Methods.MethodDeclaration.Underscore + // PSR2.Classes.PropertyDeclaration.ScopeMissing function _newObject() { + /* Put the caller offset for wfDeprecated as 6, as * that gives the function that uses this object, since: * 1 = this function ( _newObject ) @@ -52,4 +55,5 @@ class DeprecatedGlobal extends StubObject { wfDeprecated( '$' . $this->mGlobal, $this->mVersion, false, 6 ); return $this->mRealValue; } + // @codingStandardsIgnoreEnd }