Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

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