Commit 5bbc2a9e authored by romanb's avatar romanb

[2.0] Changing Collection#removeElement return type to be consistent with Collection#remove

parent 1e058992
...@@ -120,10 +120,11 @@ class Collection implements Countable, IteratorAggregate, ArrayAccess ...@@ -120,10 +120,11 @@ class Collection implements Countable, IteratorAggregate, ArrayAccess
{ {
$key = array_search($element, $this->_elements, true); $key = array_search($element, $this->_elements, true);
if ($key !== false) { if ($key !== false) {
$removed = $this->_elements[$key];
unset($this->_elements[$key]); unset($this->_elements[$key]);
return true; return $removed;
} }
return false; return null;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment