Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

@@ 991-1002 (lines=12) @@
988
     * @return mixed|void
989
     * @since 2.0
990
     */
991
    public static function regex( $type, $options ) {
992
        self::field_loader( $type );
993
994
        $regex = false;
995
996
        if ( method_exists( self::$loaded[ $type ], 'regex' ) )
997
            $regex = self::$loaded[ $type ]->regex( $options );
998
999
        $regex = apply_filters( 'pods_field_' . $type . '_regex', $regex, $options, $type );
1000
1001
        return $regex;
1002
    }
1003
1004
    /**
1005
     * Setup value preparation for sprintf
@@ 1015-1026 (lines=12) @@
1012
     * @return mixed|void
1013
     * @since 2.0
1014
     */
1015
    public static function prepare( $type, $options ) {
1016
        self::field_loader( $type );
1017
1018
        $prepare = '%s';
1019
1020
        if ( method_exists( self::$loaded[ $type ], 'prepare' ) )
1021
            $prepare = self::$loaded[ $type ]->prepare( $options );
1022
1023
        $prepare = apply_filters( 'pods_field_' . $type . '_prepare', $prepare, $options, $type );
1024
1025
        return $prepare;
1026
    }
1027
1028
    /**
1029
     * Validate a value before it's saved