Skip to content

Commit e7256ad

Browse files
Phil Saintydregad
Phil Sainty
authored andcommitted
Clarify/correct the @return documentation for some functions
- Document false instead of bool if the function cannot return true Many other functions document <foo>|false - Correct the @return description for GetCol()
1 parent 3544206 commit e7256ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adodb.inc.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ function GetAll($sql, $inputarr=false) {
21902190
* @param bool $force_array
21912191
* @param bool $first2cols
21922192
*
2193-
* @return array|bool
2193+
* @return array|false
21942194
*/
21952195
public function GetAssoc($sql, $inputarr = false, $force_array = false, $first2cols = false) {
21962196
$rs = $this->Execute($sql, $inputarr);
@@ -2301,10 +2301,10 @@ function CacheGetOne($secs2cache,$sql=false,$inputarr=false) {
23012301
* This is only relevant if the returned string
23022302
* is coming from a CHAR type field.
23032303
*
2304-
* @return array|bool 1D array containing the first row of the query
2304+
* @return array|false 1D array containing each row's first column;
2305+
* false if the statement execution fails.
23052306
*/
23062307
function GetCol($sql, $inputarr = false, $trim = false) {
2307-
23082308
$rs = $this->Execute($sql, $inputarr);
23092309
if ($rs) {
23102310
$rv = array();
@@ -3161,7 +3161,7 @@ function RollbackTrans() {
31613161
* return the databases that the driver can connect to.
31623162
* Some databases will return an empty array.
31633163
*
3164-
* @return array|bool an array of database names.
3164+
* @return array|false an array of database names.
31653165
*/
31663166
function MetaDatabases() {
31673167
global $ADODB_FETCH_MODE;

0 commit comments

Comments
 (0)