Skip to content

Commit 75164bd

Browse files
committed
Fix access to private static properties
Using late static binding to access private properties is wrong, as child classes are not allowed to access them.
1 parent 6c8dc49 commit 75164bd

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)