Use type hinting in ApiBase
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 16 May 2014 15:11:55 +0000 (11:11 -0400)
committerReedy <reedy@wikimedia.org>
Thu, 12 Jun 2014 16:54:41 +0000 (16:54 +0000)
For ideological reasons this was not included in Ie6bf1915.

Change-Id: I5f7119665746eb6fcf86c3a403caa2dcb67904eb

includes/api/ApiBase.php

index b649adf..0313141 100644 (file)
@@ -87,17 +87,19 @@ abstract class ApiBase extends ContextSource {
         */
        const GET_VALUES_FOR_HELP = 1;
 
-       private $mMainModule, $mModuleName, $mModulePrefix;
+       /** @var ApiMain */
+       private $mMainModule;
+       /** @var string */
+       private $mModuleName, $mModulePrefix;
        private $mSlaveDB = null;
        private $mParamCache = array();
 
        /**
-        * Constructor
         * @param ApiMain $mainModule
         * @param string $moduleName Name of this module
         * @param string $modulePrefix Prefix to use for parameter names
         */
-       public function __construct( $mainModule, $moduleName, $modulePrefix = '' ) {
+       public function __construct( ApiMain $mainModule, $moduleName, $modulePrefix = '' ) {
                $this->mMainModule = $mainModule;
                $this->mModuleName = $moduleName;
                $this->mModulePrefix = $modulePrefix;