Skip to content

Commit a8ff834

Browse files
authored
Small syntactic change which makes the code PHP 7.4 compatible (georgeboot#27)
1 parent 826b7da commit a8ff834

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/ConnectionRepository.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44

55
use Aws\ApiGatewayManagementApi\ApiGatewayManagementApiClient;
66
use Aws\ApiGatewayManagementApi\Exception\ApiGatewayManagementApiException;
7-
use GuzzleHttp\Exception\ClientException;
87

98
class ConnectionRepository
109
{
1110
protected ApiGatewayManagementApiClient $apiGatewayManagementApiClient;
11+
protected SubscriptionRepository $subscriptionRepository;
1212

1313
public function __construct(
14-
protected SubscriptionRepository $subscriptionRepository,
14+
SubscriptionRepository $subscriptionRepository,
1515
array $config
1616
) {
17+
$this->subscriptionRepository = $subscriptionRepository;
18+
1719
$this->apiGatewayManagementApiClient = new ApiGatewayManagementApiClient(array_merge($config['connection'], [
1820
'version' => '2018-11-29',
1921
'endpoint' => "https://{$config['api']['id']}.execute-api.{$config['connection']['region']}.amazonaws.com/{$config['api']['stage']}/",

src/Handler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313

1414
class Handler extends WebsocketHandler
1515
{
16+
protected SubscriptionRepository $subscriptionRepository;
17+
protected ConnectionRepository $connectionRepository;
18+
1619
public function __construct(
17-
protected SubscriptionRepository $subscriptionRepository,
18-
protected ConnectionRepository $connectionRepository
20+
SubscriptionRepository $subscriptionRepository,
21+
ConnectionRepository $connectionRepository
1922
) {
2023
$this->subscriptionRepository = $subscriptionRepository;
2124
$this->connectionRepository = $connectionRepository;

0 commit comments

Comments
 (0)