Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Feb 8, 2024
1 parent 5369883 commit 80e6561
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
- 8.2
- 8.1
- 8.0
- 7.4
redis:
- "7"
- "6"
Expand Down
2 changes: 1 addition & 1 deletion src/ApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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
Expand All @@ -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])) {
Expand All @@ -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
Expand Down

0 comments on commit 80e6561

Please sign in to comment.