Skip to content

Commit fe46641

Browse files
committed
Fix CI
1 parent 8bab93f commit fe46641

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/Model/Validator/PropertyNamesValidator.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,26 @@
2020
*
2121
* @package PHPModelGenerator\Model\Validator
2222
*/
23-
class PropertyNamesValidator extends AbstractComposedPropertyValidator
23+
class PropertyNamesValidator extends PropertyTemplateValidator
2424
{
2525
/**
26-
* ComposedPropertyValidator constructor.
26+
* PropertyNamesValidator constructor.
2727
*
28-
* @param PropertyCollectionProcessor $propertyCollectionProcessor
29-
* @param SchemaProcessor $schemaProcessor
30-
* @param Schema $schema
31-
* @param array $propertyNames
28+
* @param SchemaProcessor $schemaProcessor
29+
* @param Schema $schema
30+
* @param array $propertyNames
3231
*
3332
* @throws FileSystemException
3433
* @throws SyntaxErrorException
3534
* @throws UndefinedSymbolException
3635
* @throws SchemaException
3736
*/
3837
public function __construct(
39-
PropertyCollectionProcessor $propertyCollectionProcessor,
4038
SchemaProcessor $schemaProcessor,
4139
Schema $schema,
4240
array $propertyNames
4341
) {
44-
$nameValidationProperty = (new StringProcessor($propertyCollectionProcessor, $schemaProcessor, $schema))
42+
$nameValidationProperty = (new StringProcessor(new PropertyCollectionProcessor(), $schemaProcessor, $schema))
4543
->process('property name', $propertyNames)
4644
// the property name validator doesn't need type checks or required checks so simply filter them out
4745
->filterValidators(function (Validator $validator) {

tests/Basic/PropertyNamesTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function invalidPropertyNamesDataProvider(): array
131131
* property name must not be shorter than 3
132132
- invalid property '123456'
133133
* property name must not be longer than 5
134-
ERROR,
134+
ERROR
135135
],
136136
'pattern violation' => [
137137
'{"pattern": "^test[0-9]+$"}',
@@ -149,7 +149,7 @@ public function invalidPropertyNamesDataProvider(): array
149149
* property name doesn't match pattern ^test[0-9]+$
150150
- invalid property 'test12w12'
151151
* property name doesn't match pattern ^test[0-9]+$
152-
ERROR,
152+
ERROR
153153
],
154154
'multiple violations' => [
155155
'{"minLength": 6, "maxLength": 8, "pattern": "^test[0-9]+$"}',
@@ -164,7 +164,7 @@ public function invalidPropertyNamesDataProvider(): array
164164
* property name doesn't match pattern ^test[0-9]+$
165165
- invalid property 'test'
166166
* property name doesn't match pattern ^test[0-9]+$
167-
ERROR,
167+
ERROR
168168
],
169169
]
170170
);
@@ -187,7 +187,7 @@ public function invalidCombinedPropertyNamesDataProvider(): array
187187
* property name doesn't match pattern ^test[0-9]+$
188188
- invalid property 'test'
189189
* property name doesn't match pattern ^test[0-9]+$
190-
ERROR,
190+
ERROR
191191
],
192192
'Error Collection - multiple violations' => [
193193
new GeneratorConfiguration(),
@@ -205,7 +205,7 @@ public function invalidCombinedPropertyNamesDataProvider(): array
205205
- invalid property 'test'
206206
* property name doesn't match pattern ^test[0-9]+$
207207
* property name must not be shorter than 6
208-
ERROR,
208+
ERROR
209209
],
210210
];
211211
}

0 commit comments

Comments
 (0)