function _coll_in($collection, $in) { $depth = f\drop_last($in); if (count($depth)) { return f\_coll_depth($collection, $depth); } return f\to_array($collection); }
/** * @dataProvider provideEmptyColl */ public function testEmptyCollection($coll) { $this->assertSame(array(), f\drop_last($coll)); }