Skip to content

Commit a759e44

Browse files
committed
Apply fixes from StyleCI
1 parent fdecca9 commit a759e44

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/Http/Resource.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ public function jsonSerialize(): mixed
160160
$request = app(RestRequest::class);
161161

162162
return [
163-
'actions' => collect($this->getActions($request))->map->jsonSerialize()->toArray(),
164-
'instructions' => collect($this->getInstructions($request))->map->jsonSerialize()->toArray(),
163+
'actions' => collect($this->getActions($request))->map->jsonSerialize()->toArray(),
164+
'instructions' => collect($this->getInstructions($request))->map->jsonSerialize()->toArray(),
165165
'scout_instructions' => collect($this->getScoutInstructions($request))->map->jsonSerialize()->toArray(),
166-
'fields' => $this->getFields($request),
167-
'scout_fields' => $this->getScoutFields($request),
168-
'limits' => $this->getLimits($request),
169-
'scopes' => $this->getScopes($request),
170-
'relations' => collect($this->getRelations($request))->map->jsonSerialize()->toArray(),
171-
'rules' => [
166+
'fields' => $this->getFields($request),
167+
'scout_fields' => $this->getScoutFields($request),
168+
'limits' => $this->getLimits($request),
169+
'scopes' => $this->getScopes($request),
170+
'relations' => collect($this->getRelations($request))->map->jsonSerialize()->toArray(),
171+
'rules' => [
172172
'all' => $this->rules($request),
173173
'create' => $this->createRules($request),
174174
'update' => $this->updateRules($request),

src/Rules/SearchRules.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ protected function scopesRules(\Lomkit\Rest\Http\Resource $resource, string $pre
195195
{
196196
if ($this->isScoutMode()) {
197197
return [
198-
$prefix => 'prohibited'
198+
$prefix => 'prohibited',
199199
];
200200
}
201201

@@ -227,14 +227,13 @@ protected function instructionsRules(\Lomkit\Rest\Http\Resource $resource, strin
227227
$instructionNames = Rule::in(
228228
collect(
229229
$this->isScoutMode() ?
230-
$resource->getScoutInstructions($this->request):
230+
$resource->getScoutInstructions($this->request) :
231231
$resource->getInstructions($this->request)
232232
)
233233
->map(function ($instruction) { return $instruction->uriKey(); })
234234
->toArray()
235235
);
236236

237-
238237
$rules = [
239238
$prefix.'.*.name' => [
240239
$instructionNames,

0 commit comments

Comments
 (0)