Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 574d83b..f0e0077 100644 (file)
@@ -167,6 +167,7 @@ class ApiMain extends ApiBase {
         * @param IContextSource|WebRequest|null $context If this is an instance of
         *    FauxRequest, errors are thrown and no printing occurs
         * @param bool $enableWrite Should be set to true if the api may modify data
+        * @suppress PhanUndeclaredMethod
         */
        public function __construct( $context = null, $enableWrite = false ) {
                if ( $context === null ) {
@@ -292,7 +293,6 @@ class ApiMain extends ApiBase {
                $this->mEnableWrite = $enableWrite;
 
                $this->mCdnMaxAge = -1; // flag for executeActionWithErrorHandling()
-               $this->mCommit = false;
        }
 
        /**
@@ -1707,7 +1707,7 @@ class ApiMain extends ApiBase {
         * @return string
         */
        protected function encodeRequestLogValue( $s ) {
-               static $table;
+               static $table = [];
                if ( !$table ) {
                        $chars = ';@$!*(),/:';
                        $numChars = strlen( $chars );
@@ -1913,6 +1913,10 @@ class ApiMain extends ApiBase {
                ];
        }
 
+       /**
+        * @inheritDoc
+        * @phan-param array{nolead?:bool,headerlevel?:int,tocnumber?:int[]} $options
+        */
        public function modifyHelp( array &$help, array $options, array &$tocData ) {
                // Wish PHP had an "array_insert_before". Instead, we have to manually
                // reindex the array to get 'permissions' in the right place.