Code Duplication    Length = 4-4 lines in 2 locations

includes/rest-api/CMB2_REST.php 2 locations

@@ 157-160 (lines=4) @@
154
		foreach ( self::$boxes as $cmb_id => $rest_box ) {
155
			$types = array_flip( $rest_box->cmb->box_types() );
156
157
			if ( isset( $types['user'] ) ) {
158
				unset( $types['user'] );
159
				self::$type_boxes['user'][ $cmb_id ] = $cmb_id;
160
			}
161
162
			if ( isset( $types['comment'] ) ) {
163
				unset( $types['comment'] );
@@ 162-165 (lines=4) @@
159
				self::$type_boxes['user'][ $cmb_id ] = $cmb_id;
160
			}
161
162
			if ( isset( $types['comment'] ) ) {
163
				unset( $types['comment'] );
164
				self::$type_boxes['comment'][ $cmb_id ] = $cmb_id;
165
			}
166
167
			if ( isset( $types['term'] ) ) {
168
				unset( $types['term'] );