Skip to content

Commit 19ccef2

Browse files
authored
Merge pull request #137 from stof/private_static
Fix access to private static properties
2 parents 8d21d0b + 75164bd commit 19ccef2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Discovery/ConfiguredClientsStrategy.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ class ConfiguredClientsStrategy implements DiscoveryStrategy, EventSubscriberInt
3535
*/
3636
public function __construct(HttpClient $httpClient = null, HttpAsyncClient $asyncClient = null)
3737
{
38-
static::$client = $httpClient;
39-
static::$asyncClient = $asyncClient;
38+
self::$client = $httpClient;
39+
self::$asyncClient = $asyncClient;
4040
}
4141

4242
/**
4343
* {@inheritdoc}
4444
*/
4545
public static function getCandidates($type)
4646
{
47-
if ($type === HttpClient::class && static::$client !== null) {
47+
if ($type === HttpClient::class && self::$client !== null) {
4848
return [['class' => function () {
49-
return static::$client;
49+
return self::$client;
5050
}]];
5151
}
5252

53-
if ($type === HttpAsyncClient::class && static::$asyncClient !== null) {
53+
if ($type === HttpAsyncClient::class && self::$asyncClient !== null) {
5454
return [['class' => function () {
55-
return static::$asyncClient;
55+
return self::$asyncClient;
5656
}]];
5757
}
5858

0 commit comments

Comments
 (0)