Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

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