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
|
@ -11,49 +11,23 @@ use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
|||
|
||||
class DatabasePasswordService
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Extensions\DynamicDatabaseConnection
|
||||
*/
|
||||
private $dynamic;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
private $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface
|
||||
*/
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* DatabasePasswordService constructor.
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
DatabaseRepositoryInterface $repository,
|
||||
DynamicDatabaseConnection $dynamic,
|
||||
Encrypter $encrypter
|
||||
private ConnectionInterface $connection,
|
||||
private DynamicDatabaseConnection $dynamic,
|
||||
private Encrypter $encrypter,
|
||||
private DatabaseRepositoryInterface $repository
|
||||
) {
|
||||
$this->connection = $connection;
|
||||
$this->dynamic = $dynamic;
|
||||
$this->encrypter = $encrypter;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a password for a given database.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Database|int $database
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function handle(Database $database): string
|
||||
public function handle(Database|int $database): string
|
||||
{
|
||||
$password = Utilities::randomStringWithSpecialCharacters(24);
|
||||
|
||||
|
|
Reference in a new issue