Skip to content

Commit 60488b2

Browse files
Resolve deprecations: Optional parameter $... declared before required parameter $... (#752)
* fix: remove default value to resolve deprecations notice * docs: add changelog entry
1 parent 5b3bd2b commit 60488b2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Fix pugx badges in README ([#742](https://github.com/jsonrainbow/json-schema/pull/742))
1515
- Add missing property in UriResolverTest ([#743](https://github.com/jsonrainbow/json-schema/pull/743))
1616
- Correct casing of paths used in tests ([#745](https://github.com/jsonrainbow/json-schema/pull/745))
17+
- Resolve deprecations of optional parameter ([#752](https://github.com/jsonrainbow/json-schema/pull/752))
1718

1819
### Changed
1920
- Bump to minimum PHP 7.2 ([#746](https://github.com/jsonrainbow/json-schema/pull/746))

src/JsonSchema/Constraints/Constraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
4040
*
4141
* @return JsonPointer;
4242
*/
43-
protected function incrementPath(?JsonPointer $path = null, $i)
43+
protected function incrementPath(?JsonPointer $path, $i)
4444
{
4545
$path = $path ?: new JsonPointer('');
4646

src/JsonSchema/Constraints/ObjectConstraint.php

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

55-
public function validatePatternProperties($element, ?JsonPointer $path = null, $patternProperties)
55+
public function validatePatternProperties($element, ?JsonPointer $path, $patternProperties)
5656
{
5757
$matches = [];
5858
foreach ($patternProperties as $pregex => $schema) {

0 commit comments

Comments
 (0)