Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

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