Code Duplication    Length = 8-8 lines in 2 locations

src/WorkerChild.php 2 locations

@@ 30-37 (lines=8) @@
27
        $this->messenger = $messenger;
28
        $this->loop = $loop;
29
30
        $this->messenger->registerRpc('table.call', function (Payload $payload) {
31
            $deferred = new Deferred();
32
            $this->loop->futureTick(function () use ($payload, $deferred) {
33
                $this->handleTableCall($payload, $deferred);
34
            });
35
36
            return $deferred->promise();
37
        });
38
39
        $this->messenger->registerRpc('paginate', function (Payload $payload) {
40
            $deferred = new Deferred();
@@ 39-46 (lines=8) @@
36
            return $deferred->promise();
37
        });
38
39
        $this->messenger->registerRpc('paginate', function (Payload $payload) {
40
            $deferred = new Deferred();
41
            $this->loop->futureTick(function () use ($payload, $deferred) {
42
                $this->handlePaginateCall($payload, $deferred);
43
            });
44
45
            return $deferred->promise();
46
        });
47
    }
48
49
    /**