Skip to content

Commit 07b6a1b

Browse files
committed
Fix Code Style in all files
1 parent 202de9c commit 07b6a1b

26 files changed

+180
-180
lines changed

pkg/amqp-lib/Tests/AmqpProducerTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public function testShouldPublishMessageToTopic()
6161
->expects($this->once())
6262
->method('basic_publish')
6363
->with($this->isInstanceOf(LibAMQPMessage::class), 'topic', 'routing-key')
64-
->will($this->returnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
64+
->willReturnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
6565
$amqpMessage = $message;
66-
}))
66+
})
6767
;
6868

6969
$topic = new AmqpTopic('topic');
@@ -86,9 +86,9 @@ public function testShouldPublishMessageToQueue()
8686
->expects($this->once())
8787
->method('basic_publish')
8888
->with($this->isInstanceOf(LibAMQPMessage::class), $this->isEmpty(), 'queue')
89-
->will($this->returnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
89+
->willReturnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
9090
$amqpMessage = $message;
91-
}))
91+
})
9292
;
9393

9494
$queue = new AmqpQueue('queue');
@@ -107,9 +107,9 @@ public function testShouldSetMessageHeaders()
107107
$channel
108108
->expects($this->once())
109109
->method('basic_publish')
110-
->will($this->returnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
110+
->willReturnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
111111
$amqpMessage = $message;
112-
}))
112+
})
113113
;
114114

115115
$producer = new AmqpProducer($channel, $this->createContextMock());
@@ -126,9 +126,9 @@ public function testShouldSetMessageProperties()
126126
$channel
127127
->expects($this->once())
128128
->method('basic_publish')
129-
->will($this->returnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
129+
->willReturnCallback(function (LibAMQPMessage $message) use (&$amqpMessage) {
130130
$amqpMessage = $message;
131-
}))
131+
})
132132
;
133133

134134
$producer = new AmqpProducer($channel, $this->createContextMock());

pkg/dbal/DbalConsumer.php

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

1414
class DbalConsumer implements Consumer
1515
{
16-
use ConsumerPollingTrait,
17-
DbalConsumerHelperTrait;
16+
use ConsumerPollingTrait;
17+
use DbalConsumerHelperTrait;
1818

1919
/**
2020
* @var DbalContext

pkg/dbal/DbalMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class DbalMessage implements Message
4949
private $timeToLive;
5050

5151
/**
52-
* @var null|string
52+
* @var string|null
5353
*/
5454
private $deliveryId;
5555

pkg/dbal/Tests/DbalConsumerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ public function testShouldDeleteMessageOnAcknowledge()
7979
$context
8080
->expects($this->once())
8181
->method('getDbalConnection')
82-
->will($this->returnValue($dbal))
82+
->willReturn($dbal)
8383
;
8484
$context
8585
->expects($this->once())
8686
->method('getTableName')
87-
->will($this->returnValue('some-table-name'))
87+
->willReturn('some-table-name')
8888
;
8989

9090
$consumer = new DbalConsumer($context, $queue);
@@ -150,12 +150,12 @@ public function testShouldDeleteMessageFromQueueOnReject()
150150
$context
151151
->expects($this->once())
152152
->method('getDbalConnection')
153-
->will($this->returnValue($dbal))
153+
->willReturn($dbal)
154154
;
155155
$context
156156
->expects($this->once())
157157
->method('getTableName')
158-
->will($this->returnValue('some-table-name'))
158+
->willReturn('some-table-name')
159159
;
160160

161161
$consumer = new DbalConsumer($context, $queue);
@@ -182,7 +182,7 @@ public function testRejectShouldReSendMessageToSameQueueOnRequeue()
182182
$context
183183
->expects($this->once())
184184
->method('createProducer')
185-
->will($this->returnValue($producerMock))
185+
->willReturn($producerMock)
186186
;
187187

188188
$consumer = new DbalConsumer($context, $queue);

pkg/dbal/Tests/DbalSubscriptionConsumerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private function createDbalContextMock()
153153
}
154154

155155
/**
156-
* @param null|mixed $queueName
156+
* @param mixed|null $queueName
157157
*
158158
* @return Consumer|\PHPUnit_Framework_MockObject_MockObject
159159
*/

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrineClearIdentityMapExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testShouldClearIdentityMap()
3232
$registry
3333
->expects($this->once())
3434
->method('getManagers')
35-
->will($this->returnValue(['manager-name' => $manager]))
35+
->willReturn(['manager-name' => $manager])
3636
;
3737

