Skip to content

Commit 488e993

Browse files
committed
Apply fixes from StyleCI
1 parent f57f76a commit 488e993

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

src/Rules/Search/SearchText.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public function buildValidationRules(string $attribute, mixed $value): array
1616
}
1717

1818
return [
19-
$attribute => ['sometimes', 'array'],
20-
$attribute.'.value' => ['nullable', 'string'],
19+
$attribute => ['sometimes', 'array'],
20+
$attribute.'.value' => ['nullable', 'string'],
2121
$attribute.'.trashed' => [
2222
Rule::in('with', 'only'),
2323
],

tests/Feature/Controllers/SearchScoutOperationsTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44

55
use Illuminate\Support\Facades\Config;
66
use Illuminate\Support\Facades\Gate;
7-
use Lomkit\Rest\Query\ScoutBuilder;
87
use Lomkit\Rest\Tests\Feature\TestCase;
98
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory;
109
use Lomkit\Rest\Tests\Support\Models\Model;
1110
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy;
1211
use Lomkit\Rest\Tests\Support\Rest\Resources\ModelResource;
13-
use Mockery\MockInterface;
1412

1513
class SearchScoutOperationsTest extends TestCase
1614
{

tests/Unit/LaravelScoutTest.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function test_building_scout_with_filters()
4747

4848
$scoutQueryBuilderMock
4949
->search([
50-
'text' => ['value' => 'test'],
50+
'text' => ['value' => 'test'],
5151
'filters' => [
5252
['field' => 'test', 'value' => 1],
5353
],
@@ -67,7 +67,7 @@ public function test_building_scout_with_sorts()
6767

6868
$scoutQueryBuilderMock
6969
->search([
70-
'text' => ['value' => 'test'],
70+
'text' => ['value' => 'test'],
7171
'sorts' => [
7272
['field' => 'id'],
7373
],
@@ -87,7 +87,7 @@ public function test_building_scout_with_instructions()
8787

8888
$scoutQueryBuilderMock
8989
->search([
90-
'text' => ['value' => 'test'],
90+
'text' => ['value' => 'test'],
9191
'instructions' => [
9292
['name' => 'my_instruction'],
9393
],
@@ -110,11 +110,10 @@ public function test_building_scout_with_trashed()
110110

111111
$scoutQueryBuilderMock
112112
->search([
113-
'text' =>
114-
[
115-
'value' => 'test',
116-
'trashed' => 'with'
117-
],
113+
'text' => [
114+
'value' => 'test',
115+
'trashed' => 'with',
116+
],
118117
]);
119118

120119
($scoutQueryBuilderMock->toBase()->queryCallback)(Model::query());
@@ -134,11 +133,10 @@ public function test_building_scout_only_trashed()
134133

135134
$scoutQueryBuilderMock
136135
->search([
137-
'text' =>
138-
[
139-
'value' => 'test',
140-
'trashed' => 'only'
141-
],
136+
'text' => [
137+
'value' => 'test',
138+
'trashed' => 'only',
139+
],
142140
]);
143141

144142
($scoutQueryBuilderMock->toBase()->queryCallback)(Model::query());

0 commit comments

Comments
 (0)