1 | <?php |
||
2 | |||
3 | use Illuminate\Container\Container; |
||
4 | |||
5 | if (!function_exists('app')) { |
||
6 | /** |
||
7 | * Get the available container instance. |
||
8 | * |
||
9 | * @param string $abstract |
||
10 | * @param array $parameters |
||
11 | * @return mixed|Container |
||
12 | */ |
||
13 | function app($abstract = null, array $parameters = []) |
||
14 | { |
||
15 | if (is_null($abstract)) { |
||
16 | return Container::getInstance(); |
||
17 | } |
||
18 | |||
19 | return Container::getInstance()->make($abstract, $parameters); |
||
20 | } |
||
21 | } |
||
22 | |||
23 | if (!function_exists('config')) { |
||
24 | /** |
||
25 | * Get / set the specified configuration value. |
||
26 | * |
||
27 | * If an array is passed as the key, we will assume you want to set an array of values. |
||
28 | * |
||
29 | * @param array|string $key |
||
30 | * @param mixed $default |
||
31 | * @return mixed|\Illuminate\Config\Repository|string |
||
32 | */ |
||
33 | function config($key = null, $default = null) |
||
34 | { |
||
35 | if (is_null($key)) { |
||
36 | return app('config'); |
||
37 | } |
||
38 | |||
39 | if (is_array($key)) { |
||
40 | app('config')->set($key); |
||
41 | |||
42 | return; |
||
43 | } |
||
44 | |||
45 | return app('config')->get($key) ?? $default; |
||
46 | } |
||
47 | } |
||
48 | |||
49 | if (!function_exists('config_path')) { |
||
50 | /** |
||
51 | * Get the configuration path. |
||
52 | * |
||
53 | * @param string $path |
||
54 | * @return string |
||
55 | */ |
||
56 | function config_path($path = '') |
||
57 | { |
||
58 | return app()->make('path.config') . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
||
59 | } |
||
60 | } |
||
61 | |||
62 | if (!function_exists('base_path')) { |
||
63 | /** |
||
64 | * Get the path to the base of the install. |
||
65 | * |
||
66 | * @param string $path |
||
67 | * @return string |
||
68 | */ |
||
69 | function base_path($path = '') |
||
70 | { |
||
71 | return app()->basePath() . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
||
0 ignored issues
–
show
|
|||
72 | } |
||
73 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.