Issues (364)

app/Http/Middleware/InitializeTenancyByDomain.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace App\Http\Middleware;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
8
class InitializeTenancyByDomain
9
{
10
    /**
11
     * Handle an incoming request.
12
     *
13
     * @param  \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse)  $next
14
     * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
15
     */
16
    public function handle(Request $request, Closure $next)
17
    {
18
        if (in_array($request->getHost(), config('tenancy.central_domains'), true)) {
19
            return $next($request);
20
        }
21
22
        return $this->initalizeTenancy($request, $next, $request->getHost());
0 ignored issues
show
The method initalizeTenancy() does not exist on App\Http\Middleware\InitializeTenancyByDomain. ( Ignorable by Annotation )

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

22
        return $this->/** @scrutinizer ignore-call */ initalizeTenancy($request, $next, $request->getHost());

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...
23
    }
24
}
25