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
|
@ -7,22 +7,14 @@ use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
|
|||
|
||||
class SettingsRepository extends EloquentRepository implements SettingsRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private static $cache = [];
|
||||
private static array $cache = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private static $databaseMiss = [];
|
||||
private static array $databaseMiss = [];
|
||||
|
||||
/**
|
||||
* Return the model backing this repository.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function model()
|
||||
public function model(): string
|
||||
{
|
||||
return Setting::class;
|
||||
}
|
||||
|
@ -31,7 +23,6 @@ class SettingsRepository extends EloquentRepository implements SettingsRepositor
|
|||
* Store a new persistent setting in the database.
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function set(string $key, string $value = null)
|
||||
{
|
||||
|
@ -44,12 +35,8 @@ class SettingsRepository extends EloquentRepository implements SettingsRepositor
|
|||
|
||||
/**
|
||||
* Retrieve a persistent setting from the database.
|
||||
*
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $key, $default = null)
|
||||
public function get(string $key, mixed $default = null): mixed
|
||||
{
|
||||
// If item has already been requested return it from the cache. If
|
||||
// we already know it is missing, immediately return the default value.
|
||||
|
|
Reference in a new issue