php-cs-fixer
This commit is contained in:
parent
16e34af773
commit
3ea6d45cda
87 changed files with 151 additions and 256 deletions
|
@ -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')));
|
||||
|
|
|
@ -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.*')
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue