Skip to content

Commit 147aec1

Browse files
committed
format
1 parent c7fbfcb commit 147aec1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Resolvers/DataValidationRulesResolver.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
class DataValidationRulesResolver
2323
{
24-
2524
protected array $collectionRulesCache = [];
2625

2726
public function __construct(
@@ -198,16 +197,16 @@ protected function resolveDataCollectionSpecificRules(
198197
DataRules $dataRules,
199198
): void {
200199
$this->resolveToplevelRules(
201-
$dataProperty,
202-
$fullPayload,
203-
$path,
204-
$propertyPath,
205-
$dataRules,
206-
shouldBePresent: true
200+
$dataProperty,
201+
$fullPayload,
202+
$path,
203+
$propertyPath,
204+
$dataRules,
205+
shouldBePresent: true
207206
);
208207

209208
// If collection payload is null or not an array, no nested rules needed
210-
if (!is_array($collectionPayload)) {
209+
if (! is_array($collectionPayload)) {
211210
return;
212211
}
213212

@@ -216,16 +215,17 @@ protected function resolveDataCollectionSpecificRules(
216215

217216
// Optimization: If nested class has NO dynamic rules method, build flat array
218217
if (! $hasDynamicRules) {
219-
// Generate rules per item but add directly
218+
// Generate rules per item but add directly
220219
foreach ($collectionPayload as $collectionItemKey => $collectionItemValue) {
221220
$itemPath = $propertyPath->property($collectionItemKey);
222221

223-
if (!is_array($collectionItemValue)) {
222+
if (! is_array($collectionItemValue)) {
224223
$dataRules->add($itemPath, ['array']);
224+
225225
continue;
226226
}
227227

228-
// Directly execute rule generation for this specific item and path
228+
// Directly execute rule generation for this specific item and path
229229
$this->execute(
230230
$nestedDataClass->name,
231231
$fullPayload,

0 commit comments

Comments
 (0)