Merge "Fix phan errors by improving documentation (#10)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 7 Apr 2019 09:13:15 +0000 (09:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 7 Apr 2019 09:13:15 +0000 (09:13 +0000)
.phan/config.php
includes/libs/rdbms/database/Database.php
includes/parser/Preprocessor_DOM.php

index c250bcd..c754480 100644 (file)
@@ -99,8 +99,6 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
        "PhanTypeComparisonFromArray",
        // approximate error count: 2
        "PhanTypeComparisonToArray",
-       // approximate error count: 7
-       "PhanTypeExpectedObjectPropAccess",
        // approximate error count: 63
        "PhanTypeInvalidDimOffset",
        // approximate error count: 6
index c5ef758..ba97887 100644 (file)
@@ -104,7 +104,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        /** @var callable Deprecation logging callback */
        protected $deprecationLogger;
 
-       /** @var resource|null Database connection */
+       /** @var object|resource|null Database connection */
        protected $conn = null;
        /** @var bool */
        protected $opened = false;
index 3bcd012..4ed6b79 100644 (file)
@@ -858,6 +858,9 @@ class PPDStack {
                return $this->accum;
        }
 
+       /**
+        * @return bool|PPDPart
+        */
        public function getCurrentPart() {
                if ( $this->top === false ) {
                        return false;
@@ -970,6 +973,9 @@ class PPDStackElement {
                $this->parts[] = new $class( $s );
        }
 
+       /**
+        * @return PPDPart
+        */
        public function getCurrentPart() {
                return $this->parts[count( $this->parts ) - 1];
        }