Merge "Make phpcs-strict pass on includes/ (7/7)"
[lhc/web/wiklou.git] / includes / parser / Preprocessor_DOM.php
index 7887447..d15b43a 100644 (file)
  * @ingroup Parser
  */
 class Preprocessor_DOM implements Preprocessor {
-       /** @var Parser */
-       public $parser;
 
-       protected $memoryLimit;
+       /**
+        * @var Parser
+        */
+       var $parser;
+
+       var $memoryLimit;
 
        const CACHE_VERSION = 1;
 
@@ -770,22 +773,16 @@ class Preprocessor_DOM implements Preprocessor {
  * @ingroup Parser
  */
 class PPDStack {
-       /** @var array */
-       public $stack;
-
-       /** @var string */
-       public $rootAccum;
+       var $stack, $rootAccum;
 
-       /** @var bool|PPDStack */
-       public $top;
-
-       /** @var */
-       public $out;
-
-       /** @var string */
-       protected $elementClass = 'PPDStackElement';
+       /**
+        * @var PPDStack
+        */
+       var $top;
+       var $out;
+       var $elementClass = 'PPDStackElement';
 
-       protected static $false = false;
+       static $false = false;
 
        function __construct() {
                $this->stack = array();
@@ -865,26 +862,13 @@ class PPDStack {
  * @ingroup Parser
  */
 class PPDStackElement {
-       /** @var string Opening character (\n for heading) */
-       public $open;
+       var     $open,              // Opening character (\n for heading)
+               $close,             // Matching closing character
+               $count,             // Number of opening characters found (number of "=" for heading)
+               $parts,             // Array of PPDPart objects describing pipe-separated parts.
+               $lineStart;         // True if the open char appeared at the start of the input line. Not set for headings.
 
-       /** @var string Matching closing character */
-       public $close;
-
-       /** @var int Number of opening characters found (number of "=" for heading) */
-       public $count;
-
-       /** @var array PPDPart objects describing pipe-separated parts. */
-       public $parts;
-
-       /**
-        * @var bool True if the open char appeared at the start of the input line.
-        * Not set for headings.
-        */
-       public $lineStart;
-
-       /** @var string */
-       protected $partClass = 'PPDPart';
+       var $partClass = 'PPDPart';
 
        function __construct( $data = array() ) {
                $class = $this->partClass;
@@ -953,8 +937,7 @@ class PPDStackElement {
  * @ingroup Parser
  */
 class PPDPart {
-       /** @var string */
-       public $out;
+       var $out; // Output accumulator string
 
        // Optional member variables:
        //   eqpos        Position of equals sign in output accumulator
@@ -971,29 +954,34 @@ class PPDPart {
  * @ingroup Parser
  */
 class PPFrame_DOM implements PPFrame {
-       /** @var array */
-       public $titleCache;
 
        /**
-        * @var array Hashtable listing templates which are disallowed for expansion
-        *   in this frame, having been encountered previously in parent frames.
+        * @var Preprocessor
         */
-       public $loopCheckHash;
+       var $preprocessor;
 
        /**
-        * @var int Recursion depth of this frame, top = 0.
-        * Note that this is NOT the same as expansion depth in expand()
+        * @var Parser
         */
-       public $depth;
+       var $parser;
 
-       /** @var Preprocessor */
-       protected $preprocessor;
+       /**
+        * @var Title
+        */
+       var $title;
+       var $titleCache;
 
-       /** @var Parser */
-       protected $parser;
+       /**
+        * Hashtable listing templates which are disallowed for expansion in this frame,
+        * having been encountered previously in parent frames.
+        */
+       var $loopCheckHash;
 
-       /** @var Title */
-       protected $title;
+       /**
+        * Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
+        */
+       var $depth;
 
        /**
         * Construct a new preprocessor frame.
@@ -1486,20 +1474,13 @@ class PPFrame_DOM implements PPFrame {
  * @ingroup Parser
  */
 class PPTemplateFrame_DOM extends PPFrame_DOM {
-       /** @var PPFrame_DOM */
-       public $parent;
+       var $numberedArgs, $namedArgs;
 
-       /** @var array */
-       protected $numberedArgs;
-
-       /** @var array */
-       protected $namedArgs;
-
-       /** @var array */
-       protected $numberedExpansionCache;
-
-       /** @var string[] */
-       protected $namedExpansionCache;
+       /**
+        * @var PPFrame_DOM
+        */
+       var $parent;
+       var $numberedExpansionCache, $namedExpansionCache;
 
        /**
         * @param Preprocessor $preprocessor
@@ -1629,7 +1610,7 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
  * @ingroup Parser
  */
 class PPCustomFrame_DOM extends PPFrame_DOM {
-       protected $args;
+       var $args;
 
        function __construct( $preprocessor, $args ) {
                parent::__construct( $preprocessor );
@@ -1675,11 +1656,12 @@ class PPCustomFrame_DOM extends PPFrame_DOM {
  * @ingroup Parser
  */
 class PPNode_DOM implements PPNode {
-       /** @var DOMElement */
-       public $node;
 
-       /** @var DOMXPath */
-       protected $xpath;
+       /**
+        * @var DOMElement
+        */
+       var $node;
+       var $xpath;
 
        function __construct( $node, $xpath = false ) {
                $this->node = $node;