Code Duplication    Length = 7-7 lines in 2 locations

includes/rest-api/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_no_read_error', __( 'This box does not have read permissions.', 'cmb2' ), array(
258
				'status' => 403,
259
			) );
260
		}
261
	}
262
@@ 273-279 (lines=7) @@
270
	 *
271
	 * @return void
272
	 */
273
	protected function initiate_rest_edit_box( $request, $request_type ) {
274
		$this->initiate_rest_box( $request, $request_type );
275
276
		if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_edit ) {
277
			$this->rest_box = new WP_Error( 'cmb2_rest_no_write_error', __( 'This box does not have write permissions.', 'cmb2' ), array(
278
				'status' => 403,
279
			) );
280
		}
281
	}
282