update fix deadcode, security
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\LogsActivity;
|
||||
use App\View\Components\Module\OsVersion;
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -116,21 +115,6 @@ class Service extends Model
|
||||
return $this->status === 'active';
|
||||
}
|
||||
|
||||
public function isPending(): bool
|
||||
{
|
||||
return $this->status === 'pending';
|
||||
}
|
||||
|
||||
public function canRetryProvisioning(): bool
|
||||
{
|
||||
return $this->isPending() && $this->retry_requested_at === null;
|
||||
}
|
||||
|
||||
public function retryRequested(): bool
|
||||
{
|
||||
return $this->retry_requested_at !== null;
|
||||
}
|
||||
|
||||
public function isExpired(): bool
|
||||
{
|
||||
return $this->expires_at !== null && $this->expires_at->isPast();
|
||||
@@ -148,10 +132,4 @@ class Service extends Model
|
||||
default => ucfirst($this->status),
|
||||
};
|
||||
}
|
||||
|
||||
/** Convenience: get an addon value by type. */
|
||||
public function getAddon(string $type): ?string
|
||||
{
|
||||
return $this->addons->firstWhere('addon_type', $type)?->addon_value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user