@@ -30,8 +30,7 @@ public function test_pending_batch_may_be_configured_and_dispatched()
30
30
31
31
$ container ->instance (Dispatcher::class, $ eventDispatcher );
32
32
33
- $ job = new class
34
- {
33
+ $ job = new class {
35
34
use Batchable;
36
35
};
37
36
@@ -71,8 +70,7 @@ public function test_batch_is_deleted_from_storage_if_exception_thrown_during_ba
71
70
72
71
$ container = new Container ;
73
72
74
- $ job = new class
75
- {
73
+ $ job = new class {
76
74
};
77
75
78
76
$ pendingBatch = new PendingBatch ($ container , new Collection ([$ job ]));
@@ -102,8 +100,7 @@ public function test_batch_is_dispatched_when_dispatchif_is_true()
102
100
$ eventDispatcher ->shouldReceive ('dispatch ' )->once ();
103
101
$ container ->instance (Dispatcher::class, $ eventDispatcher );
104
102
105
- $ job = new class
106
- {
103
+ $ job = new class {
107
104
use Batchable;
108
105
};
109
106
@@ -128,8 +125,7 @@ public function test_batch_is_not_dispatched_when_dispatchif_is_false()
128
125
$ eventDispatcher ->shouldNotReceive ('dispatch ' );
129
126
$ container ->instance (Dispatcher::class, $ eventDispatcher );
130
127
131
- $ job = new class
132
- {
128
+ $ job = new class {
133
129
use Batchable;
134
130
};
135
131
@@ -151,8 +147,7 @@ public function test_batch_is_dispatched_when_dispatchunless_is_false()
151
147
$ eventDispatcher ->shouldReceive ('dispatch ' )->once ();
152
148
$ container ->instance (Dispatcher::class, $ eventDispatcher );
153
149
154
- $ job = new class
155
- {
150
+ $ job = new class {
156
151
use Batchable;
157
152
};
158
153
@@ -177,8 +172,7 @@ public function test_batch_is_not_dispatched_when_dispatchunless_is_true()
177
172
$ eventDispatcher ->shouldNotReceive ('dispatch ' );
178
173
$ container ->instance (Dispatcher::class, $ eventDispatcher );
179
174
180
- $ job = new class
181
- {
175
+ $ job = new class {
182
176
use Batchable;
183
177
};
184
178
@@ -201,8 +195,7 @@ public function test_batch_before_event_is_called()
201
195
202
196
$ container ->instance (Dispatcher::class, $ eventDispatcher );
203
197
204
- $ job = new class
205
- {
198
+ $ job = new class {
206
199
use Batchable;
207
200
};
208
201
@@ -227,8 +220,7 @@ public function test_batch_before_event_is_called()
227
220
228
221
public function test_it_throws_exception_if_batched_job_is_not_batchable (): void
229
222
{
230
- $ nonBatchableJob = new class
231
- {
223
+ $ nonBatchableJob = new class {
232
224
};
233
225
234
226
$ this ->expectException (RuntimeException::class);
@@ -244,8 +236,7 @@ public function test_it_throws_an_exception_if_batched_job_contains_batch_with_n
244
236
new PendingBatch (
245
237
$ container ,
246
238
new Collection (
247
- [new PendingBatch ($ container , new Collection ([new BatchableJob , new class
248
- {
239
+ [new PendingBatch ($ container , new Collection ([new BatchableJob , new class {
249
240
}]))]
250
241
)
251
242
);
0 commit comments