Skip to content

Commit a002a4d

Browse files
committed
Fix pass-by-reference
1 parent 4a743f6 commit a002a4d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function propertyGet($value, $property)
2727
return $value[$property];
2828
}
2929

30-
public static function propertySet($value, $property, $data)
30+
public static function propertySet(&$value, $property, $data)
3131
{
3232
if (is_object($value)) {
3333
$value->{$property} = $data;

src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static function propertyGet($value, $property)
1919
return $value->{$property};
2020
}
2121

22-
public static function propertySet($value, $property, $data)
22+
public static function propertySet(&$value, $property, $data)
2323
{
2424
$value->{$property} = $data;
2525
}

src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static function isArray($value);
1010

1111
public static function propertyGet($value, $property);
1212

13-
public static function propertySet($value, $property, $data);
13+
public static function propertySet(&$value, $property, $data);
1414

1515
public static function propertyExists($value, $property);
1616

0 commit comments

Comments
 (0)