Completed
Pull Request — master (#4)
by ARCANEDEV
04:06
created

helpers.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
if ( ! function_exists('gravatar')) {
4
    /**
5
     * Get the gravatar instance.
6
     *
7
     * @return Arcanedev\Gravatar\Contracts\Gravatar
8
     */
9
    function gravatar()
10
    {
11
        return app(Arcanedev\Gravatar\Contracts\Gravatar::class);
12
    }
13
}
14
15
if ( ! function_exists('is_val_integer')) {
16
    /**
17
     * Check if value is integer.
18
     *
19
     * @param  mixed  $value
20
     *
21
     * @return bool
22
     */
23
    function is_val_integer($value)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
24
    {
25
        return is_int($value) || ctype_digit($value);
26
    }
27
}
28
29
if ( ! function_exists('is_int_not_between')) {
30
    /**
31
     * Check if an integer is between two values.
32
     *
33
     * @param  int         $needle
34
     * @param  int         $min
35
     * @param  int         $max
36
     *
37
     * @return bool
38
     */
39
    function is_int_not_between($needle, $min, $max)
40
    {
41
        return $needle < $min  || $needle >  $max;
42
    }
43
}
44