maj
This commit is contained in:
@@ -24,11 +24,6 @@ class ArrayCollection extends BaseArrayCollection implements CollectionInterface
|
||||
*/
|
||||
public function reverse()
|
||||
{
|
||||
// TODO: remove when PHP 5.6 is minimum (with doctrine/collections v1.4).
|
||||
if (!method_exists($this, 'createFrom')) {
|
||||
return new static(array_reverse($this->toArray()));
|
||||
}
|
||||
|
||||
return $this->createFrom(array_reverse($this->toArray()));
|
||||
}
|
||||
|
||||
@@ -42,11 +37,6 @@ class ArrayCollection extends BaseArrayCollection implements CollectionInterface
|
||||
$keys = $this->getKeys();
|
||||
shuffle($keys);
|
||||
|
||||
// TODO: remove when PHP 5.6 is minimum (with doctrine/collections v1.4).
|
||||
if (!method_exists($this, 'createFrom')) {
|
||||
return new static(array_replace(array_flip($keys), $this->toArray()));
|
||||
}
|
||||
|
||||
return $this->createFrom(array_replace(array_flip($keys), $this->toArray()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user