public function testFirstWithCallbackAndDefault() { $data = new Collection(['foo', 'bar']); $result = $data->first(function ($key, $value) { return $value === 'baz'; }, 'default'); $this->assertEquals('default', $result); }
/** * {@inheritdoc} */ public function top() { return $this->collection->first(); }