From: Kunal Mehta Date: Thu, 2 Aug 2018 08:57:53 +0000 (-0700) Subject: Document Parser::$mFirstCall X-Git-Tag: 1.34.0-rc.0~4578^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=612f6e569011de97589a4744ee66b4e0c4446d88;p=lhc%2Fweb%2Fwiklou.git Document Parser::$mFirstCall And don't bother checking its value in clearState(), since firstCallInit() will do that anyways. Change-Id: Ibc5e809daa614e99be91d65a363de4f697e6afa5 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 2778ea6965..bd7d4acdeb 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -153,6 +153,9 @@ class Parser { public $mImageParams = []; public $mImageParamsMagicArray = []; public $mMarkerIndex = 0; + /** + * @var bool Whether firstCallInit still needs to be called + */ public $mFirstCall = true; # Initialised by initialiseVariables() @@ -354,9 +357,7 @@ class Parser { * @private */ public function clearState() { - if ( $this->mFirstCall ) { - $this->firstCallInit(); - } + $this->firstCallInit(); $this->mOutput = new ParserOutput; $this->mOptions->registerWatcher( [ $this->mOutput, 'recordOption' ] ); $this->mAutonumber = 0;