Code Duplication    Length = 7-7 lines in 2 locations

tests/phpunit/tests/rest-api/rest-posts-controller.php 1 location

@@ 3017-3023 (lines=7) @@
3014
        return get_post_meta($object['id'], 'my_custom_int', true);
3015
    }
3016
3017
    public function additional_field_update_callback( $value, $post ) 
3018
    {
3019
        if ('returnError' === $value ) {
3020
            return new WP_Error('rest_invalid_param', 'Testing an error.', array( 'status' => 400 ));
3021
        }
3022
        update_post_meta($post->ID, 'my_custom_int', $value);
3023
    }
3024
3025
    public function tearDown() 
3026
    {

tests/phpunit/tests/rest-api/rest-users-controller.php 1 location

@@ 2248-2254 (lines=7) @@
2245
        return get_user_meta($object['id'], 'my_custom_int', true);
2246
    }
2247
2248
    public function additional_field_update_callback( $value, $user ) 
2249
    {
2250
        if ('returnError' === $value ) {
2251
            return new WP_Error('rest_invalid_param', 'Testing an error.', array( 'status' => 400 ));
2252
        }
2253
        update_user_meta($user->ID, 'my_custom_int', $value);
2254
    }
2255
2256
    public function tearDown() 
2257
    {