Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

@@ 982-993 (lines=12) @@
979
     * @return mixed|void
980
     * @since 2.0
981
     */
982
    public static function regex( $type, $options ) {
983
        self::field_loader( $type );
984
985
        $regex = false;
986
987
        if ( method_exists( self::$loaded[ $type ], 'regex' ) )
988
            $regex = self::$loaded[ $type ]->regex( $options );
989
990
        $regex = apply_filters( 'pods_field_' . $type . '_regex', $regex, $options, $type );
991
992
        return $regex;
993
    }
994
995
    /**
996
     * Setup value preparation for sprintf
@@ 1006-1017 (lines=12) @@
1003
     * @return mixed|void
1004
     * @since 2.0
1005
     */
1006
    public static function prepare( $type, $options ) {
1007
        self::field_loader( $type );
1008
1009
        $prepare = '%s';
1010
1011
        if ( method_exists( self::$loaded[ $type ], 'prepare' ) )
1012
            $prepare = self::$loaded[ $type ]->prepare( $options );
1013
1014
        $prepare = apply_filters( 'pods_field_' . $type . '_prepare', $prepare, $options, $type );
1015
1016
        return $prepare;
1017
    }
1018
1019
    /**
1020
     * Validate a value before it's saved