Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: DRY
  • Loading branch information
llvdl committed May 22, 2016
commit dfe2faaae27c6d33bb0de89879581280fae3bf54
6 changes: 2 additions & 4 deletions Slim/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ class Collection implements CollectionInterface
*/
public function __construct(array $items = [])
{
foreach ($items as $key => $value) {
$this->set($key, $value);
}
$this->replace($items);
}

/********************************************************************************
Expand Down Expand Up @@ -68,7 +66,7 @@ public function get($key, $default = null)
}

/**
* Add item to collection
* Add item to collection, replacing existing items with the same data key
*
* @param array $items Key-value array of data to append to this collection
*/
Expand Down