/** * @param array $values * @param string $key * @return Update $this */ public function setMultiple(array $values, $key = 'id') { $values = Arr::flipNested($values); foreach ($values as $column => $changes) { $this->set[] = new SQL\SetMultiple($column, $changes, $key); } return $this; }
/** * @dataProvider dataFlipNested * @covers ::flipNested */ public function testFlipNested($array, $expected) { $this->assertEquals($expected, Arr::flipNested($array)); }