Code cleanup for facades
This commit is contained in:
parent
6ffe5730da
commit
92c1c162af
9 changed files with 14 additions and 211 deletions
|
@ -3,22 +3,8 @@
|
|||
namespace Pterodactyl\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Pterodactyl\Services\Activity\ActivityLogService;
|
||||
|
||||
/**
|
||||
* @method static ActivityLogService anonymous()
|
||||
* @method static ActivityLogService event(string $action)
|
||||
* @method static ActivityLogService description(?string $description)
|
||||
* @method static ActivityLogService subject(Model|Model[] $subject)
|
||||
* @method static ActivityLogService actor(Model $actor)
|
||||
* @method static ActivityLogService withRequestMetadata()
|
||||
* @method static ActivityLogService property(string|array $key, mixed $value = null)
|
||||
* @method static \Pterodactyl\Models\ActivityLog log(string $description = null)
|
||||
* @method static ActivityLogService clone()
|
||||
* @method static void reset()
|
||||
* @method static mixed transaction(\Closure $callback)
|
||||
*/
|
||||
class Activity extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor()
|
||||
|
|
|
@ -5,12 +5,6 @@ namespace Pterodactyl\Facades;
|
|||
use Illuminate\Support\Facades\Facade;
|
||||
use Pterodactyl\Services\Activity\AcitvityLogBatchService;
|
||||
|
||||
/**
|
||||
* @method static ?string uuid()
|
||||
* @method static void start()
|
||||
* @method static void end()
|
||||
* @method static mixed transaction(\Closure $callback)
|
||||
*/
|
||||
class LogBatch extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor()
|
||||
|
|
|
@ -5,13 +5,6 @@ namespace Pterodactyl\Facades;
|
|||
use Illuminate\Support\Facades\Facade;
|
||||
use Pterodactyl\Services\Activity\ActivityLogTargetableService;
|
||||
|
||||
/**
|
||||
* @method static void setActor(\Illuminate\Database\Eloquent\Model $actor)
|
||||
* @method static void setSubject(\Illuminate\Database\Eloquent\Model $subject)
|
||||
* @method static \Illuminate\Database\Eloquent\Model|null actor()
|
||||
* @method static \Illuminate\Database\Eloquent\Model|null subject()
|
||||
* @method static void reset()
|
||||
*/
|
||||
class LogTarget extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor()
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Middleware;
|
||||
namespace Pterodactyl\Http\Middleware\Activity;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Facades\LogTarget;
|
||||
|
||||
class AccountActivitySubject
|
||||
class AccountSubject
|
||||
{
|
||||
/**
|
||||
* Sets the actor and default subject for all requests passing through this
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Middleware;
|
||||
namespace Pterodactyl\Http\Middleware\Activity;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Facades\LogTarget;
|
||||
|
||||
class ServerActivitySubject
|
||||
class ServerSubject
|
||||
{
|
||||
/**
|
||||
* Attempts to automatically scope all of the activity log events registered
|
|
@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $key_type
|
||||
* @property string|null $identifier
|
||||
* @property string $identifier
|
||||
* @property string $token
|
||||
* @property array|null $allowed_ips
|
||||
* @property string|null $memo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue