diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5e716..c98b91f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to `laravel-collection-macros` will be documented in this file +## 3.7.0 - 2018-01-18 +- add `pluckToArray` + ## 3.6.2 - 2018-01-14 - make `parallelMap` return a new collection diff --git a/src/macros/pluckToArray.php b/src/macros/pluckToArray.php index 67a3a79..fbced78 100644 --- a/src/macros/pluckToArray.php +++ b/src/macros/pluckToArray.php @@ -7,6 +7,7 @@ * * @param string|array $value * @param string|null $key + * * @return array */ Collection::macro('pluckToArray', function ($value, $key = null): array { diff --git a/tests/PluckToArrayTest.php b/tests/PluckToArrayTest.php index 8db06b4..044fe52 100644 --- a/tests/PluckToArrayTest.php +++ b/tests/PluckToArrayTest.php @@ -18,6 +18,8 @@ public function it_returns_array_of_attributes() $expected = [1, 2, 3]; $this->assertEquals($expected, $result); + + $this->assertTrue(is_array($result)); } /** @test */