refactor(admin/middleware): update request type to app\Request

Change the type of the request parameter in middleware handle functions to use
app\Request instead of the plain $request. This update clarifies the expected
request object type for better type checking and autocompletion support.
This commit is contained in:
wolfcode
2024-09-14 17:33:07 +08:00
parent ef40aa27b7
commit 84f0bdcc77
4 changed files with 8 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
namespace app\admin\middleware;
use app\common\traits\JumpTrait;
use app\Request;
use Closure;
use ReflectionClass;
use ReflectionException;
@@ -14,7 +15,7 @@ class CheckLogin
/**
* @throws ReflectionException
*/
public function handle($request, Closure $next)
public function handle(Request $request, Closure $next)
{
$controller = $request->controller();
if (empty($controller)) return $next($request);