MDL-14679 fixing more incorrect return types
This commit is contained in:
@@ -1315,7 +1315,7 @@ abstract class moodle_database {
|
||||
* @param string $return the field we are intered in
|
||||
* @param string $select A fragment of SQL to be used in a where clause in the SQL call.
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_fieldset_select($table, $return, $select, array $params=null) {
|
||||
@@ -1330,7 +1330,7 @@ abstract class moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public abstract function get_fieldset_sql($sql, array $params=null);
|
||||
@@ -1342,7 +1342,7 @@ abstract class moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return mixed true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public abstract function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false);
|
||||
@@ -1356,7 +1356,7 @@ abstract class moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return mixed true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public abstract function insert_record($table, $dataobject, $returnid=true, $bulk=false);
|
||||
|
||||
@@ -715,7 +715,7 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found
|
||||
* @return array of objects, or empty array if no records were found
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
|
||||
@@ -742,7 +742,7 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_fieldset_sql($sql, array $params=null) {
|
||||
@@ -766,7 +766,7 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
@@ -827,7 +827,7 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
|
||||
|
||||
@@ -707,7 +707,7 @@ class mysqli_native_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found
|
||||
* @return array of objects, or empty array if no records were found
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
|
||||
@@ -751,7 +751,7 @@ class mysqli_native_moodle_database extends moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_fieldset_sql($sql, array $params=null) {
|
||||
@@ -779,7 +779,7 @@ class mysqli_native_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
@@ -834,7 +834,7 @@ class mysqli_native_moodle_database extends moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
|
||||
|
||||
@@ -1012,7 +1012,7 @@ class oci_native_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found
|
||||
* @return array of objects, or empty array if no records were found
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
|
||||
@@ -1082,7 +1082,7 @@ class oci_native_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
@@ -1152,7 +1152,7 @@ class oci_native_moodle_database extends moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
|
||||
|
||||
@@ -283,7 +283,7 @@ abstract class pdo_moodle_database extends moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values or false if an error occurred
|
||||
* @return array of values
|
||||
*/
|
||||
public function get_fieldset_sql($sql, array $params=null) {
|
||||
if(!$rs = $this->get_recordset_sql($sql, $params)) {
|
||||
@@ -308,7 +308,7 @@ abstract class pdo_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found, or false if an error occurred.
|
||||
* @return array of objects, or empty array if no records were found, or false if an error occurred.
|
||||
*/
|
||||
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
|
||||
if(!$rs = $this->get_recordset_sql($sql, $params, $limitfrom, $limitnum)) {
|
||||
@@ -334,7 +334,7 @@ abstract class pdo_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
if (!is_array($params)) {
|
||||
@@ -380,7 +380,7 @@ abstract class pdo_moodle_database extends moodle_database {
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
|
||||
$dataobject = (array)$dataobject;
|
||||
|
||||
@@ -647,7 +647,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found
|
||||
* @return array of objects, or empty array if no records were found
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) {
|
||||
@@ -705,7 +705,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_fieldset_sql($sql, array $params=null) {
|
||||
@@ -728,7 +728,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
@@ -791,7 +791,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid=true, $bulk=false) {
|
||||
|
||||
@@ -845,7 +845,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
||||
* @param array $params array of sql parameters
|
||||
* @param int $limitfrom return a subset of records, starting at this point (optional, required if $limitnum is set).
|
||||
* @param int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set).
|
||||
* @return mixed an array of objects, or empty array if no records were found
|
||||
* @return array of objects, or empty array if no records were found
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_records_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) {
|
||||
@@ -873,7 +873,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
||||
*
|
||||
* @param string $sql The SQL query
|
||||
* @param array $params array of sql parameters
|
||||
* @return mixed array of values
|
||||
* @return array of values
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function get_fieldset_sql($sql, array $params = null) {
|
||||
@@ -897,7 +897,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
||||
* @param bool $returnit return it of inserted record
|
||||
* @param bool $bulk true means repeated inserts expected
|
||||
* @param bool $customsequence true if 'id' included in $params, disables $returnid
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record_raw($table, $params, $returnid=true, $bulk=false, $customsequence=false) {
|
||||
@@ -971,7 +971,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
||||
* @param string $table The database table to be inserted into
|
||||
* @param object $data A data object with values for one or more fields in the record
|
||||
* @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
|
||||
* @return true or new id
|
||||
* @return bool|int true or new id
|
||||
* @throws dml_exception if error
|
||||
*/
|
||||
public function insert_record($table, $dataobject, $returnid = true, $bulk = false) {
|
||||
|
||||
Reference in New Issue
Block a user