Skip to content

Commit

Permalink
"return" is a statement
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/MDB/trunk@189830 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
quipo committed Jul 4, 2005
1 parent d19bf0e commit f573340
Show file tree
Hide file tree
Showing 13 changed files with 968 additions and 992 deletions.
24 changes: 12 additions & 12 deletions MDB.php
Expand Up @@ -254,7 +254,7 @@ function &factory($type)

@$db =& new $class_name;

return($db);
return $db;
}

// }}}
Expand Down Expand Up @@ -294,9 +294,9 @@ function &connect($dsn, $options = FALSE)
$class_name = 'MDB_'.$type;
$include = 'MDB/'.$type.'.php';
} else {
return(PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND,
return PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND,
NULL, NULL, 'no RDBMS driver specified',
'MDB_Error', TRUE));
'MDB_Error', TRUE);
}

if(is_array($options)
Expand All @@ -312,7 +312,7 @@ function &connect($dsn, $options = FALSE)
if(!class_exists($class_name)) {
$error = PEAR::raiseError(NULL, MDB_ERROR_NOT_FOUND, NULL, NULL,
'Unable to include the '.$include.' file', 'MDB_Error', TRUE);
return($error);
return $error;
}

@$db =& new $class_name();
Expand All @@ -326,10 +326,10 @@ function &connect($dsn, $options = FALSE)
if (MDB::isError($err)) {
$dsn = $db->getDSN();
$err->addUserInfo($dsn);
return($err);
return $err;
}
}
return($db);
return $db;
}

// }}}
Expand Down Expand Up @@ -425,7 +425,7 @@ function loadFile($file)
*/
function apiVersion()
{
return(1);
return 1;
}

// }}}
Expand Down Expand Up @@ -476,9 +476,9 @@ function isManip($query)
$manips = 'INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|
ALTER|GRANT|REVOKE|LOCK|UNLOCK|ROLLBACK|COMMIT';
if (preg_match('/^\s*"?('.$manips.')\s+/i', $query)) {
return(TRUE);
return TRUE;
}
return(FALSE);
return FALSE;
}

// }}}
Expand Down Expand Up @@ -581,7 +581,7 @@ function errorMessage($value)
function parseDSN($dsn)
{
if (is_array($dsn)) {
return($dsn);
return $dsn;
}

$parsed = array(
Expand Down Expand Up @@ -616,7 +616,7 @@ function parseDSN($dsn)
}

if (empty($dsn)) {
return($parsed);
return $parsed;
}

// Get (if found): username and password
Expand Down Expand Up @@ -691,7 +691,7 @@ function parseDSN($dsn)
}
}

return($parsed);
return $parsed;
}
}

Expand Down

0 comments on commit f573340

Please sign in to comment.