Upgrade to Laravel 9 (#4413)

Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner 2022-10-14 10:59:20 -06:00 committed by GitHub
parent 95e15d2c8a
commit cbcf62086f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
573 changed files with 4387 additions and 9411 deletions

View file

@ -13,42 +13,26 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class DaemonAuthenticate
{
/**
* @var \Pterodactyl\Repositories\Eloquent\NodeRepository
*/
private $repository;
/**
* @var \Illuminate\Contracts\Encryption\Encrypter
*/
private $encrypter;
/**
* Daemon routes that this middleware should be skipped on.
*
* @var array
*/
protected $except = [
protected array $except = [
'daemon.configuration',
];
/**
* DaemonAuthenticate constructor.
*/
public function __construct(Encrypter $encrypter, NodeRepository $repository)
public function __construct(private Encrypter $encrypter, private NodeRepository $repository)
{
$this->repository = $repository;
$this->encrypter = $encrypter;
}
/**
* Check if a request from the daemon can be properly attributed back to a single node instance.
*
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
*/
public function handle(Request $request, Closure $next)
public function handle(Request $request, Closure $next): mixed
{
if (in_array($request->route()->getName(), $this->except)) {
return $next($request);