Fix "Optional parameters specified before required parameters"

This commit is contained in:
Anton Medvedev 2024-11-27 22:33:14 +01:00
parent 2b24b55683
commit b59e334ea9
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
*
* @return JsonPointer;
*/
protected function incrementPath(?JsonPointer $path = null, $i)
protected function incrementPath(?JsonPointer $path = null, $i = null)
{
$path = $path ?: new JsonPointer('');

View File

@ -57,7 +57,7 @@ class ObjectConstraint extends Constraint
$this->validateElement($element, $matches, $schema, $path, $properties, $additionalProp);
}
public function validatePatternProperties($element, ?JsonPointer $path = null, $patternProperties)
public function validatePatternProperties($element, ?JsonPointer $path = null, $patternProperties = [])
{
$try = ['/', '#', '+', '~', '%'];
$matches = [];