Code Duplication    Length = 4-4 lines in 2 locations

classes/PodsAPI.php 2 locations

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