php-cs-fixer

This commit is contained in:
Matthew Penner 2022-11-29 10:53:59 -07:00
parent 16e34af773
commit 3ea6d45cda
No known key found for this signature in database
87 changed files with 151 additions and 256 deletions

View file

@ -3,7 +3,6 @@
namespace Pterodactyl\Models;
use Carbon\Carbon;
use LogicException;
use Illuminate\Support\Facades\Event;
use Pterodactyl\Events\ActivityLogged;
use Illuminate\Database\Eloquent\Builder;
@ -124,7 +123,7 @@ class ActivityLog extends Model
public function prunable()
{
if (is_null(config('activity.prune_days'))) {
throw new LogicException('Cannot prune activity logs: no "prune_days" configuration value is set.');
throw new \LogicException('Cannot prune activity logs: no "prune_days" configuration value is set.');
}
return static::where('timestamp', '<=', Carbon::now()->subDays(config('activity.prune_days')));

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Models\Filters;
use BadMethodCallException;
use Spatie\QueryBuilder\Filters\Filter;
use Illuminate\Database\Eloquent\Builder;
@ -17,7 +16,7 @@ class AdminServerFilter implements Filter
public function __invoke(Builder $query, $value, string $property)
{
if ($query->getQuery()->from !== 'servers') {
throw new BadMethodCallException('Cannot use the AdminServerFilter against a non-server model.');
throw new \BadMethodCallException('Cannot use the AdminServerFilter against a non-server model.');
}
$query
->select('servers.*')

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Models\Filters;
use BadMethodCallException;
use Illuminate\Support\Str;
use Spatie\QueryBuilder\Filters\Filter;
use Illuminate\Database\Eloquent\Builder;
@ -25,7 +24,7 @@ class MultiFieldServerFilter implements Filter
public function __invoke(Builder $query, $value, string $property)
{
if ($query->getQuery()->from !== 'servers') {
throw new BadMethodCallException('Cannot use the MultiFieldServerFilter against a non-server model.');
throw new \BadMethodCallException('Cannot use the MultiFieldServerFilter against a non-server model.');
}
if (preg_match(self::IPV4_REGEX, $value) || preg_match('/^:\d{1,5}$/', $value)) {