Code Duplication    Length = 5-5 lines in 6 locations

components/Migrate-Packages/Migrate-Packages.php 2 locations

@@ 657-661 (lines=5) @@
654
			}
655
656
			foreach ( $export['pods'] as &$pod ) {
657
				if ( isset( $pod['options'] ) ) {
658
					$pod = array_merge( $pod, $pod['options'] );
659
660
					unset( $pod['options'] );
661
				}
662
663
				foreach ( $pod as $option => $option_value ) {
664
					if ( in_array( $option, $options_ignore ) || null === $option_value ) {
@@ 671-675 (lines=5) @@
668
669
				if ( ! empty( $pod['fields'] ) ) {
670
					foreach ( $pod['fields'] as &$field ) {
671
						if ( isset( $field['options'] ) ) {
672
							$field = array_merge( $field, $field['options'] );
673
674
							unset( $field['options'] );
675
						}
676
677
						foreach ( $field as $option => $option_value ) {
678
							if ( in_array( $option, $options_ignore ) || null === $option_value ) {

classes/fields/pick.php 4 locations

@@ 1628-1632 (lines=5) @@
1625
	 */
1626
	public function data( $name, $value = null, $options = null, $pod = null, $id = null, $in_form = true ) {
1627
1628
		if ( isset( $options['options'] ) ) {
1629
			$options = array_merge( $options, $options['options'] );
1630
1631
			unset( $options['options'] );
1632
		}
1633
1634
		$data = pods_v( 'data', $options, null, true );
1635
@@ 1682-1686 (lines=5) @@
1679
	public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
1680
1681
		if ( in_array( pods_v( static::$type . '_object', $options ), self::simple_objects(), true ) ) {
1682
			if ( isset( $options['options'] ) ) {
1683
				$options = array_merge( $options, $options['options'] );
1684
1685
				unset( $options['options'] );
1686
			}
1687
1688
			if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
1689
				$simple = @json_decode( $value, true );
@@ 1785-1789 (lines=5) @@
1782
	 */
1783
	public function value_to_label( $name, $value = null, $options = null, $pod = null, $id = null ) {
1784
1785
		if ( isset( $options['options'] ) ) {
1786
			$options = array_merge( $options, $options['options'] );
1787
1788
			unset( $options['options'] );
1789
		}
1790
1791
		$data = pods_v( 'data', $options, null, true );
1792
@@ 1942-1946 (lines=5) @@
1939
		$limit        = (int) $object_params['limit'];
1940
		$autocomplete = false;
1941
1942
		if ( isset( $options['options'] ) ) {
1943
			$options = array_merge( $options, $options['options'] );
1944
1945
			unset( $options['options'] );
1946
		}
1947
1948
		$data  = apply_filters( 'pods_field_pick_object_data', null, $name, $value, $options, $pod, $id, $object_params );
1949
		$items = array();