Skip to content

Commit

Permalink
Small syntactic change which makes the code PHP 7.4 compatible (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
leob authored Nov 21, 2022
1 parent 826b7da commit a8ff834
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/ConnectionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

use Aws\ApiGatewayManagementApi\ApiGatewayManagementApiClient;
use Aws\ApiGatewayManagementApi\Exception\ApiGatewayManagementApiException;
use GuzzleHttp\Exception\ClientException;

class ConnectionRepository
{
protected ApiGatewayManagementApiClient $apiGatewayManagementApiClient;
protected SubscriptionRepository $subscriptionRepository;

public function __construct(
protected SubscriptionRepository $subscriptionRepository,
SubscriptionRepository $subscriptionRepository,
array $config
) {
$this->subscriptionRepository = $subscriptionRepository;

$this->apiGatewayManagementApiClient = new ApiGatewayManagementApiClient(array_merge($config['connection'], [
'version' => '2018-11-29',
'endpoint' => "https://{$config['api']['id']}.execute-api.{$config['connection']['region']}.amazonaws.com/{$config['api']['stage']}/",
Expand Down
7 changes: 5 additions & 2 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@

class Handler extends WebsocketHandler
{
protected SubscriptionRepository $subscriptionRepository;
protected ConnectionRepository $connectionRepository;

public function __construct(
protected SubscriptionRepository $subscriptionRepository,
protected ConnectionRepository $connectionRepository
SubscriptionRepository $subscriptionRepository,
ConnectionRepository $connectionRepository
) {
$this->subscriptionRepository = $subscriptionRepository;
$this->connectionRepository = $connectionRepository;
Expand Down

0 comments on commit a8ff834

Please sign in to comment.