Add more return types to Database class
authoraddshore <addshorewiki@gmail.com>
Fri, 26 Jun 2015 14:47:58 +0000 (16:47 +0200)
committeraddshore <addshorewiki@gmail.com>
Fri, 26 Jun 2015 14:47:58 +0000 (16:47 +0200)
We expect these to be implemented and where
implemented we expect them to return these types.

This means when typehinting against Database
(Which is done throughout the code as we dont know
what DB we will eb using) warnings about void return
types will no longer be shown by static analysis stuff

Change-Id: I03d85560d9eb92d6df11dba8bc90339bf41cee8c

includes/db/Database.php

index 94cf1f2..2b8cfe2 100644 (file)
@@ -3829,6 +3829,7 @@ abstract class DatabaseBase implements IDatabase {
         * @param string $prefix Only show tables with this prefix, e.g. mw_
         * @param string $fname Calling function name
         * @throws MWException
+        * @return array
         */
        function listTables( $prefix = null, $fname = __METHOD__ ) {
                throw new MWException( 'DatabaseBase::listTables is not implemented in descendant class' );
@@ -3851,6 +3852,7 @@ abstract class DatabaseBase implements IDatabase {
         * @param string $prefix Only show VIEWs with this prefix, eg. unit_test_
         * @param string $fname Name of calling function
         * @throws MWException
+        * @return array
         * @since 1.22
         */
        public function listViews( $prefix = null, $fname = __METHOD__ ) {
@@ -3862,6 +3864,7 @@ abstract class DatabaseBase implements IDatabase {
         *
         * @param string $name Name of the database-structure to test.
         * @throws MWException
+        * @return bool
         * @since 1.22
         */
        public function isView( $name ) {