Code Duplication    Length = 12-12 lines in 2 locations

classes/PodsForm.php 2 locations

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