public function insertBefore(callable $pipe, $beforeClass)
    {
        $beforePosition = null;
        foreach ($this->pipes as $index => $callable) {
            $class = get_class($callable);
            if ($class === $beforeClass) {
                $beforePosition = $index;
                break;
            }
        }
        if ($beforePosition === null) {
            $this->pipes[] = $pipe;
        } else {
            array_splice($this->pipes, $beforePosition, 0, [$pipe]);
        }

        return $this;
    }