Skip to content

Commit ca9cc96

Browse files
rustagirgithub-actions[bot]
authored andcommitted
apply phpcbf formatting
1 parent dbb905f commit ca9cc96

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
{
@@ -188,39 +188,39 @@ public function testAggregationBuilderUnwind(): void
188188

189189
Sale::insert([
190190
[
191-
'_id' => "1",
191+
'_id' => '1',
192192
'items' => [
193193
[
194194
'name' => 'pens',
195195
'tags' => ['writing', 'office', 'school', 'stationary'],
196196
'price' => new Decimal128('12.00'),
197-
'quantity' => 5
197+
'quantity' => 5,
198198
],
199199
[
200200
'name' => 'envelopes',
201201
'tags' => ['stationary', 'office'],
202202
'price' => new Decimal128('19.95'),
203-
'quantity' => 8
204-
]
205-
]
203+
'quantity' => 8,
204+
],
205+
],
206206
],
207207
[
208-
'_id' => "2",
208+
'_id' => '2',
209209
'items' => [
210210
[
211211
'name' => 'laptop',
212212
'tags' => ['office', 'electronics'],
213213
'price' => new Decimal128('800.00'),
214-
'quantity' => 1
214+
'quantity' => 1,
215215
],
216216
[
217217
'name' => 'notepad',
218218
'tags' => ['stationary', 'school'],
219219
'price' => new Decimal128('14.95'),
220-
'quantity' => 3
221-
]
222-
]
223-
]
220+
'quantity' => 3,
221+
],
222+
],
223+
],
224224
]);
225225

226226
// start-builder-unwind
@@ -254,52 +254,52 @@ public function testAggregationBuilderLookup(): void
254254
'_id' => 1,
255255
'item' => 'almonds',
256256
'price' => 12,
257-
'quantity' => 2
257+
'quantity' => 2,
258258
],
259259
[
260260
'_id' => 2,
261261
'item' => 'pecans',
262262
'price' => 20,
263-
'quantity' => 1
263+
'quantity' => 1,
264264
],
265265
[
266-
'_id' => 3
267-
]
266+
'_id' => 3,
267+
],
268268
]);
269269

270270
Inventory::insert([
271271
[
272272
'_id' => 1,
273273
'sku' => 'almonds',
274274
'description' => 'product 1',
275-
'instock' => 120
275+
'instock' => 120,
276276
],
277277
[
278278
'_id' => 2,
279279
'sku' => 'bread',
280280
'description' => 'product 2',
281-
'instock' => 80
281+
'instock' => 80,
282282
],
283283
[
284284
'_id' => 3,
285285
'sku' => 'cashews',
286286
'description' => 'product 3',
287-
'instock' => 60
287+
'instock' => 60,
288288
],
289289
[
290290
'_id' => 4,
291291
'sku' => 'pecans',
292292
'description' => 'product 4',
293-
'instock' => 70
293+
'instock' => 70,
294294
],
295295
[
296296
'_id' => 5,
297297
'sku' => null,
298-
'description' => 'Incomplete'
298+
'description' => 'Incomplete',
299299
],
300300
[
301-
'_id' => 6
302-
]
301+
'_id' => 6,
302+
],
303303
]);
304304

305305
// start-builder-lookup

0 commit comments

Comments
 (0)