Code Duplication    Length = 9-9 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 1459-1467 (lines=9) @@
1456
                if ( pods_tableless() )
1457
                    $pod_params[ 'storage' ] = 'meta';
1458
            }
1459
            elseif ( 'taxonomy' == $pod_params[ 'type' ] ) {
1460
                if ( empty(  $pod_params[ 'name' ] ) )
1461
                    return pods_error( 'Please enter a Name for this Pod', $this );
1462
1463
                $pod_params[ 'storage' ] = $params->create_storage_taxonomy;
1464
1465
                if ( pods_tableless() )
1466
                    $pod_params[ 'storage' ] = ( function_exists( 'get_term_meta' ) ? 'meta' : 'none' );
1467
            }
1468
            elseif ( 'pod' == $pod_params[ 'type' ] ) {
1469
                if ( empty(  $pod_params[ 'name' ] ) )
1470
                    return pods_error( 'Please enter a Name for this Pod', $this );
@@ 1468-1476 (lines=9) @@
1465
                if ( pods_tableless() )
1466
                    $pod_params[ 'storage' ] = ( function_exists( 'get_term_meta' ) ? 'meta' : 'none' );
1467
            }
1468
            elseif ( 'pod' == $pod_params[ 'type' ] ) {
1469
                if ( empty(  $pod_params[ 'name' ] ) )
1470
                    return pods_error( 'Please enter a Name for this Pod', $this );
1471
1472
                if ( pods_tableless() ) {
1473
                    $pod_params[ 'type' ] = 'post_type';
1474
                    $pod_params[ 'storage' ] = 'meta';
1475
                }
1476
            }
1477
            elseif ( 'settings' == $pod_params[ 'type' ] ) {
1478
                $pod_params[ 'name' ] = $params->create_setting_name;
1479
                $pod_params[ 'label' ] = ( !empty( $params->create_label_title ) ? $params->create_label_title : ucwords( str_replace( '_', ' ', $params->create_setting_name ) ) );