3838
$context = $this->createContext();

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public function testShouldNotReconnectIfConnectionIsOK()
2626
$connection
2727
->expects($this->once())
2828
->method('isConnected')
29-
->will($this->returnValue(true))
29+
->willReturn(true)
3030
;
3131
$connection
3232
->expects($this->once())
3333
->method('ping')
34-
->will($this->returnValue(true))
34+
->willReturn(true)
3535
;
3636
$connection
3737
->expects($this->never())
@@ -52,7 +52,7 @@ public function testShouldNotReconnectIfConnectionIsOK()
5252
$registry
5353
->expects($this->once())
5454
->method('getConnections')
55-
->will($this->returnValue([$connection]))
55+
->willReturn([$connection])
5656
;
5757

5858
$extension = new DoctrinePingConnectionExtension($registry);
@@ -65,12 +65,12 @@ public function testShouldDoesReconnectIfConnectionFailed()
6565
$connection
6666
->expects($this->once())
6767
->method('isConnected')
68-
->will($this->returnValue(true))
68+
->willReturn(true)
6969
;
7070
$connection
7171
->expects($this->once())
7272
->method('ping')
73-
->will($this->returnValue(false))
73+
->willReturn(false)
7474
;
7575
$connection
7676
->expects($this->once())
@@ -97,7 +97,7 @@ public function testShouldDoesReconnectIfConnectionFailed()
9797
$registry
9898
->expects($this->once())
9999
->method('getConnections')
100-
->will($this->returnValue([$connection]))
100+
->willReturn([$connection])
101101
;
102102

103103
$extension = new DoctrinePingConnectionExtension($registry);
@@ -110,7 +110,7 @@ public function testShouldSkipIfConnectionWasNotOpened()
110110
$connection1
111111
->expects($this->once())
112112
->method('isConnected')
113-
->will($this->returnValue(false))
113+
->willReturn(false)
114114
;
115115
$connection1
116116
->expects($this->never())
@@ -122,12 +122,12 @@ public function testShouldSkipIfConnectionWasNotOpened()
122122
$connection2
123123
->expects($this->once())
124124
->method('isConnected')
125-
->will($this->returnValue(true))
125+
->willReturn(true)
126126
;
127127
$connection2
128128
->expects($this->once())
129129
->method('ping')
130-
->will($this->returnValue(true))
130+
->willReturn(true)
131131
;
132132

133133
$context = $this->createContext();
@@ -140,7 +140,7 @@ public function testShouldSkipIfConnectionWasNotOpened()
140140
$registry
141141
->expects($this->once())
142142
->method('getConnections')
143-
->will($this->returnValue([$connection1, $connection2]))
143+
->willReturn([$connection1, $connection2])
144144
;
145145

146146
$extension = new DoctrinePingConnectionExtension($registry);

pkg/enqueue/Client/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ public function __construct($body = '', array $properties = [], array $headers =
8888
}
8989

9090
/**
91-
* @return null|string
91+
* @return string|null
9292
*/
9393
public function getBody()
9494
{
9595
return $this->body;
9696
}
9797

9898
/**
99-
* @param null|string|int|float|array|\JsonSerializable $body
99+
* @param string|int|float|array|\JsonSerializable|null $body
100100
*/
101101
public function setBody($body)
102102
{

pkg/enqueue/Consumption/Context/MessageResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getReceivedAt(): int
7676
}
7777

7878
/**
79-
* @return Result|null|object|string
79+
* @return Result|object|string|null
8080
*/
8181
public function getResult()
8282
{

pkg/enqueue/Tests/Client/DelegateProcessorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public function testShouldProcessMessage()
3939
->expects($this->once())
4040
->method('process')
4141
->with($this->identicalTo($message), $this->identicalTo($session))
42-
->will($this->returnValue('return-value'))
42+
->willReturn('return-value')
4343
;
4444

4545
$processorRegistry = $this->createProcessorRegistryMock();
4646
$processorRegistry
4747
->expects($this->once())
4848
->method('get')
4949
->with('processor-name')
50-
->will($this->returnValue($processor))
50+
->willReturn($processor)
5151
;
5252

5353
$processor = new DelegateProcessor($processorRegistry);

0 commit comments

Comments
 (0)