Code Duplication    Length = 11-11 lines in 2 locations

Model/QueueHandler/VarnishUrlRegenerator.php 1 location

@@ 38-48 (lines=11) @@
35
    /**
36
     * @return void
37
     */
38
    public function runRegenerationQueue(): void
39
    {
40
        while (!empty($this->urls)) {
41
            for($i = 0; $i < $this->getMaxNumberOfProcesses(); $i++) {
42
                if (!empty($this->urls)) {
43
                    $this->createRequest(array_pop($this->urls));
44
                }
45
            }
46
            $this->loop->run();
47
        }
48
    }
49
50
    /**
51
     * @return int

Model/QueueHandler/VarnishUrlPurger.php 1 location

@@ 76-86 (lines=11) @@
73
    /**
74
     * @return void
75
     */
76
    public function runPurgeQueue(): void
77
    {
78
        while (!empty($this->urls)) {
79
            for ($i = 0; $i < $this->getMaxNumberOfProcesses(); $i++) {
80
                if (!empty($this->urls)) {
81
                    $this->createRequest(array_pop($this->urls));
82
                }
83
            }
84
            $this->loop->run();
85
        }
86
    }
87
88
    /**
89
     * @return int