refactor(actions): standardize method naming for network and configuration deletion across application and service classes

This commit is contained in:
Andras Bacsai committed 2025-04-30 18:30:43 +02:00
1 parent ed0961e0dc
commit 019ed43448
24 files changed
+123 -117

No files matched your search

+6 -9
View File
@@ -13,27 +13,24 @@ class ServiceStatusChanged implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public ?string $userId = null;
public int|string|null $userId = null;
public function __construct($userId = null)
{
if (is_null($userId)) {
$userId = Auth::id() ?? null;
}
if (is_null($userId)) {
return false;
}
$this->userId = $userId;
}
public function broadcastOn(): ?array
{
if (! is_null($this->userId)) {
return [
new PrivateChannel("user.{$this->userId}"),
];
if (is_null($this->userId)) {
return [];
}
return null;
return [
new PrivateChannel("user.{$this->userId}"),
];
}
}