Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

@@ 1003-1014 (lines=12) @@
1000
     * @return mixed|void
1001
     * @since 2.0
1002
     */
1003
    public static function regex( $type, $options ) {
1004
        self::field_loader( $type );
1005
1006
        $regex = false;
1007
1008
        if ( method_exists( self::$loaded[ $type ], 'regex' ) )
1009
            $regex = self::$loaded[ $type ]->regex( $options );
1010
1011
        $regex = apply_filters( 'pods_field_' . $type . '_regex', $regex, $options, $type );
1012
1013
        return $regex;
1014
    }
1015
1016
    /**
1017
     * Setup value preparation for sprintf
@@ 1027-1038 (lines=12) @@
1024
     * @return mixed|void
1025
     * @since 2.0
1026
     */
1027
    public static function prepare( $type, $options ) {
1028
        self::field_loader( $type );
1029
1030
        $prepare = '%s';
1031
1032
        if ( method_exists( self::$loaded[ $type ], 'prepare' ) )
1033
            $prepare = self::$loaded[ $type ]->prepare( $options );
1034
1035
        $prepare = apply_filters( 'pods_field_' . $type . '_prepare', $prepare, $options, $type );
1036
1037
        return $prepare;
1038
    }
1039
1040
    /**
1041
     * Validate a value before it's saved