Code Duplication    Length = 10-10 lines in 2 locations

src/PhpJsonRpc/Client/RequestBuilder.php 1 location

@@ 68-77 (lines=10) @@
65
     *
66
     * @return AbstractInvoke
67
     */
68
    private function preBuild(AbstractInvoke $invoke): AbstractInvoke
69
    {
70
        $result = $this->preBuild->handle(new BuilderContainer($this, $invoke));
71
72
        if ($result instanceof BuilderContainer) {
73
            return $result->getInvoke();
74
        }
75
76
        throw new \RuntimeException();
77
    }
78
}
79

src/PhpJsonRpc/Server/Processor.php 1 location

@@ 106-115 (lines=10) @@
103
     *
104
     * @return AbstractInvoke
105
     */
106
    private function preProcess(AbstractInvoke $invoke): AbstractInvoke
107
    {
108
        $result = $this->preProcess->handle(new ProcessorContainer($this, $invoke));
109
110
        if ($result instanceof ProcessorContainer) {
111
            return $result->getInvoke();
112
        }
113
114
        throw new \RuntimeException();
115
    }
116
117
    /**
118
     * @param Invoke\Invoke $unit