Skip to content

Commit 92c4ef5

Browse files
authored
Change all occurrences of rawModelDataInput to modelData (#56)
Change all occurrences of `rawModelDataInput` to `modelData` (compare #55)
1 parent ce2673d commit 92c4ef5

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/PropertyProcessor/Property/BaseProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BaseProcessor extends AbstractPropertyProcessor
4343
'count(
4444
array_unique(
4545
array_merge(
46-
array_keys($this->_rawModelDataInput),
46+
array_keys($this->_modelData),
4747
array_keys($modelData)
4848
)
4949
)

src/SchemaProcessor/PostProcessor/AdditionalPropertiesAccessorPostProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function addRemoveAdditionalPropertyMethod(
151151
new Property($schema->getClassName(), null, $schema->getJsonSchema()),
152152
sprintf(
153153
'%s < %d',
154-
'count($this->_rawModelDataInput) - 1',
154+
'count($this->_modelData) - 1',
155155
$json['minProperties']
156156
),
157157
MinPropertiesException::class,

src/SchemaProcessor/PostProcessor/Internal/ExtendObjectPropertiesMatchingPatternPropertiesPostProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getCode(PropertyInterface $property, bool $batchUpdate = false):
6464
// TODO: call only the pattern property validation at this location to avoid executing unnecessary
6565
// TODO: validators
6666
return sprintf('
67-
$modelData = array_merge($this->_rawModelDataInput, ["%s" => $value]);
67+
$modelData = array_merge($this->_modelData, ["%s" => $value]);
6868
$this->executeBaseValidators($modelData);
6969
',
7070
$property->getName()

src/SchemaProcessor/PostProcessor/Templates/AdditionalProperties/RemoveAdditionalProperty.phptpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function removeAdditionalProperty(string $property): bool
1414
foreach ($this->_patternProperties as $patternHash => $_) {
1515
if (isset($this->_patternProperties[$patternHash][$property])) {
1616
unset($this->_patternProperties[$patternHash][$property]);
17-
unset($this->_rawModelDataInput[$property]);
17+
unset($this->_modelData[$property]);
1818
}
1919
}
2020
}
@@ -39,7 +39,7 @@ public function removeAdditionalProperty(string $property): bool
3939
{% endif %}
4040
{% endif %}
4141

42-
unset($this->_rawModelDataInput[$property]);
42+
unset($this->_modelData[$property]);
4343
unset($this->_additionalProperties[$property]);
4444

4545
return true;

src/SchemaProcessor/PostProcessor/Templates/AdditionalProperties/SetAdditionalProperty.phptpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function setAdditionalProperty(
4040
$this->_additionalProperties[$property] = $value;
4141
{% endif %}
4242

43-
$this->_rawModelDataInput[$property] = $value;
43+
$this->_modelData[$property] = $value;
4444

4545
{% if validationProperty %}{{ schemaHookResolver.resolveSetterAfterValidationHook(validationProperty) }}{% endif %}
4646

src/SchemaProcessor/PostProcessor/Templates/CompositionValidation.phptpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
private function validateComposition_{{ index }}(array &$modifiedModelData): void
99
{
1010
$validatorIndex = {{ index }};
11-
$value = $modelData = array_merge($this->_rawModelDataInput, $modifiedModelData);
11+
$value = $modelData = array_merge($this->_modelData, $modifiedModelData);
1212

1313
{{ validator.getValidatorSetUp() }}
1414
if ({{ validator.getCheck() }}) {

src/SchemaProcessor/PostProcessor/Templates/Populate.phptpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function populate(array $modelData): self
5959
}
6060
{% endif %}
6161

62-
$this->_rawModelDataInput = array_merge($this->_rawModelDataInput, $modelData);
62+
$this->_modelData = array_merge($this->_modelData, $modelData);
6363

6464
{% foreach schema.getProperties() as property %}
6565
{% if not property.isInternal() %}

src/Templates/Model.phptpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class {{ class }} {% if schema.getInterfaces() %}implements {{ viewHelper.joinCl
3232
{% if property.isInternal() %}private{% else %}protected{% endif %} ${{ property.getAttribute() }}{% if not viewHelper.isNull(property.getDefaultValue()) %} = {{ property.getDefaultValue() }}{% endif %};
3333
{% endforeach %}
3434
/** @var array */
35-
protected $_rawModelDataInput = [];
35+
protected $_modelData = [];
3636

3737
{% if generatorConfiguration.collectErrors() %}
3838
/** @var {{ viewHelper.getSimpleClassName(generatorConfiguration.getErrorRegistryClass()) }} Collect all validation errors */
@@ -70,7 +70,7 @@ class {{ class }} {% if schema.getInterfaces() %}implements {{ viewHelper.joinCl
7070
}
7171
{% endif %}
7272

73-
$this->_rawModelDataInput = $modelData;
73+
$this->_modelData = $modelData;
7474

7575
{{ schemaHookResolver.resolveConstructorAfterValidationHook() }}
7676
}
@@ -100,7 +100,7 @@ class {{ class }} {% if schema.getInterfaces() %}implements {{ viewHelper.joinCl
100100
*/
101101
public function getRawModelDataInput(): array
102102
{
103-
return $this->_rawModelDataInput;
103+
return $this->_modelData;
104104
}
105105

106106
{% foreach schema.getProperties() as property %}
@@ -154,7 +154,7 @@ class {{ class }} {% if schema.getInterfaces() %}implements {{ viewHelper.joinCl
154154
{% endif %}
155155

156156
$this->{{ property.getAttribute() }} = $value;
157-
$this->_rawModelDataInput['{{ property.getName() }}'] = ${{ property.getAttribute() }};
157+
$this->_modelData['{{ property.getName() }}'] = ${{ property.getAttribute() }};
158158

159159
{{ schemaHookResolver.resolveSetterAfterValidationHook(property) }}
160160

0 commit comments

Comments
 (0)