mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
[BaseCollection] Prepare elements while adding them by addMultiple() method in the same way as passing them in constructor
This commit is contained in:
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Common and useful classes, methods, exceptions etc.
|
Common and useful classes, methods, exceptions etc.
|
||||||
|
|
||||||
|
# 1.1.5
|
||||||
|
|
||||||
|
1. [BaseCollection] Prepare elements while adding them by `addMultiple()` method in the same way as passing them in
|
||||||
|
constructor.
|
||||||
|
|
||||||
# 1.1.4
|
# 1.1.4
|
||||||
|
|
||||||
1. [BaseCollection] Fix incorrectly working limit() method
|
1. [BaseCollection] Fix incorrectly working limit() method
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ abstract class BaseCollection implements CollectionInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($elements as $index => $element) {
|
$prepared = $this->prepareElements($elements);
|
||||||
|
|
||||||
|
foreach ($prepared as $index => $element) {
|
||||||
if ($useIndexes) {
|
if ($useIndexes) {
|
||||||
$this->add($element, $index);
|
$this->add($element, $index);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user