Skip to content

Commit 8f71617

Browse files
committed
Allowed null values in set-methods
1 parent 98a0fa4 commit 8f71617

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Resolvers/Resolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ public function __get(string $property): ?string
4949
* Set the value of the requested property by the called property name
5050
*
5151
* @param string $property
52-
* @param string $value
52+
* @param string|null $value
5353
*
5454
* @return string|null
5555
*/
56-
public function __set(string $property, string $value): ?string
56+
public function __set(string $property, ?string $value): ?string
5757
{
5858
return $this->updateOrCreateValue($property, $value)->{HasEntityAttributeValues::$value};
5959
}
@@ -136,11 +136,11 @@ private function getAttribute(string $group, string $property): EntityAttribute
136136

137137
/**
138138
* @param string $property
139-
* @param string $value
139+
* @param string|null $value
140140
*
141141
* @return EntityAttributeValue
142142
*/
143-
private function updateOrCreateValue(string $property, string $value): EntityAttributeValue
143+
private function updateOrCreateValue(string $property, ?string $value): EntityAttributeValue
144144
{
145145
if ($eav = $this->getEntityAttributeValue($property)) {
146146
$eav->{HasEntityAttributeValues::$value} = $value;

0 commit comments

Comments
 (0)