From c5a65358cac1d8324d1e36cf9e7a68e117a49078 Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 26 Jun 2015 16:47:58 +0200 Subject: [PATCH 1/1] Add more return types to Database class 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/db/Database.php b/includes/db/Database.php index 94cf1f2c3e..2b8cfe255f 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -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 ) { -- 2.20.1