Skip to content

Commit 996c15b

Browse files
author
Alex Westergaard
committed
Refactor value setting of UserProperty
1 parent c9902a4 commit 996c15b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Helper/AbstractUserProperty.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ public function toArray(): array
3333
}
3434

3535
$value = isset($this->value) ? $this->value : null;
36-
37-
$return[$this->name] = $value;
38-
3936
if (!is_array($value)) {
40-
$return[$this->name] = ['value' => $value];
37+
$value = ['value' => $value];
4138
}
4239

40+
$return[$this->name] = $value;
41+
4342
return $return;
4443
}
4544

0 commit comments

Comments
 (0)