Skip to content

Commit 77ada3e

Browse files
AlexVanderbistgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 83c5c42 commit 77ada3e

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/Concerns/AddsFieldsToQuery.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Spatie\QueryBuilder\Concerns;
44

5-
use Illuminate\Support\Arr;
65
use Illuminate\Support\Collection;
76
use Illuminate\Support\Str;
87
use Spatie\QueryBuilder\Exceptions\AllowedFieldsMustBeCalledBeforeAllowedIncludes;
@@ -55,7 +54,7 @@ public function getRequestedFieldsForRelatedTable(string $relation): array
5554
$table = Str::plural(Str::snake($relation)); // TODO: make this configurable
5655

5756
$fields = $this->request->fields()
58-
->mapWithKeys(fn($fields, $table) => [$table => $fields])
57+
->mapWithKeys(fn ($fields, $table) => [$table => $fields])
5958
->get($table);
6059

6160
if (! $fields) {

src/QueryBuilderRequest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Spatie\QueryBuilder;
44

55
use Illuminate\Http\Request;
6-
use Illuminate\Support\Arr;
76
use Illuminate\Support\Collection;
87
use Illuminate\Support\Str;
98

tests/QueryBuilderRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309

310310
it('can get requested fields without a table name', function () {
311311
$request = new QueryBuilderRequest([
312-
'fields' => 'name,email,related.id,related.type',
312+
'fields' => 'name,email,related.id,related.type',
313313
]);
314314

315315
$expected = collect(['_' => ['name', 'email'], 'related' => ['id', 'type']]);

0 commit comments

Comments
 (0)