Code Duplication    Length = 4-4 lines in 2 locations

includes/CMB2_REST.php 2 locations

@@ 146-149 (lines=4) @@
143
		foreach ( self::$boxes as $cmb_id => $rest_box ) {
144
			$types = array_flip( $rest_box->cmb->box_types() );
145
146
			if ( isset( $types['user'] ) ) {
147
				unset( $types['user'] );
148
				self::$type_boxes['user'][ $cmb_id ] = $cmb_id;
149
			}
150
151
			if ( isset( $types['comment'] ) ) {
152
				unset( $types['comment'] );
@@ 151-154 (lines=4) @@
148
				self::$type_boxes['user'][ $cmb_id ] = $cmb_id;
149
			}
150
151
			if ( isset( $types['comment'] ) ) {
152
				unset( $types['comment'] );
153
				self::$type_boxes['comment'][ $cmb_id ] = $cmb_id;
154
			}
155
156
			if ( isset( $types['term'] ) ) {
157
				unset( $types['term'] );