src/GeneratorCollection.php
public function keys(): CollectionInterface
    {
        return $this->wrap(function (Iterator $data) {
            foreach ($data as $key => $value) {
                yield $key;
            }
        });
    }
public function keys(): CollectionInterface
    {
        return $this->wrap(function (Iterator $data) {
            foreach ($data as $key => $value) {
                yield $key;
            }
        });
    }
public function keys ( ) : CollectionInterface { return $ this -> wrap ( function ( Iterator $ data ) { foreach ( $ data as $ key => $ value ) { yield $ key ; } } ) ; }
Get the keys of the collection items.

@return CollectionInterface
Get the keys of the collection items .