Skip to content

Commit 2de60ea

Browse files
committed
fix formatting
1 parent 2e6c4c2 commit 2de60ea

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

docs/includes/fundamentals/aggregation/AggregationsBuilderTest.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace App\Http\Controllers;
66

7+
use App\Models\Inventory;
8+
use App\Models\Order;
9+
use App\Models\Sale;
710
use DateTimeImmutable;
811
use MongoDB\BSON\UTCDateTime;
912
use MongoDB\Builder\Accumulator;
@@ -13,9 +16,6 @@
1316
use MongoDB\Builder\Type\Sort;
1417
use MongoDB\Laravel\Tests\Models\User;
1518
use MongoDB\Laravel\Tests\TestCase;
16-
use App\Models\Sale;
17-
use App\Models\Order;
18-
use App\Models\Inventory;
1919

2020
class AggregationsBuilderTest extends TestCase
2121
{
@@ -192,39 +192,39 @@ public function testAggregationBuilderUnwind(): void
192192

193193
Sale::insert([
194194
[
195-
'_id' => "1",
195+
'_id' => '1',
196196
'items' => [
197197
[
198198
'name' => 'pens',
199199
'tags' => ['writing', 'office', 'school', 'stationary'],
200200
'price' => new Decimal128('12.00'),
201-
'quantity' => 5
201+
'quantity' => 5,
202202
],
203203
[
204204
'name' => 'envelopes',
205205
'tags' => ['stationary', 'office'],
206206
'price' => new Decimal128('19.95'),
207-
'quantity' => 8
208-
]
209-
]
207+
'quantity' => 8,
208+
],
209+
],
210210
],
211211
[
212-
'_id' => "2",
212+
'_id' => '2',
213213
'items' => [
214214
[
215215
'name' => 'laptop',
216216
'tags' => ['office', 'electronics'],
217217
'price' => new Decimal128('800.00'),
218-
'quantity' => 1
218+
'quantity' => 1,
219219
],
220220
[
221221
'name' => 'notepad',
222222
'tags' => ['stationary', 'school'],
223223
'price' => new Decimal128('14.95'),
224-
'quantity' => 3
225-
]
226-
]
227-
]
224+
'quantity' => 3,
225+
],
226+
],
227+
],
228228
]);
229229

230230
// start-builder-unwind
@@ -258,52 +258,52 @@ public function testAggregationBuilderLookup(): void
258258
'_id' => 1,
259259
'item' => 'almonds',
260260
'price' => 12,
261-
'quantity' => 2
261+
'quantity' => 2,
262262
],
263263
[
264264
'_id' => 2,
265265
'item' => 'pecans',
266266
'price' => 20,
267-
'quantity' => 1
267+
'quantity' => 1,
268268
],
269269
[
270-
'_id' => 3
271-
]
270+
'_id' => 3,
271+
],
272272
]);
273273

274274
Inventory::insert([
275275
[
276276
'_id' => 1,
277277
'sku' => 'almonds',
278278
'description' => 'product 1',
279-
'instock' => 120
279+
'instock' => 120,
280280
],
281281
[
282282
'_id' => 2,
283283
'sku' => 'bread',
284284
'description' => 'product 2',
285-
'instock' => 80
285+
'instock' => 80,
286286
],
287287
[
288288
'_id' => 3,
289289
'sku' => 'cashews',
290290
'description' => 'product 3',
291-
'instock' => 60
291+
'instock' => 60,
292292
],
293293
[
294294
'_id' => 4,
295295
'sku' => 'pecans',
296296
'description' => 'product 4',
297-
'instock' => 70
297+
'instock' => 70,
298298
],
299299
[
300300
'_id' => 5,
301301
'sku' => null,
302-
'description' => 'Incomplete'
302+
'description' => 'Incomplete',
303303
],
304304
[
305-
'_id' => 6
306-
]
305+
'_id' => 6,
306+
],
307307
]);
308308

309309
// start-builder-lookup

0 commit comments

Comments
 (0)