Skip to content

Commit 8799b7b

Browse files
committed
Apply fixes from StyleCI
1 parent aa37df6 commit 8799b7b

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/Rules/Resource/ResourceCustomRules.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public function buildValidationRules(string $attribute, mixed $value): array
1818
} elseif ($operation === 'update') {
1919
$rules = $this->resource->updateRules($request);
2020
} else {
21-
// No rules needed for unknown/missing operations
22-
return [];
23-
}
21+
// No rules needed for unknown/missing operations
22+
return [];
23+
}
2424

2525
$rules = array_merge_recursive(
2626
$rules,

src/Rules/Search/Search.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ public function buildValidationRules(string $attribute, mixed $value): array
1414
$isScoutMode = $request->isScoutMode();
1515

1616
return [
17-
$attribute.'.limit' => ['sometimes', 'integer', Rule::in($this->resource->getLimits($request))],
17+
$attribute.'.limit' => ['sometimes', 'integer', Rule::in($this->resource->getLimits($request))],
1818
$attribute.'.page' => ['sometimes', 'integer'],
19-
$attribute.'.filters' => ['sometimes', 'array'],
19+
$attribute.'.filters' => ['sometimes', 'array'],
2020
$attribute.'.gates' => ['sometimes', 'array', Rule::in(['viewAny', 'view', 'create', 'update', 'delete', 'restore', 'forceDelete'])],
21-
$attribute.'.filters.*' => (new SearchFilter())->setResource($this->resource),
22-
$attribute.'.scopes' => ['sometimes', 'array', $isScoutMode ? 'prohibited' : ''],
23-
$attribute.'.scopes.*' => (new SearchScope())->setResource($this->resource),
24-
$attribute.'.sorts' => ['sometimes', 'array'],
25-
$attribute.'.sorts.*' => (new SearchSort())->setResource($this->resource),
26-
$attribute.'.selects' => ['sometimes', 'array'],
27-
$attribute.'.selects.*' => (new SearchSelect())->setResource($this->resource),
28-
$attribute.'.aggregates' => ['sometimes', 'array'],
29-
$attribute.'.aggregates.*' => (new SearchAggregate())->setResource($this->resource),
30-
$attribute.'.includes' => ['sometimes', 'array'],
31-
$attribute.'.includes.*' => (new SearchInclude())->setResource($this->resource),
32-
$attribute.'.instructions' => ['sometimes', 'array'],
33-
$attribute.'.instructions.*' => (new SearchInstruction())->setResource($this->resource),
34-
$attribute.'.text' => ['sometimes', 'array', (new SearchText())->setResource($this->resource)],
21+
$attribute.'.filters.*' => (new SearchFilter())->setResource($this->resource),
22+
$attribute.'.scopes' => ['sometimes', 'array', $isScoutMode ? 'prohibited' : ''],
23+
$attribute.'.scopes.*' => (new SearchScope())->setResource($this->resource),
24+
$attribute.'.sorts' => ['sometimes', 'array'],
25+
$attribute.'.sorts.*' => (new SearchSort())->setResource($this->resource),
26+
$attribute.'.selects' => ['sometimes', 'array'],
27+
$attribute.'.selects.*' => (new SearchSelect())->setResource($this->resource),
28+
$attribute.'.aggregates' => ['sometimes', 'array'],
29+
$attribute.'.aggregates.*' => (new SearchAggregate())->setResource($this->resource),
30+
$attribute.'.includes' => ['sometimes', 'array'],
31+
$attribute.'.includes.*' => (new SearchInclude())->setResource($this->resource),
32+
$attribute.'.instructions' => ['sometimes', 'array'],
33+
$attribute.'.instructions.*' => (new SearchInstruction())->setResource($this->resource),
34+
$attribute.'.text' => ['sometimes', 'array', (new SearchText())->setResource($this->resource)],
3535
];
3636
}
3737
}

0 commit comments

Comments
 (0)