Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_REST_Controller.php 2 locations

@@ 203-209 (lines=7) @@
200
	 *
201
	 * @return void
202
	 */
203
	protected function initiate_rest_read_box( $request, $request_type ) {
204
		$this->initiate_rest_box( $request, $request_type );
205
206
		if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_read ) {
207
			$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have read permissions.', 'cmb2' ) );
208
		}
209
	}
210
211
	/**
212
	 * Initiates the request property and the rest_box property if box is writeable.
@@ 221-227 (lines=7) @@
218
	 *
219
	 * @return void
220
	 */
221
	protected function initiate_rest_write_box( $request, $request_type ) {
222
		$this->initiate_rest_box( $request, $request_type );
223
224
		if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_write ) {
225
			$this->rest_box = new WP_Error( 'cmb2_rest_error', __( 'This box does not have write permissions.', 'cmb2' ) );
226
		}
227
	}
228
229
	/**
230
	 * Initiates the request property and the rest_box property.