1
0
mirror of synced 2024-12-13 06:46:03 +03:00

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

This commit is contained in:
romanb 2009-07-01 13:31:11 +00:00
parent 1e0589928a
commit 5bbc2a9e58

View File

@ -120,10 +120,11 @@ class Collection implements Countable, IteratorAggregate, ArrayAccess
{
$key = array_search($element, $this->_elements, true);
if ($key !== false) {
$removed = $this->_elements[$key];
unset($this->_elements[$key]);
return true;
return $removed;
}
return false;
return null;
}
/**