Skip to content

Commit f638716

Browse files
committed
Rename variable for clarity
1 parent b470961 commit f638716

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/JsonSchema/Constraints/UndefinedConstraint.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ protected function validateCommonProperties(&$value, $schema = null, JsonPointer
125125
}
126126
} elseif (isset($schema->items) && LooseTypeCheck::isArray($value)) {
127127
// $value is an array, and items are defined - treat as plain array
128-
foreach ($schema->items as $currentProperty => $itemDefinition) {
129-
if (!isset($value[$currentProperty]) && isset($itemDefinition->default)) {
128+
foreach ($schema->items as $currentItem => $itemDefinition) {
129+
if (!isset($value[$currentItem]) && isset($itemDefinition->default)) {
130130
if (is_object($itemDefinition->default)) {
131-
$value[$currentProperty] = clone $itemDefinition->default;
131+
$value[$currentItem] = clone $itemDefinition->default;
132132
} else {
133-
$value[$currentProperty] = $itemDefinition->default;
133+
$value[$currentItem] = $itemDefinition->default;
134134
}
135135
}
136136
}

0 commit comments

Comments
 (0)