src/Traver/Collection/PipeableLike.php
/**
     * @param callable $transformationFunction
     * @return PipeableLike
     * @codeCoverageIgnore
     * @internal
     */
@param callable $transformationFunction
@return PipeableLike
@codeCoverageIgnore
@internal
@param callable $transformationFunction @return PipeableLike @codeCoverageIgnore @internal
private function transform(callable $transformationFunction)
    {
        $builder = $this->builder();
        $index = 0;
        foreach ($this->asTraversable() as $key => $value) {
            list($newKey, $newValue) = $transformationFunction($key, $value, $index);
            $builder->add($newValue, $newKey);
            $index++;
        }
        return $builder->build();
    }
private function transform ( callable $ transformationFunction ) { $ builder = $ this -> builder ( ) ; $ index = 0 ; foreach ( $ this -> asTraversable ( ) as $ key => $ value ) { list ( $ newKey , $ newValue ) = $ transformationFunction ( $ key , $ value , $ index ) ; $ builder -> add ( $ newValue , $ newKey ) ; $ index ++ ; } return $ builder -> build ( ) ; }
@param callable $transformationFunction
 @return PipeableLike
 @codeCoverageIgnore
 @internal
@param callable $transformationFunction @return PipeableLike @codeCoverageIgnore @internal