Code Duplication    Length = 4-4 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2532-2535 (lines=4) @@
2529
        }
2530
        else {
2531
            if ( in_array( $field[ 'name' ], array( 'id', 'ID' ) ) ) {
2532
                if ( null !== $old_name )
2533
                    return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2534
                else
2535
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2536
            }
2537
2538
            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 ) )
@@ 2548-2551 (lines=4) @@
2545
                if ( $object_field != $field[ 'name' ] && !in_array( $field[ 'name' ], $object_field_opt[ 'alias' ] ) )
2546
                    continue;
2547
2548
                if ( null !== $old_name )
2549
                    return pods_error( sprintf( __( '%s is reserved for internal WordPress or Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2550
                else
2551
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2552
            }
2553
2554
            $post_data = array(