Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

@@ 920-931 (lines=12) @@
917
     * @return mixed|void
918
     * @since 2.0
919
     */
920
    public static function regex( $type, $options ) {
921
        self::field_loader( $type );
922
923
        $regex = false;
924
925
        if ( method_exists( self::$loaded[ $type ], 'regex' ) )
926
            $regex = self::$loaded[ $type ]->regex( $options );
927
928
        $regex = apply_filters( 'pods_field_' . $type . '_regex', $regex, $options, $type );
929
930
        return $regex;
931
    }
932
933
    /**
934
     * Setup value preparation for sprintf
@@ 944-955 (lines=12) @@
941
     * @return mixed|void
942
     * @since 2.0
943
     */
944
    public static function prepare( $type, $options ) {
945
        self::field_loader( $type );
946
947
        $prepare = '%s';
948
949
        if ( method_exists( self::$loaded[ $type ], 'prepare' ) )
950
            $prepare = self::$loaded[ $type ]->prepare( $options );
951
952
        $prepare = apply_filters( 'pods_field_' . $type . '_prepare', $prepare, $options, $type );
953
954
        return $prepare;
955
    }
956
957
    /**
958
     * Validate a value before it's saved