The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
4
{
5
$value = '';
6
if (is_array($array) && array_key_exists($key, $array)) {
7
$value = $array[$key];
8
}
9
10
return $value;
11
}
12
13
function mime($type)
14
{
15
if ($type == 'jpg' ||
16
$type == 'png' ||
17
$type == 'jpeg' ||
18
$type == 'gif' ||
19
$type == 'image/jpeg' ||
20
$type == 'image/jpg' ||
21
$type == 'image/gif' ||
22
$type == 'image/png' ||
23
starts_with($type, 'image')) {
24
return 'image';
25
}
26
}
27
28
function isInstall()
29
{
30
$check = false;
31
$env = base_path('.env');
32
if (\File::exists($env) && env('DB_INSTALL') == 1) {
Avoid variables with short names like $tz. Configured minimum length is 3.
Short variable names may make your code harder to understand. Variable names should
be self-descriptive. This check looks for variable names who are shorter than
a configured minimum.
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.