Skip to content

Commit c1e4e35

Browse files
committed
Use array key typing instead of @var notation
1 parent 9e3be05 commit c1e4e35

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Collector/PluginClientFactory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ public function __construct(Collector $collector, Formatter $formatter, Stopwatc
4545
/**
4646
* @param ClientInterface|HttpAsyncClient $client
4747
* @param Plugin[] $plugins
48-
* @param array $options {
48+
* @param array{client_name?: string} $options
4949
*
50-
* @type string $client_name to give client a name which may be used when displaying client information like in
50+
* - client_name: to give client a name which may be used when displaying client information like in
5151
* the HTTPlugBundle profiler.
52-
* }
5352
*
5453
* @see PluginClient constructor for PluginClient specific $options.
5554
*
@@ -61,7 +60,7 @@ public function createClient($client, array $plugins = [], array $options = [])
6160
return new ProfilePlugin($plugin, $this->collector, $this->formatter);
6261
}, $plugins);
6362

64-
$clientName = isset($options['client_name']) ? $options['client_name'] : 'Default';
63+
$clientName = $options['client_name'] ?? 'Default';
6564
array_unshift($plugins, new StackPlugin($this->collector, $this->formatter, $clientName));
6665
unset($options['client_name']);
6766

0 commit comments

Comments
 (0)