Code Duplication    Length = 3-6 lines in 3 locations

classes/PodsAPI.php 2 locations

@@ 1734-1739 (lines=6) @@
1731
            if ( 'pod' == $pod[ 'type' ] )
1732
                $pod[ 'type' ] = 'post_type';
1733
1734
            if ( 'table' == $pod[ 'storage' ] ) {
1735
                if ( 'taxonomy' == $pod[ 'type' ] && ! function_exists( 'get_term_meta' ) )
1736
                    $pod[ 'storage' ] = 'none';
1737
                else
1738
                    $pod[ 'storage' ] = 'meta';
1739
            }
1740
        }
1741
1742
        $pod[ 'options' ][ 'type' ] = $pod[ 'type' ];
@@ 5460-5462 (lines=3) @@
5457
            $pod = array_merge( $this->get_table_info( $pod[ 'type' ], $pod[ 'object' ], $pod[ 'name' ], $pod ), $pod );
5458
5459
        // Override old 'none' storage type
5460
        if ( 'taxonomy' == $pod['type'] && 'none' == $pod['storage'] && function_exists( 'get_term_meta' ) ) {
5461
            $pod[ 'storage' ] = 'meta';
5462
        }
5463
5464
        if ( isset( $pod[ 'pod' ] ) )
5465
            unset( $pod[ 'pod' ] );

classes/PodsData.php 1 location

@@ 2709-2711 (lines=3) @@
2706
                    );
2707
2708
                    $pod_data = array_merge( $this->api->get_table_info( $traverse_recurse[ 'pod' ], '' ), $pod_data );
2709
                } elseif ( 'taxonomy' == $pod_data['type'] && 'none' == $pod_data['storage'] && function_exists( 'get_term_meta' ) ) {
2710
                    $pod_data['storage'] = 'meta';
2711
                }
2712
2713
                $traverse_recurse[ 'pod' ] = $pod_data[ 'name' ];
2714
            }