Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_REST_Controller.php 2 locations

@@ 253-259 (lines=7) @@
250
	 *
251
	 * @return void
252
	 */
253
	protected function initiate_rest_read_box( $request, $request_type ) {
254
		$this->initiate_rest_box( $request, $request_type );
255
256
		if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_read ) {
257
			$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have read permissions.', 'cmb2' ) );
258
		}
259
	}
260
261
	/**
262
	 * Initiates the request property and the rest_box property if box is writeable.
@@ 271-277 (lines=7) @@
268
	 *
269
	 * @return void
270
	 */
271
	protected function initiate_rest_write_box( $request, $request_type ) {
272
		$this->initiate_rest_box( $request, $request_type );
273
274
		if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_write ) {
275
			$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have write permissions.', 'cmb2' ) );
276
		}
277
	}
278
279
	/**
280
	 * Initiates the request property and the rest_box property.