Skip to content

Commit

Permalink
Merge pull request #6 from kkomelin/master
Browse files Browse the repository at this point in the history
Used array functions to inline arrays
  • Loading branch information
yadakhov committed Jul 18, 2016
2 parents bb90302 + 62b8fe6 commit 9a28d60
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/InsertOnDuplicateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,7 @@ protected static function buildValuesList(array $first)
*/
protected static function inLineArray(array $data)
{
$out = [];

foreach ($data as $row) {
foreach ($row as $item) {
$out[] = $item;
}
}

return $out;
return call_user_func_array('array_merge', array_map('array_values', $data));
}

/**
Expand Down

0 comments on commit 9a28d60

Please sign in to comment.