Issues (65)

src/helpers.php (1 issue)

1
<?php
2
3
if (! function_exists('config_path')) {
4
    function config_path(string $path = ''): string
5
    {
6
        return app()->basePath() . '/config' . ($path ? "/{$path}" : $path);
7
    }
8
}
9
10
if (! function_exists('module_path')) {
11
    function module_path(string $name): string
12
    {
13
        /** @var \Rawilk\LaravelModules\Module $module */
14
        $module = app('modules')->find($name);
0 ignored issues
show
The method find() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

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

14
        $module = app('modules')->/** @scrutinizer ignore-call */ find($name);

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.

Loading history...
15
16
        return $module->getPath();
17
    }
18
}
19
20
if (! function_exists('public_path')) {
21
    function public_path(string $path = ''): string
22
    {
23
        return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);
24
    }
25
}
26