@@ -50,7 +50,7 @@ public function a_http_request_with_the_handler_url_is_made()
5050 CloudTasksApi::fake ();
5151
5252 // Act
53- $ this ->dispatch (new SimpleJob () );
53+ $ this ->dispatch (new SimpleJob );
5454
5555 // Assert
5656 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -65,7 +65,7 @@ public function it_posts_to_the_handler()
6565 CloudTasksApi::fake ();
6666
6767 // Act
68- $ this ->dispatch (new SimpleJob () );
68+ $ this ->dispatch (new SimpleJob );
6969
7070 // Assert
7171 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -81,7 +81,7 @@ public function it_posts_to_the_configured_handler_url()
8181 CloudTasksApi::fake ();
8282
8383 // Act
84- $ this ->dispatch (new SimpleJob () );
84+ $ this ->dispatch (new SimpleJob );
8585
8686 // Assert
8787 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -98,7 +98,7 @@ public function it_posts_to_the_callback_handler_url()
9898 CloudTasksQueue::configureHandlerUrlUsing (static fn (SimpleJob $ job ) => 'https://example.com/api/my-custom-route?job= ' .$ job ->id );
9999
100100 // Act
101- $ job = new SimpleJob () ;
101+ $ job = new SimpleJob ;
102102 $ job ->id = 1 ;
103103 $ this ->dispatch ($ job );
104104
@@ -115,7 +115,7 @@ public function it_posts_the_serialized_job_payload_to_the_handler()
115115 CloudTasksApi::fake ();
116116
117117 // Act
118- $ this ->dispatch ($ job = new SimpleJob () );
118+ $ this ->dispatch ($ job = new SimpleJob );
119119
120120 // Assert
121121 CloudTasksApi::assertTaskCreated (function (Task $ task ) use ($ job ): bool {
@@ -135,7 +135,7 @@ public function it_will_set_the_scheduled_time_when_dispatching_later()
135135
136136 // Act
137137 $ inFiveMinutes = now ()->addMinutes (5 );
138- $ this ->dispatch ((new SimpleJob () )->delay ($ inFiveMinutes ));
138+ $ this ->dispatch ((new SimpleJob )->delay ($ inFiveMinutes ));
139139
140140 // Assert
141141 CloudTasksApi::assertTaskCreated (function (Task $ task ) use ($ inFiveMinutes ): bool {
@@ -153,8 +153,8 @@ public function it_posts_the_task_the_correct_queue()
153153 $ closureDisplayName = CallQueuedClosure::create ($ closure )->displayName ();
154154
155155 // Act
156- $ this ->dispatch ((new SimpleJob () ));
157- $ this ->dispatch ((new FailingJob () )->onQueue ('my-special-queue ' ));
156+ $ this ->dispatch ((new SimpleJob ));
157+ $ this ->dispatch ((new FailingJob )->onQueue ('my-special-queue ' ));
158158 $ this ->dispatch ($ closure );
159159 $ this ->dispatch ($ closure , 'my-special-queue ' );
160160
@@ -248,7 +248,7 @@ public function jobs_can_be_released()
248248 ]);
249249
250250 // Act
251- $ this ->dispatch (new JobThatWillBeReleased () )
251+ $ this ->dispatch (new JobThatWillBeReleased )
252252 ->runAndGetReleasedJob ()
253253 ->run ();
254254
@@ -305,7 +305,7 @@ public function test_default_backoff()
305305 Event::fake (JobReleasedAfterException::class);
306306
307307 // Act
308- $ this ->dispatch (new FailingJob () )->run ();
308+ $ this ->dispatch (new FailingJob )->run ();
309309
310310 // Assert
311311 CloudTasksApi::assertTaskCreated (function (Task $ task ) {
@@ -323,7 +323,7 @@ public function test_backoff_from_queue_config()
323323 Event::fake (JobReleasedAfterException::class);
324324
325325 // Act
326- $ this ->dispatch (new FailingJob () )->run ();
326+ $ this ->dispatch (new FailingJob )->run ();
327327
328328 // Assert
329329 CloudTasksApi::assertTaskCreated (function (Task $ task ) {
@@ -341,7 +341,7 @@ public function test_backoff_from_job()
341341 Event::fake (JobReleasedAfterException::class);
342342
343343 // Act
344- $ failingJob = new FailingJob () ;
344+ $ failingJob = new FailingJob ;
345345 $ failingJob ->backoff = 123 ;
346346 $ this ->dispatch ($ failingJob )->run ();
347347
@@ -360,7 +360,7 @@ public function test_exponential_backoff_from_job_method()
360360 CloudTasksApi::fake ();
361361
362362 // Act
363- $ releasedJob = $ this ->dispatch (new FailingJobWithExponentialBackoff () )
363+ $ releasedJob = $ this ->dispatch (new FailingJobWithExponentialBackoff )
364364 ->runAndGetReleasedJob ();
365365 $ releasedJob = $ releasedJob ->runAndGetReleasedJob ();
366366 $ releasedJob ->run ();
@@ -388,7 +388,7 @@ public function test_failing_method_on_job()
388388 Event::fake (JobOutput::class);
389389
390390 // Act
391- $ this ->dispatch (new FailingJob () )
391+ $ this ->dispatch (new FailingJob )
392392 ->runAndGetReleasedJob ()
393393 ->runAndGetReleasedJob ()
394394 ->runAndGetReleasedJob ();
@@ -411,7 +411,7 @@ public function test_queue_before_and_after_hooks()
411411 Queue::after (function (JobProcessed $ event ) {
412412 event (new JobOutput ('Queue::after: ' .$ event ->job ->payload ()['data ' ]['commandName ' ]));
413413 });
414- $ this ->dispatch (new SimpleJob () )->run ();
414+ $ this ->dispatch (new SimpleJob )->run ();
415415
416416 // Assert
417417 Event::assertDispatched (fn (JobOutput $ event ) => $ event ->output === 'Queue::before:Tests\Support\SimpleJob ' );
@@ -429,7 +429,7 @@ public function test_queue_looping_hook_not_supported_with_this_package()
429429 Queue::looping (function () {
430430 event (new JobOutput ('Queue::looping ' ));
431431 });
432- $ this ->dispatch (new SimpleJob () )->run ();
432+ $ this ->dispatch (new SimpleJob )->run ();
433433
434434 // Assert
435435 Event::assertDispatchedTimes (JobOutput::class, times: 1 );
@@ -475,7 +475,7 @@ public function it_adds_a_pre_defined_task_name()
475475 Str::createUlidsUsingSequence (['01HSR4V9QE2F4T0K8RBAYQ88KE ' ]);
476476
477477 // Act
478- $ this ->dispatch ((new SimpleJob () ));
478+ $ this ->dispatch ((new SimpleJob ));
479479
480480 // Assert
481481 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -494,7 +494,7 @@ public function headers_can_be_added_to_the_task()
494494 'X-MyHeader ' => 'MyValue ' ,
495495 ]);
496496
497- $ this ->dispatch ((new SimpleJob () ));
497+ $ this ->dispatch ((new SimpleJob ));
498498
499499 // Assert
500500 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -513,7 +513,7 @@ public function headers_can_be_added_to_the_task_with_job_context()
513513 'X-MyHeader ' => $ payload ['displayName ' ],
514514 ]);
515515
516- $ this ->dispatch ((new SimpleJob () ));
516+ $ this ->dispatch ((new SimpleJob ));
517517
518518 // Assert
519519 CloudTasksApi::assertTaskCreated (function (Task $ task ): bool {
@@ -529,10 +529,10 @@ public function batched_jobs_with_custom_queue_are_dispatched_on_the_custom_queu
529529
530530 // Act
531531 $ this ->dispatch (Bus::batch ([
532- tap (new SimpleJob () , function (SimpleJob $ job ) {
532+ tap (new SimpleJob , function (SimpleJob $ job ) {
533533 $ job ->queue = 'my-queue1 ' ;
534534 }),
535- tap (new SimpleJobWithTimeout () , function (SimpleJob $ job ) {
535+ tap (new SimpleJobWithTimeout , function (SimpleJob $ job ) {
536536 $ job ->queue = 'my-queue2 ' ;
537537 }),
538538 ])->onQueue ('my-batch-queue ' ));
0 commit comments