1 | <?php |
||||||
2 | |||||||
3 | namespace Ikechukwukalu\Requirepin\Middleware; |
||||||
4 | |||||||
5 | use Closure; |
||||||
6 | use Ikechukwukalu\Requirepin\Facades\PinService; |
||||||
7 | use Ikechukwukalu\Requirepin\Traits\Helpers; |
||||||
8 | use Illuminate\Http\Request; |
||||||
9 | use Illuminate\Support\Facades\Auth; |
||||||
10 | |||||||
11 | class RequirePin |
||||||
12 | { |
||||||
13 | use Helpers; |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
14 | |||||||
15 | public function handle(Request $request, Closure $next) |
||||||
16 | { |
||||||
17 | $pinService = new PinService(); |
||||||
18 | |||||||
19 | if (!Auth::guard(config('requirepin.auth_guard', 'web'))->check()) |
||||||
20 | { |
||||||
21 | return $this->httpResponse( |
||||||
0 ignored issues
–
show
The call to
Ikechukwukalu\Requirepin...uirePin::httpResponse() has too few arguments starting with status .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||||
22 | ...$pinService::pinRequestTerminated($request)); |
||||||
0 ignored issues
–
show
The method
pinRequestTerminated() does not exist on Ikechukwukalu\Requirepin\Facades\PinService . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
23 | } |
||||||
24 | |||||||
25 | if ($request->has(config('requirepin.param', '_uuid')) |
||||||
26 | && $pinService::isArrestedRequestValid($request)) |
||||||
0 ignored issues
–
show
The method
isArrestedRequestValid() does not exist on Ikechukwukalu\Requirepin\Facades\PinService . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
27 | { |
||||||
28 | return $next($request); |
||||||
29 | } |
||||||
30 | |||||||
31 | $pinService::cancelAllOpenArrestedRequests(); |
||||||
0 ignored issues
–
show
The method
cancelAllOpenArrestedRequests() does not exist on Ikechukwukalu\Requirepin\Facades\PinService . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
32 | |||||||
33 | return $pinService::requirePinValidationForRequest($request, |
||||||
0 ignored issues
–
show
The method
requirePinValidationForRequest() does not exist on Ikechukwukalu\Requirepin\Facades\PinService . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
34 | $this->getUserIp($request)); |
||||||
35 | } |
||||||
36 | |||||||
37 | } |
||||||
38 |