public function pipe($callback, ...$arguments)
    {
        if (! is_callable($callback)) {
            return new PipeProxy($this, $callback);
        }

        // Call the piped method
        $this->value = $callback(...$this->addValueToArguments($arguments));

        // Allow method chaining
        return $this;
    }
public function pipe($callback, ...$arguments)
    {
        if (! is_callable($callback)) {
            return new PipeProxy($this, $callback);
        }

        // Call the piped method
        $this->value = $callback(...$this->addValueToArguments($arguments));

        // Allow method chaining
        return $this;
    }
public function pipe ( $ callback , ... $ arguments ) { if ( ! is_callable ( $ callback ) ) { return new PipeProxy ( $ this , $ callback ) ; } // Call the piped method $ this -> value = $ callback ( ... $ this -> addValueToArguments ( $ arguments ) ) ; // Allow method chaining return $ this ; }
Perform an operation on the current value.

@param callable|string|object $callback
@param array ...$arguments

@return \SebastiaanLuca\PipeOperator\Item|\SebastiaanLuca\PipeOperator\PipeProxy
Perform an operation on the current value .