function test_flatten() { $data = array(array('#foo', '#bar'), array('#baz')); $expected = array('#foo', '#bar', '#baz'); $this->assertEquals($expected, Arr::flatten($data)); $this->assertEquals($expected, wpdevsclub_array_flatten($data)); }
/** * Get a flattened array of the items in the collection. * * @return static */ public function flatten() { return new static(wpdevsclub_array_flatten($this->items)); }