src/ProcessBuilder.php
public function transition($id, $from, $to)
    {
        if (isset($this->items[$id])) {
            throw new \RuntimeException(sprintf('Duplicate item ID: "%s"', $id));
        }
        
        $transition = $this->items[$id] = new Transition($id, $from);
        $transition->to($to);
        
        return $transition;
    }
public function transition($id, $from, $to)
    {
        if (isset($this->items[$id])) {
            throw new \RuntimeException(sprintf('Duplicate item ID: "%s"', $id));
        }
        
        $transition = $this->items[$id] = new Transition($id, $from);
        $transition->to($to);
        
        return $transition;
    }
Add a new transition between 2 nodes to the process.

@param string $id Unique ID of the transition.
@param string $from ID of the start node.
@param string $to ID of the end node.
@return Transition Created transition instance.