Skip to content
Permalink
Browse files

entity: ImmutableValuePropertyWrapper do not handle null by itself (B…

…C break!)
  • Loading branch information...
hrach committed Jun 1, 2019
1 parent 267aa0e commit 8d9616e79fff3f59080bd7131edc3029df1c1192
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/Entity/ImmutableValuePropertyWrapper.php
@@ -13,14 +13,14 @@
abstract class ImmutableValuePropertyWrapper implements IEntityAwareProperty, IPropertyContainer
{
/** @var null|mixed */
/** @var mixed */
protected $value;
/** @var PropertyMetadata */
private $propertyMetadata;
protected $propertyMetadata;
/** @var IEntity */
private $entity;
protected $entity;
public function __construct(PropertyMetadata $propertyMetadata)
@@ -37,13 +37,13 @@ public function setPropertyEntity(IEntity $entity)
public function setRawValue($value): void
{
$this->value = $value === null ? null : $this->convertFromRawValue($value);
$this->value = $this->convertFromRawValue($value);
}
public function getRawValue()
{
return $this->value === null ? null : $this->convertToRawValue($this->value);
return $this->convertToRawValue($this->value);
}
@@ -56,15 +56,15 @@ public function setInjectedValue($value): void
}
public function &getInjectedValue()
public function hasInjectedValue(): bool
{
return $this->value;
return $this->value !== null;
}
public function hasInjectedValue(): bool
public function &getInjectedValue()
{
return $this->value !== null;
return $this->value;
}

0 comments on commit 8d9616e

Please sign in to comment.
You can’t perform that action at this time.