REST API: Combine array and object cases in WP_REST_Meta_Fields::get_default_for_type() to remove duplicated line.

Add missing description for `$type` parameter.

Props itowhid06, dkarfa.
Fixes #48169.
Built from https://develop.svn.wordpress.org/trunk@46346


git-svn-id: http://core.svn.wordpress.org/trunk@46145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-09-29 22:34:57 +00:00
parent dfcdb40c8f
commit 736403a26e
2 changed files with 2 additions and 3 deletions

View File

@ -563,7 +563,7 @@ abstract class WP_REST_Meta_Fields {
*
* @since 5.3.0
*
* @param string $type
* @param string $type The schema type.
* @return mixed
*/
protected function get_default_for_type( $type ) {
@ -577,7 +577,6 @@ abstract class WP_REST_Meta_Fields {
case 'number':
return 0.0;
case 'array':
return array();
case 'object':
return array();
default:

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-beta1-46345';
$wp_version = '5.3-beta1-46346';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.