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

@@ 1420-1424 (lines=5) @@
1417
	 */
1418
	public function data( $name, $value = null, $options = null, $pod = null, $id = null, $in_form = true ) {
1419
1420
		if ( isset( $options['options'] ) ) {
1421
			$options = array_merge( $options, $options['options'] );
1422
1423
			unset( $options['options'] );
1424
		}
1425
1426
		$data = pods_v( 'data', $options, null, true );
1427
@@ 1468-1472 (lines=5) @@
1465
	public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
1466
1467
		if ( in_array( pods_v( self::$type . '_object', $options ), self::simple_objects(), true ) ) {
1468
			if ( isset( $options['options'] ) ) {
1469
				$options = array_merge( $options, $options['options'] );
1470
1471
				unset( $options['options'] );
1472
			}
1473
1474
			if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
1475
				$simple = @json_decode( $value, true );
@@ 1565-1569 (lines=5) @@
1562
	 */
1563
	public function value_to_label( $name, $value = null, $options = null, $pod = null, $id = null ) {
1564
1565
		if ( isset( $options['options'] ) ) {
1566
			$options = array_merge( $options, $options['options'] );
1567
1568
			unset( $options['options'] );
1569
		}
1570
1571
		$data = pods_v( 'data', $options, null, true );
1572
@@ 1705-1709 (lines=5) @@
1702
		$page        = min( 1, (int) $object_params['page'] );
1703
		$limit       = (int) $object_params['limit'];
1704
1705
		if ( isset( $options['options'] ) ) {
1706
			$options = array_merge( $options, $options['options'] );
1707
1708
			unset( $options['options'] );
1709
		}
1710
1711
		$data  = apply_filters( 'pods_field_pick_object_data', null, $name, $value, $options, $pod, $id, $object_params );
1712
		$items = array();