Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored and github-actions[bot] committed Apr 21, 2023
1 parent ca4f1d4 commit 6f09751
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Managers/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function subscribe(Channel $channel, Connection $connection, $data = []):
{
$this->mutex(function () use ($channel, $connection, $data) {
$connections = $this->connectionKeys($channel)
->put($connection->identifier(), $data);
->put($connection->identifier(), $data);

$this->syncConnections($channel, $connections);
});
Expand Down
12 changes: 6 additions & 6 deletions src/Servers/ApiGateway/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ protected static function getQueryString(array $event): string
if (isset($event['version']) && $event['version'] === '2.0') {
return http_build_query(
collect($event['queryStringParameters'] ?? [])
->mapWithKeys(function ($value, $key) {
$values = explode(',', $value);
->mapWithKeys(function ($value, $key) {
$values = explode(',', $value);

return count($values) === 1
? [$key => $values[0]]
: [(substr($key, -2) == '[]' ? substr($key, 0, -2) : $key) => $values];
})->all()
return count($values) === 1
? [$key => $values[0]]
: [(substr($key, -2) == '[]' ? substr($key, 0, -2) : $key) => $values];
})->all()
);
}

Expand Down
16 changes: 8 additions & 8 deletions src/Servers/ApiGateway/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public function handle(Request $request): void
protected function connect(Request $request): Connection
{
return $this->connections
->for($application = $this->application($request))
->resolve(
->for($application = $this->application($request))
->resolve(
$request->connectionId(),
fn () => new Connection(
$request->connectionId(),
fn () => new Connection(
$request->connectionId(),
$application,
$request->headers['origin'] ?? null
)
);
$application,
$request->headers['origin'] ?? null
)
);
}

/**
Expand Down
18 changes: 9 additions & 9 deletions src/Servers/Ratchet/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ protected function connection(ConnectionInterface $connection): Connection
$application = $this->application($connection);

return $this->connections
->for($application)
->resolve(
$connection->resourceId,
fn () => new Connection(
$connection,
$application,
$connection->httpRequest->getHeader('Origin')[0] ?? null
)
);
->for($application)
->resolve(
$connection->resourceId,
fn () => new Connection(
$connection,
$application,
$connection->httpRequest->getHeader('Origin')[0] ?? null
)
);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Jobs/PruneStaleConnectionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
$connection->setHasBeenPinged();

$this->channelManager->shouldReceive('unsubscribeFromAll')
->once()
->with($connection);
->once()
->with($connection);
});

(new PruneStaleConnections)->handle(
Expand Down

0 comments on commit 6f09751

Please sign in to comment.