Skip to content

Commit feb2ca6

Browse files
committed
Fix more deprecation warnings
1 parent 00fbffd commit feb2ca6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/JsonSchema/Constraints/BaseConstraint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(?Factory $factory = null)
4343
$this->factory = $factory ?: new Factory();
4444
}
4545

46-
public function addError(?JsonPointer $path = null, $message, $constraint = '', array $more = null)
46+
public function addError(?JsonPointer $path, $message, $constraint = '', ?array $more = null)
4747
{
4848
$error = array(
4949
'property' => $this->convertJsonPointerIntoPropertyPath($path ?: new JsonPointer('')),

src/JsonSchema/Constraints/Constraint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
3939
*
4040
* @return JsonPointer;
4141
*/
42-
protected function incrementPath(?JsonPointer $path = null, $i)
42+
protected function incrementPath(?JsonPointer $path, $i)
4343
{
4444
$path = $path ?: new JsonPointer('');
4545

src/JsonSchema/Constraints/ConstraintInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function addErrors(array $errors);
4040
* @param string $constraint the constraint/rule that is broken, e.g.: 'minLength'
4141
* @param array $more more array elements to add to the error
4242
*/
43-
public function addError(?JsonPointer $path = null, $message, $constraint='', array $more = null);
43+
public function addError(?JsonPointer $path, $message, $constraint='', ?array $more = null);
4444

4545
/**
4646
* checks if the validator has not raised errors

src/JsonSchema/Constraints/ObjectConstraint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $pro
5151
$this->validateElement($element, $matches, $schema, $path, $properties, $additionalProp);
5252
}
5353

54-
public function validatePatternProperties($element, ?JsonPointer $path = null, $patternProperties)
54+
public function validatePatternProperties($element, ?JsonPointer $path, $patternProperties)
5555
{
5656
$try = array('/', '#', '+', '~', '%');
5757
$matches = array();

0 commit comments

Comments
 (0)