Merge "API: Fix prop=revisions&rvdiffto= without rvprop=content"
[lhc/web/wiklou.git] / includes / api / ApiQueryRandom.php
index 0d54ffe..07f8a0e 100644 (file)
@@ -33,7 +33,7 @@
 class ApiQueryRandom extends ApiQueryGeneratorBase {
        private $pageIDs;
 
-       public function __construct( $query, $moduleName ) {
+       public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rn' );
        }
 
@@ -46,11 +46,11 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
        }
 
        /**
-        * @param  $randstr
-        * @param  $limit
-        * @param  $namespace
-        * @param $resultPageSet ApiPageSet
-        * @param  $redirect
+        * @param string $randstr
+        * @param int $limit
+        * @param int $namespace
+        * @param ApiPageSet $resultPageSet
+        * @param bool $redirect
         * @return void
         */
        protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) {
@@ -68,7 +68,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
        }
 
        /**
-        * @param $resultPageSet ApiPageSet
+        * @param ApiPageSet $resultPageSet
         * @return int
         */
        protected function runQuery( $resultPageSet = null ) {
@@ -99,7 +99,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
        }
 
        /**
-        * @param $resultPageSet ApiPageSet
+        * @param ApiPageSet $resultPageSet
         * @return void
         */
        public function run( $resultPageSet = null ) {
@@ -185,13 +185,13 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
 
        public function getDescription() {
                return array(
-                       'Get a set of random pages',
+                       'Get a set of random pages.',
                        'NOTE: Pages are listed in a fixed sequence, only the starting point is random.',
                        '      This means that if, for example, "Main Page" is the first random page on',
                        '      your list, "List of fictional monkeys" will *always* be second, "List of',
-                       '      people on stamps of Vanuatu" third, etc',
+                       '      people on stamps of Vanuatu" third, etc.',
                        'NOTE: If the number of pages in the namespace is lower than rnlimit, you will',
-                       '      get fewer pages. You will not get the same page twice'
+                       '      get fewer pages. You will not get the same page twice.'
                );
        }