mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 12:10:10 +02:00
Add unit tests and usage example to README
This commit is contained in:
@@ -43,8 +43,10 @@ class Entity implements ValueAccessInterface
|
||||
*/
|
||||
public function removeValue(ValueInterface $value)
|
||||
{
|
||||
if ($key = array_search($value, $this->values, true)) {
|
||||
unset($this->values[$key]);
|
||||
$index = array_search($value, $this->values, true);
|
||||
|
||||
if (false !== $index) {
|
||||
unset($this->values[$index]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user