Passed
Push — master ( 641e69...c260d1 )
by Vasyl
02:57
created

var_json_decode_get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
eloc 1
nc 1
nop 3
1
<?php
2
3
if (! function_exists('var_all')) {
4
    function var_all($locale = null)
5
    {
6
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->all();
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

6
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->all();
Loading history...
7
    }
8
}
9
10
if (! function_exists('var_get')) {
11
    function var_get($name, $default = null, $locale = null)
0 ignored issues
show
Best Practice introduced by
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...
12
    {
13
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->first($name, $default);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->first($name, $default);
Loading history...
14
    }
15
}
16
17
if (! function_exists('var_json_decode_get')) {
18
    function var_json_decode_get($name, $asoc = true, $locale = null)
0 ignored issues
show
Best Practice introduced by
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...
19
    {
20
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->firstJsonDecode($name, $asoc);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->firstJsonDecode($name, $asoc);
Loading history...
21
    }
22
}
23
24
if (! function_exists('var_set')) {
25
    function var_set($name, $value = null, $locale = null)
0 ignored issues
show
Best Practice introduced by
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...
26
    {
27
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->set($name, $value, $locale);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->set($name, $value, $locale);
Loading history...
28
    }
29
}
30
31
32
if (! function_exists('var_delete')) {
33
    function var_delete($name, $locale = null)
0 ignored issues
show
Best Practice introduced by
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...
34
    {
35
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->delete($name, $locale);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->delete($name, $locale);
Loading history...
36
    }
37
}
38
39
if (! function_exists('var_set_array')) {
40
    function var_set_array(array $attributes, $locale = null)
0 ignored issues
show
Best Practice introduced by
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...
41
    {
42
        return app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->setArray($attributes);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
        return /** @scrutinizer ignore-call */ app(\Fomvasss\Variable\VariableManagerContract::class)->locale($locale)->setArray($attributes);
Loading history...
43
    }
44
}
45