Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

@@ 1009-1020 (lines=12) @@
1006
     * @return mixed|void
1007
     * @since 2.0
1008
     */
1009
    public static function regex( $type, $options ) {
1010
        self::field_loader( $type );
1011
1012
        $regex = false;
1013
1014
        if ( method_exists( self::$loaded[ $type ], 'regex' ) )
1015
            $regex = self::$loaded[ $type ]->regex( $options );
1016
1017
        $regex = apply_filters( 'pods_field_' . $type . '_regex', $regex, $options, $type );
1018
1019
        return $regex;
1020
    }
1021
1022
    /**
1023
     * Setup value preparation for sprintf
@@ 1033-1044 (lines=12) @@
1030
     * @return mixed|void
1031
     * @since 2.0
1032
     */
1033
    public static function prepare( $type, $options ) {
1034
        self::field_loader( $type );
1035
1036
        $prepare = '%s';
1037
1038
        if ( method_exists( self::$loaded[ $type ], 'prepare' ) )
1039
            $prepare = self::$loaded[ $type ]->prepare( $options );
1040
1041
        $prepare = apply_filters( 'pods_field_' . $type . '_prepare', $prepare, $options, $type );
1042
1043
        return $prepare;
1044
    }
1045
1046
    /**
1047
     * Validate a value before it's saved