From 612f6e569011de97589a4744ee66b4e0c4446d88 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 2 Aug 2018 01:57:53 -0700 Subject: [PATCH] Document Parser::$mFirstCall And don't bother checking its value in clearState(), since firstCallInit() will do that anyways. Change-Id: Ibc5e809daa614e99be91d65a363de4f697e6afa5 --- includes/parser/Parser.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.20.1