Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / parser / Preprocessor_DOM.php
index f4e4efa..4ed6b79 100644 (file)
@@ -858,6 +858,9 @@ class PPDStack {
                return $this->accum;
        }
 
+       /**
+        * @return bool|PPDPart
+        */
        public function getCurrentPart() {
                if ( $this->top === false ) {
                        return false;
@@ -878,7 +881,7 @@ class PPDStack {
        }
 
        public function pop() {
-               if ( !count( $this->stack ) ) {
+               if ( $this->stack === [] ) {
                        throw new MWException( __METHOD__ . ': no elements remaining' );
                }
                $temp = array_pop( $this->stack );
@@ -902,7 +905,7 @@ class PPDStack {
         * @return array
         */
        public function getFlags() {
-               if ( !count( $this->stack ) ) {
+               if ( $this->stack === [] ) {
                        return [
                                'findEquals' => false,
                                'findPipe' => false,
@@ -970,6 +973,9 @@ class PPDStackElement {
                $this->parts[] = new $class( $s );
        }
 
+       /**
+        * @return PPDPart
+        */
        public function getCurrentPart() {
                return $this->parts[count( $this->parts ) - 1];
        }