Code Duplication    Length = 2-2 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2478-2479 (lines=2) @@
2475
            if ( $table_operation && 'author' == $field[ 'name' ] && 'pick' != $field[ 'type' ] && ( !defined( 'PODS_FIELD_STRICT' ) || PODS_FIELD_STRICT ) )
2476
                return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2477
2478
            if ( in_array( $field[ 'name' ], array( 'id', 'ID' ) ) )
2479
                return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2480
2481
            foreach ( $object_fields as $object_field => $object_field_opt ) {
2482
                if ( $object_field == $field[ 'name' ] || in_array( $field[ 'name' ], $object_field_opt[ 'alias' ] ) )
@@ 2490-2491 (lines=2) @@
2487
                $field[ 'name' ] .= '2';
2488
2489
            if ( 'slug' == $field[ 'type' ] && true === $db ) {
2490
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy', 'user' ) ) )
2491
                    return pods_error( __( 'This pod already has an internal WordPress permalink field', 'pods' ), $this );
2492
2493
                $slug_field = get_posts( array(
2494
                    'post_type' => '_pods_field',