diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 27f112c..b8406a7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,6 @@ jobs: - 8.2 - 8.1 - 8.0 - - 7.4 redis: - "7" - "6" diff --git a/src/ApiService.php b/src/ApiService.php index 17af0dc..dd0e7c9 100644 --- a/src/ApiService.php +++ b/src/ApiService.php @@ -32,7 +32,7 @@ public function __construct() } /** @inheritDoc */ - public static function getConfig(string $key, $default = null) + public static function getConfig(string $key, mixed $default = null): mixed { return Server::getConfig($key, $default); } diff --git a/src/Server.php b/src/Server.php index c8b1cf2..cca0703 100644 --- a/src/Server.php +++ b/src/Server.php @@ -159,7 +159,7 @@ public static function isDebug(): bool /** * @return ServerInterface[]|ServerInterface|null */ - public static function getServices(?string $class = null) + public static function getServices(?string $class = null): array|ServerInterface|null { return $class === null ? self::$_services : (self::$_services[$class] ?? null); } @@ -181,7 +181,7 @@ public static function getServer(): ?Server } /** @inheritDoc */ - public static function getConfig(string $key, $default = null) + public static function getConfig(string $key, mixed $default = null): mixed { return \config( 'plugin.workbunny.webman-push-server.app.push-server.' . $key, $default @@ -204,7 +204,7 @@ public static function getStorage(): \Redis * @param array $data = [ string $appKey, string $channel, string $event, $data, ?string $socketId = null ] * @return void */ - public function publish(array $data) + public function publish(array $data): void { list($appKey, $channel, $event, $data, $socketId) = $data; if (!isset($this->_connections[$appKey][$channel])) { @@ -228,7 +228,7 @@ public function publish(array $data) * @param string|null $socketId * @return void */ - public function publishToClients(string $appKey, string $channel, string $event, $data, ?string $socketId = null) + public function publishToClients(string $appKey, string $channel, string $event, $data, ?string $socketId = null): void { $timerId = Timer::add(0.1, function () use ( &$timerId, $appKey, $channel, $event, $data, $socketId