Skip to content

Commit

Permalink
Merge pull request #1056 from spiral/singleton-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 11, 2024
1 parent c8b2c0e commit 702a5ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Bootloader/WebsocketsBootloader.php
Expand Up @@ -11,10 +11,11 @@
use Spiral\Broadcasting\BroadcastInterface;
use Spiral\Broadcasting\Config\BroadcastConfig;
use Spiral\Broadcasting\Middleware\AuthorizationMiddleware;
use Spiral\Core\Attribute\Singleton;
use Spiral\Core\BinderInterface;
use Spiral\Core\Container\SingletonInterface;

final class WebsocketsBootloader extends Bootloader implements SingletonInterface
#[Singleton]
final class WebsocketsBootloader extends Bootloader
{
protected const DEPENDENCIES = [
HttpBootloader::class,
Expand Down
5 changes: 3 additions & 2 deletions src/BroadcastManager.php
Expand Up @@ -5,10 +5,11 @@
namespace Spiral\Broadcasting;

use Spiral\Broadcasting\Config\BroadcastConfig;
use Spiral\Core\Container\SingletonInterface;
use Spiral\Core\Attribute\Singleton;
use Spiral\Core\FactoryInterface;

final class BroadcastManager implements BroadcastManagerInterface, SingletonInterface
#[Singleton]
final class BroadcastManager implements BroadcastManagerInterface
{
/** @var BroadcastInterface[] */
private array $connections = [];
Expand Down

0 comments on commit 702a5ca

Please sign in to comment.