Skip to content

Commit e52b607

Browse files
committed
Fix missing constructor
1 parent d7b01ac commit e52b607

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Change Log
22
==========
33

4+
2019-08-05 - 3.2.1
5+
------------------
6+
7+
* Fix missing constructor on `SimpleCollection`
8+
49
2019-08-05 - 3.2.0
510
------------------
611

src/SimpleCollection.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Somnambulist\Collection;
66

77
use Somnambulist\Collection\Behaviours;
8+
use Somnambulist\Collection\Utils\Value;
89

910
/**
1011
* Class SimpleCollection
@@ -48,4 +49,13 @@ class SimpleCollection extends AbstractCollection
4849
use Behaviours\Export\ExportToArray;
4950
use Behaviours\Export\ExportToJson;
5051

52+
/**
53+
* Constructor.
54+
*
55+
* @param mixed $items
56+
*/
57+
public function __construct($items = [])
58+
{
59+
$this->items = Value::toArray($items);
60+
}
5161
}

0 commit comments

Comments
 (0)