From: addshore Date: Fri, 26 Jun 2015 14:47:58 +0000 (+0200) Subject: Add more return types to Database class X-Git-Tag: 1.31.0-rc.0~10966^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=c5a65358cac1d8324d1e36cf9e7a68e117a49078;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {