Code Duplication    Length = 4-4 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2541-2544 (lines=4) @@
2538
        }
2539
        else {
2540
            if ( in_array( $field[ 'name' ], array( 'id', 'ID' ) ) ) {
2541
                if ( null !== $old_name )
2542
                    return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2543
                else
2544
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2545
            }
2546
2547
            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 ) )
@@ 2557-2560 (lines=4) @@
2554
                if ( $object_field != $field[ 'name' ] && !in_array( $field[ 'name' ], $object_field_opt[ 'alias' ] ) )
2555
                    continue;
2556
2557
                if ( null !== $old_name )
2558
                    return pods_error( sprintf( __( '%s is reserved for internal WordPress or Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2559
                else
2560
                    return pods_error( sprintf( __( '%s is not editable', 'pods' ), $field[ 'name' ] ), $this );
2561
            }
2562
2563
            $post_data = array(