Code Duplication    Length = 9-9 lines in 2 locations

Model/QueueHandler/VarnishUrlRegenerator.php 1 location

@@ 52-60 (lines=9) @@
49
            ->set(CURLOPT_TIMEOUT, self::CURL_TIMEOUT)
50
            ->set(CURLOPT_RETURNTRANSFER, true);
51
        $requests = &$this->requests;
52
        $this->queue->addListener('complete', function (Event $event) use (&$requests) {
53
            $this->counter++;
54
            $url = curl_getinfo($event->request->getHandle(), CURLINFO_EFFECTIVE_URL);
55
            $this->log($url);
56
            $this->logProgress();
57
            if ($next = array_pop($requests)) {
58
                $event->queue->attach($next);
59
            }
60
        });
61
    }
62
63
    /**

Model/QueueHandler/VarnishUrlPurger.php 1 location

@@ 108-116 (lines=9) @@
105
            ->set(CURLOPT_RETURNTRANSFER, true);
106
107
        $requests = &$this->requests;
108
        $this->queue->addListener('complete', function (Event $event) use (&$requests) {
109
            $this->counter++;
110
            $url = curl_getinfo($event->request->getHandle(), CURLINFO_EFFECTIVE_URL);
111
            $this->log($url);
112
            $this->logProgress();
113
            if ($next = array_pop($requests)) {
114
                $event->queue->attach($next);
115
            }
116
        });
117
    }
118
119
    /**