Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -3,7 +3,9 @@
|
|||
namespace Pterodactyl\Transformers\Api\Client;
|
||||
|
||||
use Pterodactyl\Models\Database;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Pterodactyl\Models\Permission;
|
||||
use League\Fractal\Resource\NullResource;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Contracts\Extensions\HashidsInterface;
|
||||
|
||||
|
@ -11,15 +13,9 @@ class DatabaseTransformer extends BaseClientTransformer
|
|||
{
|
||||
protected array $availableIncludes = ['password'];
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
private $encrypter;
|
||||
private Encrypter $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Extensions\HashidsInterface
|
||||
*/
|
||||
private $hashids;
|
||||
private HashidsInterface $hashids;
|
||||
|
||||
/**
|
||||
* Handle dependency injection.
|
||||
|
@ -54,10 +50,8 @@ class DatabaseTransformer extends BaseClientTransformer
|
|||
|
||||
/**
|
||||
* Include the database password in the request.
|
||||
*
|
||||
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
|
||||
*/
|
||||
public function includePassword(Database $database)
|
||||
public function includePassword(Database $database): Item|NullResource
|
||||
{
|
||||
if (!$this->request->user()->can(Permission::ACTION_DATABASE_VIEW_PASSWORD, $database->server)) {
|
||||
return $this->null();
|
||||
|
|
Reference in a new issue