Merge "Fix/suppress misc phan errors (#5)"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 5 Apr 2019 23:44:43 +0000 (23:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 5 Apr 2019 23:44:43 +0000 (23:44 +0000)
1  2 
.phan/config.php
includes/libs/rdbms/loadbalancer/ILoadBalancer.php

diff --combined .phan/config.php
@@@ -81,19 -81,33 +81,19 @@@ $cfg['suppress_issue_types'] = array_me
        "PhanCommentParamWithoutRealParam",
        // approximate error count: 2
        "PhanCompatibleNegativeStringOffset",
 -      // approximate error count: 1
 -      "PhanEmptyFQSENInCallable",
 -      // approximate error count: 1
 -      "PhanInvalidCommentForDeclarationType",
 -      // approximate error count: 6
 -      "PhanNonClassMethodCall",
        // approximate error count: 21
        "PhanParamReqAfterOpt",
 -      // approximate error count: 27
 +      // approximate error count: 26
        "PhanParamSignatureMismatch",
        // approximate error count: 4
        "PhanParamSignatureMismatchInternal",
 -      // approximate error count: 1
 -      "PhanParamSignatureRealMismatchTooFewParameters",
 -      // approximate error count: 1
 -      "PhanParamSuspiciousOrder",
        // approximate error count: 127
        "PhanParamTooMany",
        // approximate error count: 2
 -      "PhanParamTooManyCallable",
 -      // approximate error count: 1
 -      "PhanParamTooManyInternal",
 -      // approximate error count: 2
        "PhanPluginDuplicateExpressionBinaryOp",
        // approximate error count: 2
        "PhanTraitParentReference",
 -      // approximate error count: 27
 +      // approximate error count: 26
        "PhanTypeArraySuspicious",
        // approximate error count: 33
        "PhanTypeArraySuspiciousNullable",
        "PhanTypeExpectedObjectOrClassName",
        // approximate error count: 7
        "PhanTypeExpectedObjectPropAccess",
-       // approximate error count: 3
-       "PhanTypeInstantiateAbstract",
        // approximate error count: 62
        "PhanTypeInvalidDimOffset",
        // approximate error count: 10
        "PhanTypeInvalidRightOperandOfIntegerOp",
        // approximate error count: 152
        "PhanTypeMismatchArgument",
 -      // approximate error count: 28
 +      // approximate error count: 27
        "PhanTypeMismatchArgumentInternal",
        // approximate error count: 1
        "PhanTypeMismatchBitwiseBinaryOperands",
        "PhanTypeMismatchDimFetch",
        // approximate error count: 10
        "PhanTypeMismatchForeach",
 -      // approximate error count: 77
 +      // approximate error count: 78
        "PhanTypeMismatchProperty",
-       // approximate error count: 88
+       // approximate error count: 85
        "PhanTypeMismatchReturn",
-       // approximate error count: 43
-       "PhanTypeMissingReturn",
-       // approximate error count: 1
-       "PhanTypeNoAccessiblePropertiesForeach",
-       // approximate error count: 4
-       "PhanTypeNonVarPassByRef",
        // approximate error count: 12
        "PhanTypeObjectUnsetDeclaredProperty",
        // approximate error count: 9
        "PhanUndeclaredConstant",
        // approximate error count: 3
        "PhanUndeclaredInvokeInCallable",
-       // approximate error count: 242
+       // approximate error count: 239
        "PhanUndeclaredMethod",
        // approximate error count: 847
        "PhanUndeclaredProperty",
        "PhanUndeclaredVariableAssignOp",
        // approximate error count: 55
        "PhanUndeclaredVariableDim",
 -      // approximate error count: 4
 +      // approximate error count: 3
        "PhanUnextractableAnnotationElementName",
        // approximate error count: 4
        "PhanUnextractableAnnotationSuffix",
@@@ -291,13 -291,13 +291,13 @@@ interface ILoadBalancer 
         *
         * @see ILoadBalancer::getConnection() for parameter information
         *
 -       * @param int $db Server index or DB_MASTER/DB_REPLICA
 +       * @param int $i Server index or DB_MASTER/DB_REPLICA
         * @param array|string|bool $groups Query group(s), or false for the generic reader
         * @param string|bool $domain Domain ID, or false for the current domain
         * @param int $flags Bitfield of CONN_* class constants (e.g. CONN_TRX_AUTOCOMMIT)
         * @return MaintainableDBConnRef
         */
 -      public function getMaintenanceConnectionRef( $db, $groups = [], $domain = false, $flags = 0 );
 +      public function getMaintenanceConnectionRef( $i, $groups = [], $domain = false, $flags = 0 );
  
        /**
         * Open a connection to the server given by the specified index
         * the aliases can be removed, and then the old X-named indexes dropped.
         *
         * @param string[] $aliases
-        * @return mixed
         * @since 1.31
         */
        public function setIndexAliases( array $aliases );