Code Duplication    Length = 8-8 lines in 2 locations

classes/Pods.php 2 locations

@@ 2917-2924 (lines=8) @@
2914
2915
		$fetch = false;
2916
2917
		if ( null === $id ) {
2918
			$fetch = true;
2919
2920
			$id = $pod->id();
2921
		} elseif ( $id != $this->id() ) {
2922
			$pod = pods( $this->pod, $id );
2923
		}
2924
2925
		$this->do_hook( 'add_to', $field, $value, $id );
2926
2927
		if ( ! isset( $this->fields[ $field ] ) ) {
@@ 3034-3041 (lines=8) @@
3031
3032
		$fetch = false;
3033
3034
		if ( null === $id ) {
3035
			$fetch = true;
3036
3037
			$id = $this->id();
3038
		} elseif ( $id != $this->id() ) {
3039
			$pod = pods( $this->pod, $id );
3040
		}
3041
3042
		$this->do_hook( 'remove_from', $field, $value, $id );
3043
3044
		if ( ! isset( $this->fields[ $field ] ) ) {