Completed
Push — master ( 5482c8...c9885e )
by MeWebStudio - Muharrem
08:52
created

helpers.php ➔ captcha_api_check()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
if ( ! function_exists('captcha')) {
4
5
    /**
6
     * @param string $config
7
     * @return mixed
8
     */
9
    function captcha($config = 'default')
10
    {
11
        return app('captcha')->create($config);
12
    }
13
}
14
15
if ( ! function_exists('captcha_src')) {
16
    /**
17
     * @param string $config
18
     * @return string
19
     */
20
    function captcha_src($config = 'default')
21
    {
22
        return app('captcha')->src($config);
23
    }
24
}
25
26
if ( ! function_exists('captcha_img')) {
27
28
    /**
29
     * @param string $config
30
     * @return mixed
31
     */
32
    function captcha_img($config = 'default')
33
    {
34
        return app('captcha')->img($config);
35
    }
36
}
37
38
if ( ! function_exists('captcha_check')) {
39
	/**
40
	 * @param $value
41
	 * @return bool
42
	 */
43
	function captcha_check($value)
44
	{
45
		return app('captcha')->check($value);
46
	}
47
}
48
49
if ( ! function_exists('captcha_api_check')) {
50
	/**
51
	 * @param $value
52
	 * @return bool
53
	 */
54
	function captcha_api_check($value, $key)
55
	{
56
		return app('captcha')->check_api($value, $key);
57
	}
58
}
59