Skip to content

Commit 56e839d

Browse files
Fix laravel pint code style.
1 parent b8681dd commit 56e839d

File tree

8 files changed

+59
-59
lines changed

8 files changed

+59
-59
lines changed

Diff for: src/Queue/Connection/ConfigFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ConfigFactory
1616
*/
1717
public static function make(array $config = []): AMQPConnectionConfig
1818
{
19-
return tap(new AMQPConnectionConfig(), function (AMQPConnectionConfig $connectionConfig) use ($config) {
19+
return tap(new AMQPConnectionConfig, function (AMQPConnectionConfig $connectionConfig) use ($config) {
2020
// Set the connection to a Lazy by default
2121
$connectionConfig->setIsLazy(! in_array(
2222
Arr::get($config, 'lazy') ?? true,

Diff for: src/Queue/QueueConfigFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class QueueConfigFactory
1313
*/
1414
public static function make(array $config = []): QueueConfig
1515
{
16-
return tap(new QueueConfig(), function (QueueConfig $queueConfig) use ($config) {
16+
return tap(new QueueConfig, function (QueueConfig $queueConfig) use ($config) {
1717
if (! empty($queue = Arr::get($config, 'queue'))) {
1818
$queueConfig->setQueue($queue);
1919
}

Diff for: tests/Feature/ConnectorTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class ConnectorTest extends \VladimirYuldashev\LaravelQueueRabbitMQ\Tests\TestCase
1414
{
15-
public function testLazyConnection(): void
15+
public function test_lazy_connection(): void
1616
{
1717
$this->app['config']->set('queue.connections.rabbitmq', [
1818
'driver' => 'rabbitmq',
@@ -55,7 +55,7 @@ public function testLazyConnection(): void
5555
$this->assertTrue($connection->getConnection()->isConnected());
5656
}
5757

58-
public function testLazyStreamConnection(): void
58+
public function test_lazy_stream_connection(): void
5959
{
6060
$this->app['config']->set('queue.connections.rabbitmq', [
6161
'driver' => 'rabbitmq',
@@ -98,7 +98,7 @@ public function testLazyStreamConnection(): void
9898
$this->assertTrue($connection->getConnection()->isConnected());
9999
}
100100

101-
public function testSslConnection(): void
101+
public function test_ssl_connection(): void
102102
{
103103
$this->markTestSkipped();
104104

@@ -142,7 +142,7 @@ public function testSslConnection(): void
142142
}
143143

144144
// Test to validate ssl connection params
145-
public function testNoVerificationSslConnection(): void
145+
public function test_no_verification_ssl_connection(): void
146146
{
147147
$this->app['config']->set('queue.connections.rabbitmq', [
148148
'driver' => 'rabbitmq',

Diff for: tests/Feature/QueueTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class QueueTest extends TestCase
1212
{
13-
public function setUp(): void
13+
protected function setUp(): void
1414
{
1515
parent::setUp();
1616

@@ -20,16 +20,16 @@ public function setUp(): void
2020
]);
2121
}
2222

23-
public function testConnection(): void
23+
public function test_connection(): void
2424
{
2525
$this->assertInstanceOf(AMQPStreamConnection::class, $this->connection()->getChannel()->getConnection());
2626
}
2727

28-
public function testWithoutReconnect(): void
28+
public function test_without_reconnect(): void
2929
{
3030
$queue = $this->connection('rabbitmq');
3131

32-
$queue->push(new TestJob());
32+
$queue->push(new TestJob);
3333
sleep(1);
3434
$this->assertSame(1, $queue->size());
3535

@@ -38,6 +38,6 @@ public function testWithoutReconnect(): void
3838
$this->assertFalse($queue->getConnection()->isConnected());
3939

4040
$this->expectException(AMQPChannelClosedException::class);
41-
$queue->push(new TestJob());
41+
$queue->push(new TestJob);
4242
}
4343
}

Diff for: tests/Feature/SslQueueTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class SslQueueTest extends TestCase
88
{
9-
public function setUp(): void
9+
protected function setUp(): void
1010
{
1111
$this->markTestSkipped();
1212
}
@@ -43,7 +43,7 @@ protected function getEnvironmentSetUp($app): void
4343
]);
4444
}
4545

46-
public function testConnection(): void
46+
public function test_connection(): void
4747
{
4848
$this->assertInstanceOf(AMQPSSLConnection::class, $this->connection()->getChannel()->getConnection());
4949
}

Diff for: tests/Feature/TestCase.php

+29-29
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class TestCase extends BaseTestCase
1717
/**
1818
* @throws AMQPProtocolChannelException
1919
*/
20-
public function setUp(): void
20+
protected function setUp(): void
2121
{
2222
parent::setUp();
2323

@@ -40,17 +40,17 @@ protected function tearDown(): void
4040
parent::tearDown();
4141
}
4242

43-
public function testSizeDoesNotThrowExceptionOnUnknownQueue(): void
43+
public function test_size_does_not_throw_exception_on_unknown_queue(): void
4444
{
4545
$this->assertEmpty(0, Queue::size(Str::random()));
4646
}
4747

48-
public function testPopNothing(): void
48+
public function test_pop_nothing(): void
4949
{
5050
$this->assertNull(Queue::pop('foo'));
5151
}
5252

53-
public function testPushRaw(): void
53+
public function test_push_raw(): void
5454
{
5555
Queue::pushRaw($payload = Str::random());
5656

@@ -68,9 +68,9 @@ public function testPushRaw(): void
6868
$this->assertSame(0, Queue::size());
6969
}
7070

71-
public function testPush(): void
71+
public function test_push(): void
7272
{
73-
Queue::push(new TestJob());
73+
Queue::push(new TestJob);
7474

7575
sleep(1);
7676

@@ -95,7 +95,7 @@ public function testPush(): void
9595
$this->assertSame(0, Queue::size());
9696
}
9797

98-
public function testPushAfterCommit(): void
98+
public function test_push_after_commit(): void
9999
{
100100
$transaction = new DatabaseTransactionsManager;
101101

@@ -122,7 +122,7 @@ public function testPushAfterCommit(): void
122122
$this->assertSame(0, Queue::size());
123123
}
124124

125-
public function testLaterRaw(): void
125+
public function test_later_raw(): void
126126
{
127127
$payload = Str::random();
128128
$data = [Str::random() => Str::random()];
@@ -152,9 +152,9 @@ public function testLaterRaw(): void
152152
$this->assertSame(0, Queue::size());
153153
}
154154

155-
public function testLater(): void
155+
public function test_later(): void
156156
{
157-
Queue::later(3, new TestJob());
157+
Queue::later(3, new TestJob);
158158

159159
sleep(1);
160160

@@ -179,7 +179,7 @@ public function testLater(): void
179179
$this->assertSame(0, Queue::size());
180180
}
181181

182-
public function testBulk(): void
182+
public function test_bulk(): void
183183
{
184184
$count = 100;
185185
$jobs = [];
@@ -195,9 +195,9 @@ public function testBulk(): void
195195
$this->assertSame($count, Queue::size());
196196
}
197197

198-
public function testPushEncrypted(): void
198+
public function test_push_encrypted(): void
199199
{
200-
Queue::push(new TestEncryptedJob());
200+
Queue::push(new TestEncryptedJob);
201201

202202
sleep(1);
203203

@@ -222,7 +222,7 @@ public function testPushEncrypted(): void
222222
$this->assertSame(0, Queue::size());
223223
}
224224

225-
public function testPushEncryptedAfterCommit(): void
225+
public function test_push_encrypted_after_commit(): void
226226
{
227227
$transaction = new DatabaseTransactionsManager;
228228

@@ -249,9 +249,9 @@ public function testPushEncryptedAfterCommit(): void
249249
$this->assertSame(0, Queue::size());
250250
}
251251

252-
public function testEncryptedLater(): void
252+
public function test_encrypted_later(): void
253253
{
254-
Queue::later(3, new TestEncryptedJob());
254+
Queue::later(3, new TestEncryptedJob);
255255

256256
sleep(1);
257257

@@ -276,7 +276,7 @@ public function testEncryptedLater(): void
276276
$this->assertSame(0, Queue::size());
277277
}
278278

279-
public function testEncryptedBulk(): void
279+
public function test_encrypted_bulk(): void
280280
{
281281
$count = 100;
282282
$jobs = [];
@@ -292,7 +292,7 @@ public function testEncryptedBulk(): void
292292
$this->assertSame($count, Queue::size());
293293
}
294294

295-
public function testReleaseRaw(): void
295+
public function test_release_raw(): void
296296
{
297297
Queue::pushRaw($payload = Str::random());
298298

@@ -318,9 +318,9 @@ public function testReleaseRaw(): void
318318
$this->assertSame(0, Queue::size());
319319
}
320320

321-
public function testRelease(): void
321+
public function test_release(): void
322322
{
323-
Queue::push(new TestJob());
323+
Queue::push(new TestJob);
324324

325325
sleep(1);
326326

@@ -344,7 +344,7 @@ public function testRelease(): void
344344
$this->assertSame(0, Queue::size());
345345
}
346346

347-
public function testReleaseWithDelayRaw(): void
347+
public function test_release_with_delay_raw(): void
348348
{
349349
Queue::pushRaw($payload = Str::random());
350350

@@ -375,9 +375,9 @@ public function testReleaseWithDelayRaw(): void
375375
$this->assertSame(0, Queue::size());
376376
}
377377

378-
public function testReleaseInThePast(): void
378+
public function test_release_in_the_past(): void
379379
{
380-
Queue::push(new TestJob());
380+
Queue::push(new TestJob);
381381

382382
$job = Queue::pop();
383383
$job->release(-3);
@@ -390,9 +390,9 @@ public function testReleaseInThePast(): void
390390
$this->assertSame(0, Queue::size());
391391
}
392392

393-
public function testReleaseAndReleaseWithDelayAttempts(): void
393+
public function test_release_and_release_with_delay_attempts(): void
394394
{
395-
Queue::push(new TestJob());
395+
Queue::push(new TestJob);
396396

397397
sleep(1);
398398

@@ -417,9 +417,9 @@ public function testReleaseAndReleaseWithDelayAttempts(): void
417417
$this->assertSame(0, Queue::size());
418418
}
419419

420-
public function testDelete(): void
420+
public function test_delete(): void
421421
{
422-
Queue::push(new TestJob());
422+
Queue::push(new TestJob);
423423

424424
$job = Queue::pop();
425425

@@ -431,9 +431,9 @@ public function testDelete(): void
431431
$this->assertNull(Queue::pop());
432432
}
433433

434-
public function testFailed(): void
434+
public function test_failed(): void
435435
{
436-
Queue::push(new TestJob());
436+
Queue::push(new TestJob);
437437

438438
$job = Queue::pop();
439439

0 commit comments

Comments
 (0)