@@ -1453,11 +1453,11 @@ private function _escape_identifier_value( $identifier ) {
14531453 * individual arguments.
14541454 * @param mixed ...$args Further variables to substitute into the query's placeholders
14551455 * if being called with individual arguments.
1456- * @return string|void Sanitized query string, if there is a query to prepare.
1456+ * @return string|null Sanitized query string, if there is a query to prepare.
14571457 */
14581458 public function prepare ( $ query , ...$ args ) {
14591459 if ( is_null ( $ query ) ) {
1460- return ;
1460+ return null ;
14611461 }
14621462
14631463 /*
@@ -1666,7 +1666,7 @@ public function prepare( $query, ...$args ) {
16661666 '6.2.0 '
16671667 );
16681668
1669- return ;
1669+ return null ;
16701670 }
16711671
16721672 $ args_count = count ( $ args );
@@ -1684,7 +1684,7 @@ public function prepare( $query, ...$args ) {
16841684 '4.9.0 '
16851685 );
16861686
1687- return ;
1687+ return null ;
16881688 } else {
16891689 /*
16901690 * If we don't have the right number of placeholders,
@@ -1794,7 +1794,7 @@ public function esc_like( $text ) {
17941794 * @global array $EZSQL_ERROR Stores error information of query and error string.
17951795 *
17961796 * @param string $str The error to display.
1797- * @return void |false Void if the showing of errors is enabled, false if disabled.
1797+ * @return null |false Null if the showing of errors is enabled, false if disabled.
17981798 */
17991799 public function print_error ( $ str = '' ) {
18001800 global $ EZSQL_ERROR ;
@@ -1855,6 +1855,8 @@ public function print_error( $str = '' ) {
18551855 $ query
18561856 );
18571857 }
1858+
1859+ return null ;
18581860 }
18591861
18601862 /**
@@ -2117,7 +2119,7 @@ public function parse_db_host( $host ) {
21172119 * @since 3.9.0
21182120 *
21192121 * @param bool $allow_bail Optional. Allows the function to bail. Default true.
2120- * @return bool|void True if the connection is up.
2122+ * @return bool Whether the connection is up. Exits if down and $allow_bail is true .
21212123 */
21222124 public function check_connection ( $ allow_bail = true ) {
21232125 // Check if the connection is alive.
@@ -3056,7 +3058,7 @@ public function get_var( $query = null, $x = 0, $y = 0 ) {
30563058 * correspond to an stdClass object, an associative array, or a numeric array,
30573059 * respectively. Default OBJECT.
30583060 * @param int $y Optional. Row to return. Indexed from 0. Default 0.
3059- * @return array|object|null|void Database query result in format specified by $output or null on failure.
3061+ * @return array|object|null Database query result in format specified by $output or null on failure.
30603062 */
30613063 public function get_row ( $ query = null , $ output = OBJECT , $ y = 0 ) {
30623064 $ this ->func_call = "\$db->get_row( \"$ query \", $ output, $ y) " ;
@@ -3087,6 +3089,7 @@ public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
30873089 } else {
30883090 $ this ->print_error ( ' $db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N ' );
30893091 }
3092+ return null ;
30903093 }
30913094
30923095 /**
@@ -3902,6 +3905,8 @@ public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
39023905 return $ this ->col_info [ $ col_offset ]->{$ info_type };
39033906 }
39043907 }
3908+
3909+ return null ;
39053910 }
39063911
39073912 /**
@@ -3937,7 +3942,7 @@ public function timer_stop() {
39373942 * @param string $message The error message.
39383943 * @param string $error_code Optional. A computer-readable string to identify the error.
39393944 * Default '500'.
3940- * @return void| false Void if the showing of errors is enabled, false if disabled.
3945+ * @return false False if the showing of errors is disabled.
39413946 */
39423947 public function bail ( $ message , $ error_code = '500 ' ) {
39433948 if ( $ this ->show_errors ) {
@@ -3995,7 +4000,7 @@ public function close() {
39954000 * @since 2.5.0
39964001 *
39974002 * @global string $required_mysql_version The minimum required MySQL version string.
3998- * @return void| WP_Error
4003+ * @return WP_Error|null
39994004 */
40004005 public function check_database_version () {
40014006 global $ required_mysql_version ;
@@ -4006,6 +4011,8 @@ public function check_database_version() {
40064011 /* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
40074012 return new WP_Error ( 'database_version ' , sprintf ( __ ( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher ' ), $ wp_version , $ required_mysql_version ) );
40084013 }
4014+
4015+ return null ;
40094016 }
40104017
40114018 /**
0 commit comments