Unlike flatten, concat does not merge arrays that are nested more that once.
Example:
$result = Arrays::concat(array(array(1, 2), array(3, 4)));
Result:
Array (
[0] => 1
[1] => 2
[2] => 3
[3] => 4
)
public function getParameters() { return Arrays::concat(Arrays::map($this->conditions, function (WhereClause $where) { return $where->getParameters(); })); }
/** * @test */ public function shouldConcatEmptyArray() { //given $array = array(); //when $flattened = Arrays::concat($array); //then $this->assertEquals(array(), $flattened); }