Skip to content

Commit

Permalink
fix return type of VisitMonitoringMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Jan 10, 2024
1 parent 322b292 commit a55d281
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Middlewares/VisitMonitoringMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\DB;
use Jenssegers\Agent\Agent;

Expand All @@ -13,7 +12,7 @@ class VisitMonitoringMiddleware
/**
* Handle monitor visiting.
*/
public function handle(Request $request, Closure $next): Response
public function handle(Request $request, Closure $next): mixed
{
if (config('user-monitoring.visit_monitoring.turn_on', false) === false) {
return $next($request);
Expand Down Expand Up @@ -45,12 +44,8 @@ public function handle(Request $request, Closure $next): Response

/**
* Check request page are exists in expect pages.
*
* @param string $page
* @param array $exceptPages
* @return bool
*/
private function checkIsExceptPages(string $page, array $exceptPages)
private function checkIsExceptPages(string $page, array $exceptPages): bool
{
return collect($exceptPages)->contains($page);
}
Expand Down

0 comments on commit a55d281

Please sign in to comment.