Better follow protected Object Property interfaces in traits

This commit is contained in:
Matias Griese
2019-08-21 12:28:05 +03:00
parent de59bad0f8
commit 0d0bb2c229
2 changed files with 0 additions and 12 deletions

View File

@@ -69,7 +69,6 @@ trait LazyPropertyTrait
/**
* @param string $property Object property to be updated.
* @param mixed $value New value.
* @return $this
*/
protected function doSetProperty($property, $value)
{
@@ -78,20 +77,15 @@ trait LazyPropertyTrait
} else {
$this->setArrayProperty($property, $value);
}
return $this;
}
/**
* @param string $property Object property to be unset.
* @return $this
*/
protected function doUnsetProperty($property)
{
$this->hasObjectProperty($property) ?
$this->unsetObjectProperty($property) : $this->unsetArrayProperty($property);
return $this;
}
/**

View File

@@ -68,26 +68,20 @@ trait MixedPropertyTrait
/**
* @param string $property Object property to be updated.
* @param mixed $value New value.
* @return $this
*/
protected function doSetProperty($property, $value)
{
$this->hasObjectProperty($property)
? $this->setObjectProperty($property, $value) : $this->setArrayProperty($property, $value);
return $this;
}
/**
* @param string $property Object property to be unset.
* @return $this
*/
protected function doUnsetProperty($property)
{
$this->hasObjectProperty($property) ?
$this->unsetObjectProperty($property) : $this->unsetArrayProperty($property);
return $this;
}
/**