Code Duplication    Length = 4-4 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2553-2556 (lines=4) @@
2550
        }
2551
        else {
2552
            if ( in_array( $field[ 'name' ], array( 'id', 'ID' ) ) ) {
2553
                if ( null !== $old_name )
2554
                    return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2555
                else
2556
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2557
            }
2558
2559
            if ( null !== $old_name && $field[ 'name' ] != $old_name && in_array( $field[ 'name' ], array( 'created', 'modified' ) ) && !in_array( $field[ 'type' ], array( 'date', 'datetime' ) ) && ( !defined( 'PODS_FIELD_STRICT' ) || PODS_FIELD_STRICT ) )
@@ 2569-2572 (lines=4) @@
2566
                if ( $object_field != $field[ 'name' ] && !in_array( $field[ 'name' ], $object_field_opt[ 'alias' ] ) )
2567
                    continue;
2568
2569
                if ( null !== $old_name )
2570
                    return pods_error( sprintf( __( '%s is reserved for internal WordPress or Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2571
                else
2572
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2573
            }
2574
2575
            $post_data = array(