Skip to content

Commit 94a7c62

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent f8a5e00 commit 94a7c62

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

SimpleClient.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,9 @@ final class SimpleClient
114114
* ]
115115
* ]
116116
*
117-
*
118117
* @param string|array $config
119118
*/
120-
public function __construct($config, LoggerInterface $logger = null)
119+
public function __construct($config, ?LoggerInterface $logger = null)
121120
{
122121
if (is_string($config)) {
123122
$config = [
@@ -134,7 +133,7 @@ public function __construct($config, LoggerInterface $logger = null)
134133
/**
135134
* @param callable|Processor $processor
136135
*/
137-
public function bindTopic(string $topic, $processor, string $processorName = null): void
136+
public function bindTopic(string $topic, $processor, ?string $processorName = null): void
138137
{
139138
if (is_callable($processor)) {
140139
$processor = new CallbackProcessor($processor);
@@ -144,7 +143,7 @@ public function bindTopic(string $topic, $processor, string $processorName = nul
144143
throw new \LogicException('The processor must be either callable or instance of Processor');
145144
}
146145

147-
$processorName = $processorName ?: uniqid(get_class($processor));
146+
$processorName = $processorName ?: uniqid($processor::class);
148147

149148
$this->driver->getRouteCollection()->add(new Route($topic, Route::TOPIC, $processorName));
150149
$this->processorRegistry->add($processorName, $processor);
@@ -153,7 +152,7 @@ public function bindTopic(string $topic, $processor, string $processorName = nul
153152
/**
154153
* @param callable|Processor $processor
155154
*/
156-
public function bindCommand(string $command, $processor, string $processorName = null): void
155+
public function bindCommand(string $command, $processor, ?string $processorName = null): void
157156
{
158157
if (is_callable($processor)) {
159158
$processor = new CallbackProcessor($processor);
@@ -163,7 +162,7 @@ public function bindCommand(string $command, $processor, string $processorName =
163162
throw new \LogicException('The processor must be either callable or instance of Processor');
164163
}
165164

166-
$processorName = $processorName ?: uniqid(get_class($processor));
165+
$processorName = $processorName ?: uniqid($processor::class);
167166

168167
$this->driver->getRouteCollection()->add(new Route($command, Route::COMMAND, $processorName));
169168
$this->processorRegistry->add($processorName, $processor);
@@ -185,7 +184,7 @@ public function sendEvent(string $topic, $message): void
185184
$this->producer->sendEvent($topic, $message);
186185
}
187186

188-
public function consume(ExtensionInterface $runtimeExtension = null): void
187+
public function consume(?ExtensionInterface $runtimeExtension = null): void
189188
{
190189
$this->setupBroker();
191190

Tests/Functional/SimpleClientTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ public function testShouldWorkWithStringDsnConstructorArgument()
8585

8686
/**
8787
* @dataProvider transportConfigDataProvider
88-
*
89-
* @param mixed $config
9088
*/
9189
public function testSendEventWithOneSubscriber($config, string $timeLimit)
9290
{
@@ -125,8 +123,6 @@ public function testSendEventWithOneSubscriber($config, string $timeLimit)
125123

126124
/**
127125
* @dataProvider transportConfigDataProvider
128-
*
129-
* @param mixed $config
130126
*/
131127
public function testSendEventWithTwoSubscriber($config, string $timeLimit)
132128
{
@@ -168,8 +164,6 @@ public function testSendEventWithTwoSubscriber($config, string $timeLimit)
168164

169165
/**
170166
* @dataProvider transportConfigDataProvider
171-
*
172-
* @param mixed $config
173167
*/
174168
public function testSendCommand($config, string $timeLimit)
175169
{

Tests/fix_composer_json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
$composerJson['config']['platform']['ext-amqp'] = '1.9.3';
88

9-
file_put_contents(__DIR__.'/../composer.json', json_encode($composerJson, JSON_PRETTY_PRINT));
9+
file_put_contents(__DIR__.'/../composer.json', json_encode($composerJson, \JSON_PRETTY_PRINT));

0 commit comments

Comments
 (0)