Code Duplication    Length = 5-5 lines in 6 locations

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

@@ 617-621 (lines=5) @@
614
            }
615
616
            foreach ( $export[ 'pods' ] as &$pod ) {
617
                if ( isset( $pod[ 'options' ] ) ) {
618
                    $pod = array_merge( $pod, $pod[ 'options' ] );
619
620
                    unset( $pod[ 'options' ] );
621
                }
622
623
                foreach ( $pod as $option => $option_value ) {
624
                    if ( in_array( $option, $options_ignore ) || null === $option_value )
@@ 630-634 (lines=5) @@
627
628
                if ( !empty( $pod[ 'fields' ] ) ) {
629
                    foreach ( $pod[ 'fields' ] as &$field ) {
630
                        if ( isset( $field[ 'options' ] ) ) {
631
                            $field = array_merge( $field, $field[ 'options' ] );
632
633
                            unset( $field[ 'options' ] );
634
                        }
635
636
                        foreach ( $field as $option => $option_value ) {
637
                            if ( in_array( $option, $options_ignore ) || null === $option_value )

classes/fields/pick.php 4 locations

@@ 1528-1532 (lines=5) @@
1525
	 */
1526
	public function data( $name, $value = null, $options = null, $pod = null, $id = null, $in_form = true ) {
1527
1528
		if ( isset( $options['options'] ) ) {
1529
			$options = array_merge( $options, $options['options'] );
1530
1531
			unset( $options['options'] );
1532
		}
1533
1534
		$data = pods_v( 'data', $options, null, true );
1535
@@ 1576-1580 (lines=5) @@
1573
	public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
1574
1575
		if ( in_array( pods_v( self::$type . '_object', $options ), self::simple_objects(), true ) ) {
1576
			if ( isset( $options['options'] ) ) {
1577
				$options = array_merge( $options, $options['options'] );
1578
1579
				unset( $options['options'] );
1580
			}
1581
1582
			if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
1583
				$simple = @json_decode( $value, true );
@@ 1673-1677 (lines=5) @@
1670
	 */
1671
	public function value_to_label( $name, $value = null, $options = null, $pod = null, $id = null ) {
1672
1673
		if ( isset( $options['options'] ) ) {
1674
			$options = array_merge( $options, $options['options'] );
1675
1676
			unset( $options['options'] );
1677
		}
1678
1679
		$data = pods_v( 'data', $options, null, true );
1680
@@ 1813-1817 (lines=5) @@
1810
		$page        = min( 1, (int) $object_params['page'] );
1811
		$limit       = (int) $object_params['limit'];
1812
1813
		if ( isset( $options['options'] ) ) {
1814
			$options = array_merge( $options, $options['options'] );
1815
1816
			unset( $options['options'] );
1817
		}
1818
1819
		$data  = apply_filters( 'pods_field_pick_object_data', null, $name, $value, $options, $pod, $id, $object_params );
1820
		$items = array();